create-sanity 5.2.1 → 5.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +12 -12
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {spawn} from 'node:child_process'
3
3
  import {readFile} from 'node:fs/promises'
4
- import {join} from 'node:path'
4
+ import {dirname, resolve} from 'node:path'
5
5
  import {fileURLToPath} from 'node:url'
6
6
 
7
7
  import {moduleResolve} from 'import-meta-resolve'
@@ -11,7 +11,7 @@ const args = process.argv.slice(2)
11
11
  let cliBin
12
12
  try {
13
13
  const cliPkgDir = fileURLToPath(await moduleResolve('@sanity/cli/package.json', import.meta.url))
14
- const cliDir = join(cliPkgDir, '..')
14
+ const cliDir = dirname(cliPkgDir)
15
15
 
16
16
  // Read the package.json file and extract the bin path
17
17
  const pJson = await readFile(cliPkgDir, 'utf8')
@@ -21,7 +21,7 @@ try {
21
21
  throw new Error('Failed to resolve `@sanity/cli` package')
22
22
  }
23
23
 
24
- cliBin = join(cliDir, binPath)
24
+ cliBin = resolve(cliDir, binPath)
25
25
  } catch (err) {
26
26
  throw new Error('Failed to resolve `@sanity/cli` package', {cause: err})
27
27
  }
package/package.json CHANGED
@@ -1,41 +1,41 @@
1
1
  {
2
2
  "name": "create-sanity",
3
- "version": "5.2.1",
3
+ "version": "5.2.3",
4
4
  "description": "Initialize a new Sanity project",
5
5
  "keywords": [
6
- "sanity",
7
6
  "cms",
7
+ "content",
8
+ "create-sanity",
8
9
  "headless",
9
10
  "realtime",
10
- "content",
11
- "create-sanity"
11
+ "sanity"
12
12
  ],
13
13
  "homepage": "https://www.sanity.io/",
14
14
  "bugs": {
15
15
  "url": "https://github.com/sanity-io/cli/issues"
16
16
  },
17
+ "license": "MIT",
18
+ "author": "Sanity.io <hello@sanity.io>",
17
19
  "repository": {
18
20
  "type": "git",
19
21
  "url": "git+https://github.com/sanity-io/cli.git",
20
22
  "directory": "packages/create-sanity"
21
23
  },
22
- "license": "MIT",
23
- "author": "Sanity.io <hello@sanity.io>",
24
- "type": "module",
25
24
  "bin": "./index.js",
26
25
  "files": [
27
26
  "index.js"
28
27
  ],
28
+ "type": "module",
29
29
  "dependencies": {
30
- "@sanity/cli": "^5.4.0",
31
- "import-meta-resolve": "^4.1.0"
30
+ "import-meta-resolve": "^4.2.0",
31
+ "@sanity/cli": "6.1.3"
32
32
  },
33
33
  "devDependencies": {
34
- "publint": "^0.3.16",
35
- "vitest": "^4.0.17"
34
+ "publint": "^0.3.18",
35
+ "vitest": "^4.0.18"
36
36
  },
37
37
  "engines": {
38
- "node": ">=20"
38
+ "node": ">=20.19.1 <22 || >=22.12"
39
39
  },
40
40
  "scripts": {
41
41
  "publint": "publint",