@sanity/pkg-utils 6.8.9 → 6.8.10-canary.1
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/init.cjs +27 -62
- package/dist/_chunks-cjs/init.cjs.map +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/index.js +30 -64
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/node/templates/default/template.ts +15 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/pkg-utils",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.10-canary.1",
|
|
4
4
|
"description": "Simple utilities for modern npm packages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity-io",
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
"@rollup/plugin-replace": "^5.0.5",
|
|
81
81
|
"@rollup/plugin-terser": "^0.4.4",
|
|
82
82
|
"@sanity/browserslist-config": "^1.0.3",
|
|
83
|
+
"@sanity/prettier-config": "^1.0.2",
|
|
83
84
|
"browserslist": "^4.23.0",
|
|
84
85
|
"cac": "^6.7.14",
|
|
85
86
|
"chalk": "^4.1.2",
|
|
@@ -111,7 +112,6 @@
|
|
|
111
112
|
"devDependencies": {
|
|
112
113
|
"@commitlint/cli": "^19.3.0",
|
|
113
114
|
"@commitlint/config-conventional": "^19.2.2",
|
|
114
|
-
"@sanity/prettier-config": "^1.0.2",
|
|
115
115
|
"@types/babel__core": "^7.20.5",
|
|
116
116
|
"@types/cpx": "^1.5.5",
|
|
117
117
|
"@types/find-config": "^1.0.4",
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"eslint-config-prettier": "^9.1.0",
|
|
134
134
|
"eslint-plugin-import": "^2.29.1",
|
|
135
135
|
"eslint-plugin-prettier": "^5.1.3",
|
|
136
|
-
"eslint-plugin-simple-import-sort": "12.1.0",
|
|
136
|
+
"eslint-plugin-simple-import-sort": "^12.1.0",
|
|
137
137
|
"husky": "^8.0.3",
|
|
138
138
|
"lint-staged": "^15.0.2",
|
|
139
139
|
"npm-run-all2": "^6.1.2",
|
|
@@ -142,9 +142,9 @@
|
|
|
142
142
|
"semver": "^7.6.0",
|
|
143
143
|
"ts-node": "^10.9.2",
|
|
144
144
|
"typescript": "5.4.5",
|
|
145
|
-
"vitest": "^1.5.
|
|
145
|
+
"vitest": "^1.5.3",
|
|
146
146
|
"vitest-github-actions-reporter": "^0.11.1",
|
|
147
|
-
"@sanity/pkg-utils": "6.8.
|
|
147
|
+
"@sanity/pkg-utils": "6.8.10-canary.1"
|
|
148
148
|
},
|
|
149
149
|
"peerDependencies": {
|
|
150
150
|
"typescript": "5.4.x"
|
|
@@ -151,9 +151,7 @@ export const defaultTemplate: PkgTemplate = async ({cwd, logger, packagePath}) =
|
|
|
151
151
|
'type': 'module',
|
|
152
152
|
'exports': {
|
|
153
153
|
'.': {
|
|
154
|
-
types: undefined,
|
|
155
154
|
source: features['typescript'] ? './src/index.ts' : './src/index.js',
|
|
156
|
-
import: './dist/index.js',
|
|
157
155
|
require: './dist/index.cjs',
|
|
158
156
|
default: './dist/index.js',
|
|
159
157
|
},
|
|
@@ -161,28 +159,23 @@ export const defaultTemplate: PkgTemplate = async ({cwd, logger, packagePath}) =
|
|
|
161
159
|
},
|
|
162
160
|
'main': './dist/index.cjs',
|
|
163
161
|
'module': './dist/index.js',
|
|
164
|
-
'source': features['typescript'] ? './src/index.ts' : './src/index.js',
|
|
165
162
|
'types': undefined,
|
|
166
163
|
'files': ['dist', 'src'],
|
|
167
164
|
'scripts': {
|
|
168
|
-
|
|
169
|
-
'
|
|
170
|
-
'format': features['prettier']
|
|
171
|
-
? 'prettier --write --cache --ignore-unknown .'
|
|
172
|
-
: undefined,
|
|
173
|
-
'pkg:build': 'pkg build --strict',
|
|
174
|
-
'pkg:check': 'pkg check --strict',
|
|
165
|
+
build: 'pkg build --strict --clean --check',
|
|
166
|
+
format: features['prettier'] ? 'prettier --write --cache --ignore-unknown .' : undefined,
|
|
175
167
|
},
|
|
176
168
|
'lint-staged': features['prettier']
|
|
177
169
|
? {
|
|
178
170
|
'*': ['prettier --write --cache --ignore-unknown'],
|
|
179
171
|
}
|
|
180
172
|
: undefined,
|
|
181
|
-
'prettier': features['prettier'] ? '@sanity/prettier-config' : undefined,
|
|
182
173
|
'browserslist': 'extends @sanity/browserslist-config',
|
|
174
|
+
'prettier': features['prettier'] ? '@sanity/prettier-config' : undefined,
|
|
183
175
|
'dependencies': {},
|
|
184
176
|
'devDependencies': {
|
|
185
|
-
'@sanity/pkg-utils': '
|
|
177
|
+
'@sanity/pkg-utils': '^6',
|
|
178
|
+
'@sanity/prettier-config': features['prettier'] ? '^1' : undefined,
|
|
186
179
|
'@typescript-eslint/eslint-plugin': undefined,
|
|
187
180
|
'@typescript-eslint/parser': undefined,
|
|
188
181
|
'eslint': undefined,
|
|
@@ -190,11 +183,8 @@ export const defaultTemplate: PkgTemplate = async ({cwd, logger, packagePath}) =
|
|
|
190
183
|
'eslint-plugin-import': undefined,
|
|
191
184
|
'eslint-plugin-prettier': undefined,
|
|
192
185
|
'eslint-plugin-simple-import-sort': undefined,
|
|
193
|
-
'lint-staged': '
|
|
194
|
-
'
|
|
195
|
-
'prettier': features['prettier'] ? '*' : undefined,
|
|
196
|
-
'prettier-plugin-packagejson': features['prettier'] ? '*' : undefined,
|
|
197
|
-
'rimraf': '*',
|
|
186
|
+
'lint-staged': '^15',
|
|
187
|
+
'prettier': features['prettier'] ? '^3' : undefined,
|
|
198
188
|
'typescript': undefined,
|
|
199
189
|
},
|
|
200
190
|
'engines': {
|
|
@@ -267,7 +257,7 @@ export const defaultTemplate: PkgTemplate = async ({cwd, logger, packagePath}) =
|
|
|
267
257
|
const devDependencies = pkgJson.devDependencies
|
|
268
258
|
|
|
269
259
|
if (isRecord(devDependencies)) {
|
|
270
|
-
devDependencies['typescript'] = '
|
|
260
|
+
devDependencies['typescript'] = '^5.4'
|
|
271
261
|
}
|
|
272
262
|
}
|
|
273
263
|
|
|
@@ -320,18 +310,18 @@ export const defaultTemplate: PkgTemplate = async ({cwd, logger, packagePath}) =
|
|
|
320
310
|
|
|
321
311
|
pkgJson.devDependencies = {
|
|
322
312
|
...pkgJson.devDependencies,
|
|
323
|
-
'eslint': '
|
|
324
|
-
'eslint-config-prettier': features['prettier'] ? '
|
|
325
|
-
'eslint-plugin-
|
|
326
|
-
'eslint-plugin-
|
|
327
|
-
'eslint-plugin-
|
|
313
|
+
'eslint': '^8',
|
|
314
|
+
'eslint-config-prettier': features['prettier'] ? '^9' : undefined,
|
|
315
|
+
'eslint-plugin-import': '^2',
|
|
316
|
+
'eslint-plugin-prettier': features['prettier'] ? '^5' : undefined,
|
|
317
|
+
'eslint-plugin-simple-import-sort': '^12',
|
|
328
318
|
}
|
|
329
319
|
|
|
330
320
|
if (features['typescript']) {
|
|
331
321
|
pkgJson.devDependencies = {
|
|
332
322
|
...pkgJson.devDependencies,
|
|
333
|
-
'@typescript-eslint/eslint-plugin': '
|
|
334
|
-
'@typescript-eslint/parser': '
|
|
323
|
+
'@typescript-eslint/eslint-plugin': '^7',
|
|
324
|
+
'@typescript-eslint/parser': '^7',
|
|
335
325
|
}
|
|
336
326
|
|
|
337
327
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|