Repository: grafana/tanka
Pull request #846 (2023-04-25 10:36:09)

Bump prettier from 1.19.1 to 2.8.8 in /docs
Bumps [prettier](https://github.com/prettier/prettier) from 1.19.1 to 2.8.8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/prettier/prettier/releases">prettier's releases</a>.</em></p>
<blockquote>
<h2>2.8.8</h2>
<p>This version is a republished version of v2.8.7.
A bad version was accidentally published and <a href="https://redirect.github.com/npm/cli/issues/1686">it can't be unpublished</a>, apologies for the churn.</p>
<h2>2.8.7</h2>
<ul>
<li>Allow multiple decorators on same getter/setter</li>
</ul>
<p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#287">Changelog</a></p>
<h2>2.8.6</h2>
<ul>
<li>Allow decorators on private members and class expressions</li>
</ul>
<p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#286">Changelog</a></p>
<h2>2.8.5</h2>
<ul>
<li>Support TypeScript 5.0</li>
</ul>
<p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#285">Changelog</a></p>
<h2>2.8.4</h2>
<p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#284">Changelog</a></p>
<h2>2.8.3</h2>
<p>Support Angular 15.1</p>
<p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#283">Changelog</a></p>
<h2>2.8.2</h2>
<p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#282">Changelog</a></p>
<h2>2.8.1</h2>
<p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#281">Changelog</a></p>
<h2>2.8.0</h2>
<p><a href="https://github.com/prettier/prettier/compare/2.7.1...2.8.0">diff</a></p>
<p>🔗 <a href="https://prettier.io/blog/2022/11/23/2.8.0.html">Release note</a></p>
<h2>2.7.1</h2>
<p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#271">Changelog</a></p>
<h2>2.7.0</h2>
<p><a href="https://github.com/prettier/prettier/compare/2.7.0...2.7.0">diff</a></p>
<p>🔗 <a href="https://prettier.io/blog/2022/06/14/2.7.0.html">Release note</a></p>
<h2>2.6.2</h2>
<p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#262">Changelog</a></p>
<h2>2.6.1</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md">prettier's changelog</a>.</em></p>
<blockquote>
<h1>2.8.8</h1>
<p>This version is a republished version of v2.8.7.
A bad version was accidentally published and <a href="https://redirect.github.com/npm/cli/issues/1686">it can't be unpublished</a>, apologies for the churn.</p>
<h1>2.8.7</h1>
<p><a href="https://github.com/prettier/prettier/compare/2.8.6...2.8.7">diff</a></p>
<h4>Allow multiple decorators on same getter/setter (<a href="https://redirect.github.com/prettier/prettier/pull/14584">#14584</a> by <a href="https://github.com/fisker"><code>@​fisker</code></a>)</h4>
<!-- raw HTML omitted -->
<pre lang="ts"><code>// Input
class A {
  @decorator()
  get foo () {}
<p><a href="https://github.com/decorator"><code>@​decorator</code></a>()
set foo (value) {}
}</p>
<p>// Prettier 2.8.6
SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. (5:3)
3 |   get foo () {}
4 |<br />
&gt; 5 |   <a href="https://github.com/decorator"><code>@​decorator</code></a>()
|   ^^^^^^^^^^^^
6 |   set foo (value) {}
7 | }</p>
<p>// Prettier 2.8.7
class A {
<a href="https://github.com/decorator"><code>@​decorator</code></a>()
get foo() {}</p>
<p><a href="https://github.com/decorator"><code>@​decorator</code></a>()
set foo(value) {}
}
</code></pre></p>
<h1>2.8.6</h1>
<p><a href="https://github.com/prettier/prettier/compare/2.8.5...2.8.6">diff</a></p>
<h4>Allow decorators on private members and class expressions (<a href="https://redirect.github.com/prettier/prettier/pull/14548">#14548</a> by <a href="https://github.com/fisker"><code>@​fisker</code></a>)</h4>
<!-- raw HTML omitted -->
<pre lang="ts"><code>// Input
&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/prettier/prettier/commit/1b7fad52558e16444399d11ff2d89aa8ed895c77"><code>1b7fad5</code></a> Release 2.8.8</li>
<li><a href="https://github.com/prettier/prettier/commit/543a9d71a7a61436948814181bd3a5b434a6c2ae"><code>543a9d7</code></a> Release 2.8.7</li>
<li><a href="https://github.com/prettier/prettier/commit/f9fae7f34ce6a5664073fb9c78d692dcacb82527"><code>f9fae7f</code></a> Allow multiple decorators on same getter/setter (<a href="https://redirect.github.com/prettier/prettier/issues/14584">#14584</a>)</li>
<li><a href="https://github.com/prettier/prettier/commit/10fe1ed6230c6dcdce879104b69cfb2274728c86"><code>10fe1ed</code></a> Release 2.8.6</li>
<li><a href="https://github.com/prettier/prettier/commit/44aef0b1ba067cd286ae5b79a9f1f17c751e4cdf"><code>44aef0b</code></a> Allow decorator on private members and class expressions (<a href="https://redirect.github.com/prettier/prettier/issues/14548">#14548</a>)</li>
<li><a href="https://github.com/prettier/prettier/commit/ddf3b43c33e2e98f6413b5232ad623876d96738e"><code>ddf3b43</code></a> Clean changelog</li>
<li><a href="https://github.com/prettier/prettier/commit/71ba29f22bf39d8ddbfd42f33fefd8efdd28a64b"><code>71ba29f</code></a> Git blame ignore 2.8.5</li>
<li><a href="https://github.com/prettier/prettier/commit/c1808e86a3c7c2c8f43093f99e78fce3b6d0a97d"><code>c1808e8</code></a> Bump Prettier dependency to 2.8.5</li>
<li><a href="https://github.com/prettier/prettier/commit/0a7953591661bc2f54a9124d8ced69c19c1c0353"><code>0a79535</code></a> Release 2.8.5</li>
<li><a href="https://github.com/prettier/prettier/commit/019ebe52078efb6ba0ed802ea104617744f42e4c"><code>019ebe5</code></a> Support TypeScript 5 (backport <a href="https://redirect.github.com/prettier/prettier/issues/14391">#14391</a> and <a href="https://redirect.github.com/prettier/prettier/issues/13819">#13819</a>) (<a href="https://redirect.github.com/prettier/prettier/issues/14512">#14512</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/prettier/prettier/compare/1.19.1...2.8.8">compare view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a href="https://www.npmjs.com/~prettier-bot">prettier-bot</a>, a new releaser for prettier since your current version.</p>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=prettier&package-manager=npm_and_yarn&previous-version=1.19.1&new-version=2.8.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>> **Note**
> Automatic rebases have been disabled on this pull request as it has been open for over 30 days.


github-actions[bot]: [PR Preview Action](https://github.com/rossjrw/pr-preview-action) v1.4.4
:---:
:rocket: Deployed preview to https://grafana.github.io/tanka/pr-preview/pr-846/
on branch [`gh-pages`](https://github.com/grafana/tanka/tree/gh-pages) at 2023-05-23 13:00 UTC
<!-- Sticky Pull Request Commentpr-preview -->

Patch:
diff --git a/docs/docs/helm.mdx b/docs/docs/helm.mdx
index 1881de3a..b138dae2 100644
--- a/docs/docs/helm.mdx
+++ b/docs/docs/helm.mdx
@@ -223,6 +223,26 @@ $ tk tool charts vendor
 
 Optionally, you can also pass the `--prune` flag to remove vendored charts that are no longer in the chartfile.
 
+#### OCI Registry Support
+
+Tanka supports pulling charts from OCI registries. To use one, the chart name must be split into two parts: the registry and the chart name. 
+
+As example, if you wanted to pull the `oci://public.ecr.aws/karpenter/karpenter:v0.27.3` image, your chartfile would look like this:
+
+```yaml
+version: 1
+directory: charts
+repositories:
+- name: karpenter
+  url: oci://public.ecr.aws/karpenter
+requires:
+- chart: karpenter/karpenter
+  directory: v0.27.3
+  version: v0.27.3
+```
+
+_Registry login is not supported yet._
+
 ## Troubleshooting
 
 ### Helm executable missing
diff --git a/docs/package.json b/docs/package.json
index e364409b..e44ae56e 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -24,10 +24,10 @@
     "react-helmet": "^5.2.1",
     "typeface-fira-mono": "^0.0.72",
     "typeface-source-sans-pro": "^0.0.75",
-    "typescript": "^4.0.0"
+    "typescript": "^4.9.5"
   },
   "devDependencies": {
-    "prettier": "^1.19.1"
+    "prettier": "^2.8.8"
   },
   "keywords": [
     "gatsby"
diff --git a/docs/yarn.lock b/docs/yarn.lock
index ef3f4ad3..0488da48 100644
--- a/docs/yarn.lock
+++ b/docs/yarn.lock
@@ -12989,15 +12989,15 @@ prepend-http@^2.0.0:
   resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
   integrity sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==
 
-prettier@^1.18.2, prettier@^1.19.1:
+prettier@^1.18.2:
   version "1.19.1"
   resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
   integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
 
-prettier@^2.0.5:
-  version "2.7.1"
-  resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
-  integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==
+prettier@^2.0.5, prettier@^2.8.8:
+  version "2.8.8"
+  resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
+  integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
 
 pretty-bytes@^5.1.0, pretty-bytes@^5.3.0, pretty-bytes@^5.4.1:
   version "5.6.0"
@@ -15958,10 +15958,10 @@ typeface-source-sans-pro@^0.0.75:
   resolved "https://registry.yarnpkg.com/typeface-source-sans-pro/-/typeface-source-sans-pro-0.0.75.tgz#33e60ea079738c2dbdb2d0aa28f899f565e1646e"
   integrity sha512-8aI6ywe+5py1MoMQjdnuQKepOATSLpFoyatVMweF6JNUD8cu+sWaVEfZBN08CRxPrSC4KYTArf6prrQzcqpyQA==
 
-typescript@^4.0.0:
-  version "4.7.4"
-  resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
-  integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==
+typescript@^4.9.5:
+  version "4.9.5"
+  resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
+  integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
 
 typography-breakpoint-constants@^0.16.19:
   version "0.16.19"
diff --git a/pkg/helm/charts.go b/pkg/helm/charts.go
index da8f015a..ee27907e 100644
--- a/pkg/helm/charts.go
+++ b/pkg/helm/charts.go
@@ -1,14 +1,12 @@
 package helm
 
 import (
-	"errors"
 	"fmt"
 	"os"
 	"path/filepath"
 	"regexp"
 	"strings"
 
-	"github.com/Masterminds/semver"
 	"github.com/rs/zerolog/log"
 	"sigs.k8s.io/yaml"
 )
@@ -75,8 +73,8 @@ type Charts struct {
 
 // chartManifest represents a Helm chart's Chart.yaml
 type chartManifest struct {
-	Name    string         `yaml:"name"`
-	Version semver.Version `yaml:"version"`
+	Name    string `yaml:"name"`
+	Version string `yaml:"version"`
 }
 
 // ChartDir returns the directory pulled charts are saved in
@@ -137,7 +135,7 @@ func (c Charts) Vendor(prune bool) error {
 				return fmt.Errorf("unmarshalling chart manifest: %w", err)
 			}
 
-			if chartYAML.Version.String() == r.Version.String() {
+			if chartYAML.Version == r.Version {
 				log.Info().Msgf("%s exists", r)
 				continue
 			}
@@ -165,7 +163,7 @@ func (c Charts) Vendor(prune bool) error {
 		if repoName := parseReqRepo(r.Chart); !c.Manifest.Repositories.HasName(repoName) {
 			return fmt.Errorf("repository %q not found for chart %q", repoName, r.Chart)
 		}
-		err := c.Helm.Pull(r.Chart, r.Version.String(), PullOpts{
+		err := c.Helm.Pull(r.Chart, r.Version, PullOpts{
 			Destination:      dir,
 			ExtractDirectory: r.Directory,
 			Opts:             Opts{Repositories: c.Manifest.Repositories},
@@ -174,7 +172,7 @@ func (c Charts) Vendor(prune bool) error {
 			return err
 		}
 
-		log.Info().Msgf("%s@%s downloaded", r.Chart, r.Version.String())
+		log.Info().Msgf("%s@%s downloaded", r.Chart, r.Version)
 	}
 
 	if prune {
@@ -307,14 +305,7 @@ func parseReq(s string) (*Requirement, error) {
 		return nil, fmt.Errorf("not of form 'repo/chart@version(:path)' where repo contains no special characters")
 	}
 
-	chart := matches[1]
-
-	ver, err := semver.NewVersion(matches[2])
-	if errors.Is(err, semver.ErrInvalidSemVer) {
-		return nil, fmt.Errorf("version is invalid: %s", matches[2])
-	} else if err != nil {
-		return nil, fmt.Errorf("error parsing semver: %s", err)
-	}
+	chart, ver := matches[1], matches[2]
 
 	directory := ""
 	if len(matches) == 4 {
@@ -323,7 +314,7 @@ func parseReq(s string) (*Requirement, error) {
 
 	return &Requirement{
 		Chart:     chart,
-		Version:   *ver,
+		Version:   ver,
 		Directory: directory,
 	}, nil
 }
diff --git a/pkg/helm/helm.go b/pkg/helm/helm.go
index edaa7631..407cd6be 100644
--- a/pkg/helm/helm.go
+++ b/pkg/helm/helm.go
@@ -7,8 +7,10 @@ import (
 	"os"
 	"os/exec"
 	"path/filepath"
+	"strings"
 
 	"github.com/grafana/tanka/pkg/kubernetes/manifest"
+	"github.com/rs/zerolog/log"
 )
 
 // Helm provides high level access to some Helm operations
@@ -60,7 +62,18 @@ func (e ExecHelm) Pull(chart, version string, opts PullOpts) error {
 	}
 	defer os.RemoveAll(tempDir)
 
-	cmd := e.cmd("pull", chart,
+	chartPullPath := chart
+	chartRepoName, chartName := parseReqRepo(chart), parseReqName(chart)
+	for _, configuredRepo := range opts.Repositories {
+		if configuredRepo.Name == chartRepoName {
+			// OCI images are pulled with their full path
+			if strings.HasPrefix(configuredRepo.URL, "oci://") {
+				chartPullPath = fmt.Sprintf("%s/%s", configuredRepo.URL, chartName)
+			}
+		}
+	}
+
+	cmd := e.cmd("pull", chartPullPath,
 		"--version", version,
 		"--repository-config", repoFile,
 		"--destination", tempDir,
@@ -71,8 +84,6 @@ func (e ExecHelm) Pull(chart, version string, opts PullOpts) error {
 		return err
 	}
 
-	chartName := parseReqName(chart)
-
 	if opts.ExtractDirectory == "" {
 		opts.ExtractDirectory = chartName
 	}
@@ -121,6 +132,7 @@ func (e ExecHelm) ChartExists(chart string, opts *JsonnetOpts) (string, error) {
 func (e ExecHelm) cmd(action string, args ...string) *exec.Cmd {
 	argv := []string{action}
 	argv = append(argv, args...)
+	log.Debug().Strs("argv", argv).Msg("running helm")
 
 	cmd := helmCmd(argv...)
 	cmd.Stderr = os.Stderr
diff --git a/pkg/helm/spec.go b/pkg/helm/spec.go
index 9092d72c..edd449c1 100644
--- a/pkg/helm/spec.go
+++ b/pkg/helm/spec.go
@@ -3,8 +3,6 @@ package helm
 import (
 	"fmt"
 	"strings"
-
-	"github.com/Masterminds/semver"
 )
 
 const (
@@ -73,9 +71,9 @@ func (r Repos) HasName(repoName string) bool {
 // Requirement describes a single required Helm Chart.
 // Both, Chart and Version are required
 type Requirement struct {
-	Chart     string         `json:"chart"`
-	Version   semver.Version `json:"version"`
-	Directory string         `json:"directory,omitempty"`
+	Chart     string `json:"chart"`
+	Version   string `json:"version"`
+	Directory string `json:"directory,omitempty"`
 }
 
 func (r Requirement) String() string {
@@ -83,7 +81,7 @@ func (r Requirement) String() string {
 	if dir == "" {
 		dir = parseReqName(r.Chart)
 	}
-	return fmt.Sprintf("%s@%s (dir: %s)", r.Chart, r.Version.String(), dir)
+	return fmt.Sprintf("%s@%s (dir: %s)", r.Chart, r.Version, dir)
 }
 
 // Requirements is an aggregate of all required Charts
@@ -115,7 +113,7 @@ func (r Requirements) Validate() error {
 			dir = parseReqName(req.Chart)
 		}
 		if previous, ok := outputDirs[dir]; ok {
-			errs = append(errs, fmt.Sprintf(`output directory %q is used twice, by charts "%s@%s" and "%s@%s"`, dir, previous.Chart, previous.Version.String(), req.Chart, req.Version.String()))
+			errs = append(errs, fmt.Sprintf(`output directory %q is used twice, by charts "%s@%s" and "%s@%s"`, dir, previous.Chart, previous.Version, req.Chart, req.Version))
 		}
 		outputDirs[dir] = req
 	}


Test patch:
diff --git a/pkg/helm/charts_test.go b/pkg/helm/charts_test.go
index b5a1f9c9..834a45cf 100644
--- a/pkg/helm/charts_test.go
+++ b/pkg/helm/charts_test.go
@@ -7,7 +7,6 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/Masterminds/semver"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
@@ -24,21 +23,16 @@ func TestParseReq(t *testing.T) {
 			input: "stable/package@1.0.0",
 			expected: &Requirement{
 				Chart:     "stable/package",
-				Version:   *semver.MustParse("1.0.0"),
+				Version:   "1.0.0",
 				Directory: "",
 			},
 		},
-		{
-			name:  "invalid-semver",
-			input: "stable/package@not-semver",
-			err:   fmt.Errorf("version is invalid: not-semver"),
-		},
 		{
 			name:  "with-path",
 			input: "stable/package-name@1.0.0:my-path",
 			expected: &Requirement{
 				Chart:     "stable/package-name",
-				Version:   *semver.MustParse("1.0.0"),
+				Version:   "1.0.0",
 				Directory: "my-path",
 			},
 		},
@@ -47,7 +41,7 @@ func TestParseReq(t *testing.T) {
 			input: "stable/package@v1.24.0:my weird-path_test",
 			expected: &Requirement{
 				Chart:     "stable/package",
-				Version:   *semver.MustParse("v1.24.0"),
+				Version:   "v1.24.0",
 				Directory: "my weird-path_test",
 			},
 		},
@@ -126,6 +120,24 @@ func TestAdd(t *testing.T) {
 	assert.Contains(t, string(chartContent), `version: 11.12.0`)
 }
 
+func TestAddOCI(t *testing.T) {
+	tempDir := t.TempDir()
+	c, err := InitChartfile(filepath.Join(tempDir, Filename))
+	require.NoError(t, err)
+
+	err = c.AddRepos(Repo{Name: "karpenter", URL: "oci://public.ecr.aws/karpenter"})
+	assert.NoError(t, err)
+
+	err = c.Add([]string{"karpenter/karpenter@v0.27.1"})
+	assert.NoError(t, err)
+
+	// Check file contents
+	listResult, err := os.ReadDir(filepath.Join(tempDir, "charts"))
+	assert.NoError(t, err)
+	assert.Equal(t, 1, len(listResult))
+	assert.Equal(t, "karpenter", listResult[0].Name())
+}
+
 func TestRevendorDeletedFiles(t *testing.T) {
 	tempDir := t.TempDir()
 	c, err := InitChartfile(filepath.Join(tempDir, Filename))
@@ -202,7 +214,7 @@ func TestInvalidChartName(t *testing.T) {
 
 	c.Manifest.Requires = append(c.Manifest.Requires, Requirement{
 		Chart:   "noslash",
-		Version: *semver.MustParse("1.0.0"),
+		Version: "1.0.0",
 	})
 
 	err = c.Vendor(false)