@sanity/pkg-utils 6.7.0 → 6.7.2
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.
- package/dist/_chunks-cjs/consoleSpy.cjs +1 -1
- package/dist/_chunks-cjs/consoleSpy.cjs.map +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
- package/src/node/core/pkg/parseExports.ts +4 -1
- package/tsconfig/recommended.json +7 -7
- package/tsconfig/strict.json +4 -4
- package/tsconfig/strictest.json +5 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/pkg-utils",
|
|
3
|
-
"version": "6.7.
|
|
3
|
+
"version": "6.7.2",
|
|
4
4
|
"description": "Simple utilities for modern npm packages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity-io",
|
|
@@ -31,8 +31,11 @@
|
|
|
31
31
|
"default": "./dist/index.js"
|
|
32
32
|
},
|
|
33
33
|
"./tsconfig/recommended.json": "./tsconfig/recommended.json",
|
|
34
|
+
"./tsconfig/recommended": "./tsconfig/recommended.json",
|
|
34
35
|
"./tsconfig/strict.json": "./tsconfig/strict.json",
|
|
36
|
+
"./tsconfig/strict": "./tsconfig/strict.json",
|
|
35
37
|
"./tsconfig/strictest.json": "./tsconfig/strictest.json",
|
|
38
|
+
"./tsconfig": "./tsconfig/strictest.json",
|
|
36
39
|
"./package.json": "./package.json"
|
|
37
40
|
},
|
|
38
41
|
"main": "./dist/index.cjs",
|
|
@@ -140,7 +143,7 @@
|
|
|
140
143
|
"typescript": "5.4.5",
|
|
141
144
|
"vitest": "^1.5.0",
|
|
142
145
|
"vitest-github-actions-reporter": "^0.11.1",
|
|
143
|
-
"@sanity/pkg-utils": "6.7.
|
|
146
|
+
"@sanity/pkg-utils": "6.7.2"
|
|
144
147
|
},
|
|
145
148
|
"peerDependencies": {
|
|
146
149
|
"typescript": "5.4.x"
|
|
@@ -163,7 +163,10 @@ export function parseExports(options: {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
for (const [exportPath, exportEntry] of Object.entries(pkg.exports)) {
|
|
166
|
-
if (
|
|
166
|
+
if (
|
|
167
|
+
exportPath.endsWith('.json') ||
|
|
168
|
+
(typeof exportEntry === 'string' && exportEntry.endsWith('.json'))
|
|
169
|
+
) {
|
|
167
170
|
if (exportPath === './package.json') {
|
|
168
171
|
if (exportEntry !== './package.json') {
|
|
169
172
|
errors.push('package.json: `exports["./package.json"] must be "./package.json".')
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
3
|
"description": "Sets the right defaults for usage with @sanity/pkg-utils and that JSX is compiled with esbuild, and ESM and CJS with rollup.",
|
|
4
4
|
"compilerOptions": {
|
|
5
|
-
"lib": ["ESNext"],
|
|
6
5
|
"target": "ESNext",
|
|
6
|
+
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
7
|
+
"jsx": "preserve",
|
|
7
8
|
"module": "Preserve",
|
|
9
|
+
"moduleDetection": "force",
|
|
8
10
|
"moduleResolution": "Bundler",
|
|
9
|
-
"
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
10
12
|
"resolveJsonModule": true,
|
|
11
|
-
"moduleDetection": "force",
|
|
12
|
-
"jsx": "preserve",
|
|
13
13
|
"allowJs": true,
|
|
14
14
|
"noEmit": true,
|
|
15
|
-
"
|
|
16
|
-
"
|
|
15
|
+
"allowSyntheticDefaultImports": true,
|
|
16
|
+
"esModuleInterop": true,
|
|
17
17
|
"forceConsistentCasingInFileNames": true,
|
|
18
|
-
"
|
|
18
|
+
"skipLibCheck": true
|
|
19
19
|
}
|
|
20
20
|
}
|
package/tsconfig/strict.json
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"extends": "./recommended.json",
|
|
5
5
|
"compilerOptions": {
|
|
6
6
|
"checkJs": true,
|
|
7
|
+
"isolatedModules": true,
|
|
8
|
+
"verbatimModuleSyntax": true,
|
|
7
9
|
"strict": true,
|
|
8
|
-
"noFallthroughCasesInSwitch": true,
|
|
9
10
|
"noUnusedLocals": true,
|
|
10
11
|
"noUnusedParameters": true,
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"verbatimModuleSyntax": true
|
|
12
|
+
"noFallthroughCasesInSwitch": true,
|
|
13
|
+
"noPropertyAccessFromIndexSignature": true
|
|
14
14
|
}
|
|
15
15
|
}
|
package/tsconfig/strictest.json
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
"description": "Stricter than strict",
|
|
4
4
|
"extends": "./strict.json",
|
|
5
5
|
"compilerOptions": {
|
|
6
|
+
"strictNullChecks": true,
|
|
7
|
+
"strictFunctionTypes": true,
|
|
8
|
+
"strictPropertyInitialization": true,
|
|
6
9
|
"alwaysStrict": true,
|
|
7
10
|
"noImplicitAny": true,
|
|
8
|
-
"noImplicitReturns": true,
|
|
9
11
|
"noImplicitThis": true,
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"strictPropertyInitialization": true
|
|
12
|
+
"noImplicitReturns": true,
|
|
13
|
+
"noImplicitOverride": true
|
|
13
14
|
}
|
|
14
15
|
}
|