@ryanatkn/gro 0.141.1 → 0.142.0
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/changeset.task.d.ts.map +1 -1
- package/dist/changeset.task.js +2 -2
- package/dist/filer.d.ts +7 -0
- package/dist/filer.d.ts.map +1 -1
- package/dist/filer.js +28 -29
- package/dist/gro_config.d.ts +5 -0
- package/dist/gro_config.d.ts.map +1 -1
- package/dist/gro_config.js +3 -1
- package/dist/gro_plugin_sveltekit_library.js +4 -4
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +22 -16
- package/dist/moss_helpers.d.ts.map +1 -1
- package/dist/moss_helpers.js +2 -1
- package/dist/package.d.ts +326 -164
- package/dist/package.d.ts.map +1 -1
- package/dist/package.js +15 -15
- package/dist/package_json.d.ts +9 -6
- package/dist/package_json.d.ts.map +1 -1
- package/dist/package_json.js +19 -4
- package/dist/publish.task.d.ts.map +1 -1
- package/dist/publish.task.js +3 -8
- package/dist/reinstall.task.js +4 -4
- package/dist/resolve_node_specifier.d.ts +7 -1
- package/dist/resolve_node_specifier.d.ts.map +1 -1
- package/dist/resolve_node_specifier.js +77 -13
- package/dist/resolve_specifier.d.ts +2 -6
- package/dist/resolve_specifier.d.ts.map +1 -1
- package/dist/resolve_specifier.js +2 -6
- package/dist/src_json.d.ts +39 -3
- package/dist/src_json.d.ts.map +1 -1
- package/dist/sveltekit_config.d.ts +1 -1
- package/dist/sveltekit_config.d.ts.map +1 -1
- package/dist/sync.task.js +1 -1
- package/dist/upgrade.task.d.ts.map +1 -1
- package/dist/upgrade.task.js +4 -2
- package/dist/watch_dir.d.ts.map +1 -1
- package/dist/watch_dir.js +5 -5
- package/package.json +14 -14
- package/src/lib/changeset.task.ts +2 -1
- package/src/lib/filer.ts +37 -27
- package/src/lib/gro_config.ts +8 -0
- package/src/lib/gro_plugin_sveltekit_library.ts +4 -4
- package/src/lib/loader.ts +24 -16
- package/src/lib/moss_helpers.ts +2 -1
- package/src/lib/package.ts +15 -15
- package/src/lib/package_json.ts +21 -4
- package/src/lib/publish.task.ts +3 -9
- package/src/lib/reinstall.task.ts +4 -4
- package/src/lib/resolve_node_specifier.ts +99 -17
- package/src/lib/resolve_specifier.ts +2 -6
- package/src/lib/sveltekit_config.ts +1 -1
- package/src/lib/sync.task.ts +1 -1
- package/src/lib/upgrade.task.ts +4 -2
- package/src/lib/watch_dir.ts +6 -6
package/dist/package.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.d.ts","sourceRoot":"../src/lib/","sources":["package.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuQD,CAAC;AAEzB,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"../src/lib/","sources":["package.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAswBD,CAAC"}
|
package/dist/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// generated by src/lib/package.gen.ts
|
|
2
2
|
export const package_json = {
|
|
3
3
|
name: '@ryanatkn/gro',
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.142.0',
|
|
5
5
|
description: 'task runner and toolkit extending SvelteKit',
|
|
6
6
|
motto: 'generate, run, optimize',
|
|
7
7
|
glyph: '🌰',
|
|
@@ -48,7 +48,7 @@ export const package_json = {
|
|
|
48
48
|
prettier: '^3.3.3',
|
|
49
49
|
'prettier-plugin-svelte': '^3.2.7',
|
|
50
50
|
'ts-morph': '^24.0.0',
|
|
51
|
-
tslib: '^2.
|
|
51
|
+
tslib: '^2.8.0',
|
|
52
52
|
zod: '^3.23.8',
|
|
53
53
|
},
|
|
54
54
|
peerDependencies: { esbuild: '^0.21.0', svelte: '^5.0.0-next.0' },
|
|
@@ -56,21 +56,21 @@ export const package_json = {
|
|
|
56
56
|
'@changesets/changelog-git': '^0.2.0',
|
|
57
57
|
'@changesets/types': '^6.0.0',
|
|
58
58
|
'@ryanatkn/eslint-config': '^0.5.5',
|
|
59
|
-
'@ryanatkn/fuz': '^0.129.
|
|
60
|
-
'@ryanatkn/moss': '^0.18.
|
|
61
|
-
'@sveltejs/adapter-static': '^3.0.
|
|
62
|
-
'@sveltejs/kit': '^2.
|
|
63
|
-
'@sveltejs/package': '^2.3.
|
|
64
|
-
'@sveltejs/vite-plugin-svelte': '^4.0.0
|
|
59
|
+
'@ryanatkn/fuz': '^0.129.5',
|
|
60
|
+
'@ryanatkn/moss': '^0.18.2',
|
|
61
|
+
'@sveltejs/adapter-static': '^3.0.6',
|
|
62
|
+
'@sveltejs/kit': '^2.7.3',
|
|
63
|
+
'@sveltejs/package': '^2.3.7',
|
|
64
|
+
'@sveltejs/vite-plugin-svelte': '^4.0.0',
|
|
65
65
|
'@types/fs-extra': '^11.0.4',
|
|
66
|
-
'@types/node': '^22.
|
|
66
|
+
'@types/node': '^22.8.1',
|
|
67
67
|
esbuild: '^0.21.5',
|
|
68
|
-
eslint: '^9.
|
|
69
|
-
'eslint-plugin-svelte': '^2.
|
|
70
|
-
svelte: '^5.
|
|
71
|
-
'svelte-check': '^4.0.
|
|
68
|
+
eslint: '^9.13.0',
|
|
69
|
+
'eslint-plugin-svelte': '^2.46.0',
|
|
70
|
+
svelte: '^5.1.3',
|
|
71
|
+
'svelte-check': '^4.0.5',
|
|
72
72
|
typescript: '^5.6.3',
|
|
73
|
-
'typescript-eslint': '^8.
|
|
73
|
+
'typescript-eslint': '^8.11.0',
|
|
74
74
|
uvu: '^0.5.6',
|
|
75
75
|
},
|
|
76
76
|
prettier: {
|
|
@@ -264,7 +264,7 @@ export const package_json = {
|
|
|
264
264
|
};
|
|
265
265
|
export const src_json = {
|
|
266
266
|
name: '@ryanatkn/gro',
|
|
267
|
-
version: '0.
|
|
267
|
+
version: '0.142.0',
|
|
268
268
|
modules: {
|
|
269
269
|
'.': {
|
|
270
270
|
path: 'index.ts',
|
package/dist/package_json.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const Url: z.ZodString;
|
|
|
5
5
|
export type Url = Flavored<z.infer<typeof Url>, 'Url'>;
|
|
6
6
|
export declare const Email: z.ZodString;
|
|
7
7
|
export type Email = Flavored<z.infer<typeof Email>, 'Email'>;
|
|
8
|
-
export declare const transform_empty_object_to_undefined: (val:
|
|
8
|
+
export declare const transform_empty_object_to_undefined: <T>(val: T) => T | undefined;
|
|
9
9
|
export declare const Package_Json_Repository: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
10
10
|
type: z.ZodString;
|
|
11
11
|
url: z.ZodString;
|
|
@@ -45,7 +45,7 @@ export declare const Package_Json_Funding: z.ZodUnion<[z.ZodString, z.ZodObject<
|
|
|
45
45
|
url: z.ZodString;
|
|
46
46
|
}, z.ZodTypeAny, "passthrough">>]>;
|
|
47
47
|
export type Package_Json_Funding = z.infer<typeof Package_Json_Funding>;
|
|
48
|
-
export declare const Package_Json_Exports: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString
|
|
48
|
+
export declare const Package_Json_Exports: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>>]>>>;
|
|
49
49
|
export type Package_Json_Exports = z.infer<typeof Package_Json_Exports>;
|
|
50
50
|
/**
|
|
51
51
|
* @see https://docs.npmjs.com/cli/v10/configuring-npm/package-json
|
|
@@ -150,7 +150,8 @@ export declare const Package_Json: z.ZodObject<{
|
|
|
150
150
|
bin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
151
151
|
sideEffects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
152
152
|
files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
153
|
-
|
|
153
|
+
main: z.ZodOptional<z.ZodString>;
|
|
154
|
+
exports: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>>]>>>, Record<string, string | Record<string, string | undefined> | Record<string, Record<string, string | undefined> | undefined> | undefined> | undefined, Record<string, string | Record<string, string | undefined> | Record<string, Record<string, string | undefined> | undefined> | undefined>>>;
|
|
154
155
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
155
156
|
name: z.ZodString;
|
|
156
157
|
version: z.ZodString;
|
|
@@ -251,7 +252,8 @@ export declare const Package_Json: z.ZodObject<{
|
|
|
251
252
|
bin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
252
253
|
sideEffects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
253
254
|
files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
254
|
-
|
|
255
|
+
main: z.ZodOptional<z.ZodString>;
|
|
256
|
+
exports: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>>]>>>, Record<string, string | Record<string, string | undefined> | Record<string, Record<string, string | undefined> | undefined> | undefined> | undefined, Record<string, string | Record<string, string | undefined> | Record<string, Record<string, string | undefined> | undefined> | undefined>>>;
|
|
255
257
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
256
258
|
name: z.ZodString;
|
|
257
259
|
version: z.ZodString;
|
|
@@ -352,12 +354,13 @@ export declare const Package_Json: z.ZodObject<{
|
|
|
352
354
|
bin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
353
355
|
sideEffects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
354
356
|
files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
355
|
-
|
|
357
|
+
main: z.ZodOptional<z.ZodString>;
|
|
358
|
+
exports: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>>]>>>, Record<string, string | Record<string, string | undefined> | Record<string, Record<string, string | undefined> | undefined> | undefined> | undefined, Record<string, string | Record<string, string | undefined> | Record<string, Record<string, string | undefined> | undefined> | undefined>>>;
|
|
356
359
|
}, z.ZodTypeAny, "passthrough">>;
|
|
357
360
|
export type Package_Json = z.infer<typeof Package_Json>;
|
|
358
361
|
export type Map_Package_Json = (package_json: Package_Json) => Package_Json | null | Promise<Package_Json | null>;
|
|
359
362
|
export declare const EMPTY_PACKAGE_JSON: Package_Json;
|
|
360
|
-
export declare const load_package_json: (dir?: string, cache?: Record<string, Package_Json
|
|
363
|
+
export declare const load_package_json: (dir?: string, cache?: Record<string, Package_Json>, parse?: boolean) => Package_Json;
|
|
361
364
|
export declare const sync_package_json: (map_package_json: Map_Package_Json, log: Logger, check?: boolean, dir?: string, exports_dir?: string) => Promise<{
|
|
362
365
|
package_json: Package_Json | null;
|
|
363
366
|
changed: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package_json.d.ts","sourceRoot":"../src/lib/","sources":["package_json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAUtD,eAAO,MAAM,GAAG,aAAa,CAAC;AAC9B,MAAM,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;AAGvD,eAAO,MAAM,KAAK,aAAa,CAAC;AAChC,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;AAG7D,eAAO,MAAM,mCAAmC,
|
|
1
|
+
{"version":3,"file":"package_json.d.ts","sourceRoot":"../src/lib/","sources":["package_json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO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A;CAAC,GAAG,SAgBlC,CAAC;AA8BF,eAAO,MAAM,OAAO,aACT,MAAM,iBACF,YAAY,KACxB,OAGyC,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,YAAY,iBAAkB,YAAY,KAAG,gBAAgB,EAezE,CAAC"}
|
package/dist/package_json.js
CHANGED
|
@@ -48,7 +48,18 @@ export const Package_Json_Funding = z.union([
|
|
|
48
48
|
})
|
|
49
49
|
.passthrough(),
|
|
50
50
|
]);
|
|
51
|
-
|
|
51
|
+
// exports: {
|
|
52
|
+
// './': './index.js',
|
|
53
|
+
// './record': {default: './record.js'},
|
|
54
|
+
// './export_condition': {default: {development: './ec1', default: './ec2.js'}},
|
|
55
|
+
// }
|
|
56
|
+
export const Package_Json_Exports = z.record(z
|
|
57
|
+
.union([
|
|
58
|
+
z.string(),
|
|
59
|
+
z.record(z.string().optional()),
|
|
60
|
+
z.record(z.record(z.string().optional()).optional()),
|
|
61
|
+
])
|
|
62
|
+
.optional());
|
|
52
63
|
/**
|
|
53
64
|
* @see https://docs.npmjs.com/cli/v10/configuring-npm/package-json
|
|
54
65
|
*/
|
|
@@ -106,11 +117,12 @@ export const Package_Json = z
|
|
|
106
117
|
bin: z.record(z.string()).optional(),
|
|
107
118
|
sideEffects: z.array(z.string()).optional(),
|
|
108
119
|
files: z.array(z.string()).optional(),
|
|
120
|
+
main: z.string().optional(),
|
|
109
121
|
exports: Package_Json_Exports.transform(transform_empty_object_to_undefined).optional(),
|
|
110
122
|
})
|
|
111
123
|
.passthrough();
|
|
112
124
|
export const EMPTY_PACKAGE_JSON = { name: '', version: '' };
|
|
113
|
-
export const load_package_json = (dir = IS_THIS_GRO ? gro_paths.root : paths.root, cache) => {
|
|
125
|
+
export const load_package_json = (dir = IS_THIS_GRO ? gro_paths.root : paths.root, cache, parse = true) => {
|
|
114
126
|
let package_json;
|
|
115
127
|
if (cache && dir in cache) {
|
|
116
128
|
return cache[dir];
|
|
@@ -121,9 +133,12 @@ export const load_package_json = (dir = IS_THIS_GRO ? gro_paths.root : paths.roo
|
|
|
121
133
|
catch (_err) {
|
|
122
134
|
return EMPTY_PACKAGE_JSON;
|
|
123
135
|
}
|
|
124
|
-
|
|
125
|
-
|
|
136
|
+
if (parse) {
|
|
137
|
+
package_json = parse_package_json(Package_Json, package_json);
|
|
138
|
+
}
|
|
139
|
+
if (cache) {
|
|
126
140
|
cache[dir] = package_json;
|
|
141
|
+
}
|
|
127
142
|
return package_json;
|
|
128
143
|
};
|
|
129
144
|
export const sync_package_json = async (map_package_json, log, check = false, dir = paths.root, exports_dir = paths.lib) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.task.d.ts","sourceRoot":"../src/lib/","sources":["publish.task.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"publish.task.d.ts","sourceRoot":"../src/lib/","sources":["publish.task.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAuBhD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BP,CAAC;AACX,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CA0I3B,CAAC"}
|
package/dist/publish.task.js
CHANGED
|
@@ -5,7 +5,6 @@ import { existsSync } from 'node:fs';
|
|
|
5
5
|
import { Task_Error } from './task.js';
|
|
6
6
|
import { load_package_json, parse_repo_url } from './package_json.js';
|
|
7
7
|
import { find_cli, spawn_cli } from './cli.js';
|
|
8
|
-
import { IS_THIS_GRO } from './paths.js';
|
|
9
8
|
import { has_sveltekit_library } from './sveltekit_helpers.js';
|
|
10
9
|
import { update_changelog } from './changelog.js';
|
|
11
10
|
import { load_from_env } from './env.js';
|
|
@@ -56,10 +55,6 @@ export const task = {
|
|
|
56
55
|
if (!has_sveltekit_library_result.ok) {
|
|
57
56
|
throw new Task_Error('Failed to find SvelteKit library: ' + has_sveltekit_library_result.message);
|
|
58
57
|
}
|
|
59
|
-
// TODO hacky, ensures Gro bootstraps itself
|
|
60
|
-
if (IS_THIS_GRO) {
|
|
61
|
-
await spawn('npm', ['run', 'build']);
|
|
62
|
-
}
|
|
63
58
|
const changelog_exists = existsSync(changelog);
|
|
64
59
|
const found_changeset_cli = find_cli(changeset_cli);
|
|
65
60
|
if (!found_changeset_cli) {
|
|
@@ -100,9 +95,9 @@ export const task = {
|
|
|
100
95
|
' or an object with the `url` key');
|
|
101
96
|
}
|
|
102
97
|
// This is the first line that alters the repo.
|
|
103
|
-
const
|
|
104
|
-
if (!
|
|
105
|
-
throw Error('
|
|
98
|
+
const changeset_ersion_result = await spawn_cli(found_changeset_cli, ['version'], log);
|
|
99
|
+
if (!changeset_ersion_result?.ok) {
|
|
100
|
+
throw Error('changeset version failed: no commits were made: see the error above');
|
|
106
101
|
}
|
|
107
102
|
if (!preserve_changelog) {
|
|
108
103
|
const token = load_from_env('GITHUB_TOKEN_SECRET');
|
package/dist/reinstall.task.js
CHANGED
|
@@ -7,16 +7,16 @@ export const Args = z.object({}).strict();
|
|
|
7
7
|
export const task = {
|
|
8
8
|
summary: `refreshes ${LOCKFILE_FILENAME} with the latest and cleanest deps`,
|
|
9
9
|
Args,
|
|
10
|
-
run: async ({ log }) => {
|
|
10
|
+
run: async ({ log, config }) => {
|
|
11
11
|
log.info('running the initial npm install');
|
|
12
|
-
const initial_install_result = await spawn(
|
|
12
|
+
const initial_install_result = await spawn(config.pm_cli, ['i']);
|
|
13
13
|
if (!initial_install_result.ok) {
|
|
14
14
|
throw new Task_Error('Failed initial npm install');
|
|
15
15
|
}
|
|
16
16
|
// Deleting both the lockfile and node_modules upgrades to the latest minor/patch versions.
|
|
17
17
|
await Promise.all([rm(LOCKFILE_FILENAME), rm(NODE_MODULES_DIRNAME, { recursive: true })]);
|
|
18
18
|
log.info(`running npm install after deleting ${LOCKFILE_FILENAME} and ${NODE_MODULES_DIRNAME}, this can take a while...`);
|
|
19
|
-
const second_install_result = await spawn(
|
|
19
|
+
const second_install_result = await spawn(config.pm_cli, ['i']);
|
|
20
20
|
if (!second_install_result.ok) {
|
|
21
21
|
throw new Task_Error(`Failed npm install after deleting ${LOCKFILE_FILENAME} and ${NODE_MODULES_DIRNAME}`);
|
|
22
22
|
}
|
|
@@ -24,7 +24,7 @@ export const task = {
|
|
|
24
24
|
// like esbuild's many packages for each platform.
|
|
25
25
|
await rm(LOCKFILE_FILENAME);
|
|
26
26
|
log.info(`running npm install one last time to clean ${LOCKFILE_FILENAME}`);
|
|
27
|
-
const final_install_result = await spawn(
|
|
27
|
+
const final_install_result = await spawn(config.pm_cli, ['i']);
|
|
28
28
|
if (!final_install_result.ok) {
|
|
29
29
|
throw new Task_Error('Failed npm install');
|
|
30
30
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { Package_Json } from './package_json.js';
|
|
2
2
|
import type { Resolved_Specifier } from './resolve_specifier.js';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Like `resolve_specifier` but for Node specifiers,
|
|
5
|
+
* typically those that aren't relative or absolute.
|
|
6
|
+
* Optionally return `null` instead of throwing by setting
|
|
7
|
+
* `throw_on_missing_package` to `false`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const resolve_node_specifier: (specifier: string, dir?: string, parent_path?: string, cache?: Record<string, Package_Json>, throw_on_missing_package?: boolean, exports_condition?: string) => Resolved_Specifier | null;
|
|
4
10
|
//# sourceMappingURL=resolve_node_specifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve_node_specifier.d.ts","sourceRoot":"../src/lib/","sources":["resolve_node_specifier.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve_node_specifier.d.ts","sourceRoot":"../src/lib/","sources":["resolve_node_specifier.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,YAAY,EAA0C,MAAM,mBAAmB,CAAC;AAGxF,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,cACvB,MAAM,8BAEH,MAAM,UACZ,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,qEAIlC,kBAAkB,GAAG,IAqEvB,CAAC"}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
|
-
import {
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
import { DEV } from 'esm-env';
|
|
4
|
+
import { Package_Json, Package_Json_Exports, load_package_json } from './package_json.js';
|
|
3
5
|
import { paths } from './paths.js';
|
|
4
6
|
import { NODE_MODULES_DIRNAME } from './path_constants.js';
|
|
5
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Like `resolve_specifier` but for Node specifiers,
|
|
9
|
+
* typically those that aren't relative or absolute.
|
|
10
|
+
* Optionally return `null` instead of throwing by setting
|
|
11
|
+
* `throw_on_missing_package` to `false`.
|
|
12
|
+
*/
|
|
13
|
+
export const resolve_node_specifier = (specifier, dir = paths.root, parent_path, cache, throw_on_missing_package = true,
|
|
14
|
+
// TODO this needs to use `--conditions`/`-C` to determine the correct key
|
|
15
|
+
exports_condition = DEV ? 'development' : 'default') => {
|
|
6
16
|
const raw = specifier.endsWith('?raw');
|
|
7
17
|
const mapped_specifier = raw ? specifier.substring(0, specifier.length - 4) : specifier;
|
|
8
|
-
|
|
18
|
+
// Parse the specifier
|
|
19
|
+
let idx = -1;
|
|
9
20
|
if (mapped_specifier[0] === '@') {
|
|
10
21
|
// get the index of the second `/`
|
|
11
22
|
let count = 0;
|
|
@@ -21,18 +32,42 @@ export const resolve_node_specifier = (specifier, dir = paths.root, parent_url,
|
|
|
21
32
|
else {
|
|
22
33
|
idx = mapped_specifier.indexOf('/');
|
|
23
34
|
}
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const subpath = './' +
|
|
27
|
-
const package_dir = join(dir, NODE_MODULES_DIRNAME,
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
const pkg_name = idx === -1 ? mapped_specifier : mapped_specifier.substring(0, idx);
|
|
36
|
+
const module_path = idx === -1 ? '' : mapped_specifier.substring(idx + 1);
|
|
37
|
+
const subpath = module_path ? './' + module_path : '.';
|
|
38
|
+
const package_dir = join(dir, NODE_MODULES_DIRNAME, pkg_name);
|
|
39
|
+
if (!existsSync(package_dir)) {
|
|
40
|
+
if (throw_on_missing_package) {
|
|
41
|
+
throw Error(`Package not found at ${package_dir} for specifier ${specifier}, you may need to npm install or fix the path` +
|
|
42
|
+
(parent_path ? ` imported from ${parent_path}` : ''));
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const package_json = load_package_json(package_dir, cache, false);
|
|
49
|
+
const { exported, exports_key } = resolve_subpath(package_json, specifier, subpath);
|
|
30
50
|
if (!exported) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
(
|
|
51
|
+
if (throw_on_missing_package) {
|
|
52
|
+
// same error message as Node
|
|
53
|
+
throw Error(`[ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath '${subpath}' is not defined by 'exports' in ${package_dir}/package.json` +
|
|
54
|
+
(parent_path ? ` imported from ${parent_path}` : ''));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
34
59
|
}
|
|
35
|
-
const
|
|
60
|
+
const exported_value = resolve_exported_value(exported, exports_key, exports_condition);
|
|
61
|
+
if (exported_value === undefined) {
|
|
62
|
+
if (throw_on_missing_package) {
|
|
63
|
+
throw Error(`Package subpath '${subpath}' does not define the key '${exports_key}' in 'exports' in ${package_dir}/package.json` +
|
|
64
|
+
(parent_path ? ` imported from ${parent_path}` : ''));
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const path_id = join(package_dir, exported_value);
|
|
36
71
|
return {
|
|
37
72
|
path_id,
|
|
38
73
|
path_id_with_querystring: raw ? path_id + '?raw' : path_id,
|
|
@@ -42,3 +77,32 @@ export const resolve_node_specifier = (specifier, dir = paths.root, parent_url,
|
|
|
42
77
|
namespace: undefined,
|
|
43
78
|
};
|
|
44
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
* Resolves the subpath of a package.json `exports` field based on the `specifier`.
|
|
82
|
+
*/
|
|
83
|
+
const resolve_subpath = (package_json, specifier, subpath) => {
|
|
84
|
+
const exports_key = specifier.endsWith('.svelte') ? 'svelte' : 'default';
|
|
85
|
+
const exported = subpath === '.' && !package_json.exports
|
|
86
|
+
? { [exports_key]: package_json.main }
|
|
87
|
+
: package_json.exports?.[subpath];
|
|
88
|
+
return { exported, exports_key };
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Resolves the exported value based on the exports key and condition.
|
|
92
|
+
*/
|
|
93
|
+
const resolve_exported_value = (exported, exports_key, exports_condition) => {
|
|
94
|
+
let exported_value = typeof exported === 'string' ? exported : exported[exports_key];
|
|
95
|
+
// TODO best effort fallback, support `default` but fall back to `import` or `node` as the exports key.
|
|
96
|
+
if (exported_value === undefined && typeof exported !== 'string' && exports_key === 'default') {
|
|
97
|
+
exported_value = exported.import ?? exported.node;
|
|
98
|
+
}
|
|
99
|
+
// Possibly resolve to conditional exports.
|
|
100
|
+
exported_value =
|
|
101
|
+
exported_value === undefined || typeof exported_value === 'string'
|
|
102
|
+
? exported_value
|
|
103
|
+
: (exported_value[exports_condition] ??
|
|
104
|
+
exported_value.default ??
|
|
105
|
+
exported_value.import ??
|
|
106
|
+
exported_value.node); // TODO this fallback has corner case bugs for off-spec exports
|
|
107
|
+
return exported_value;
|
|
108
|
+
};
|
|
@@ -14,13 +14,9 @@ export interface Resolved_Specifier {
|
|
|
14
14
|
raw: boolean;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Maps
|
|
17
|
+
* Maps an import `specifier` relative to `dir`,
|
|
18
18
|
* and infer the correct extension following Vite conventions.
|
|
19
|
-
* If no `.js` file is found for the
|
|
20
|
-
* @param specifier
|
|
21
|
-
* @param dir - if defined, enables relative importers like from esbuild plugins
|
|
22
|
-
* @param passthrough_extensions - used to support specifiers that have no file extention, which Vite supports, so we do our best effort
|
|
23
|
-
* @returns
|
|
19
|
+
* If no `.js` file is found for the specifier on the filesystem, it assumes `.ts`.
|
|
24
20
|
*/
|
|
25
21
|
export declare const resolve_specifier: (specifier: string, dir: string) => Resolved_Specifier;
|
|
26
22
|
//# sourceMappingURL=resolve_specifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve_specifier.d.ts","sourceRoot":"../src/lib/","sources":["resolve_specifier.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,SAAS,GAAG,4BAA4B,GAAG,4BAA4B,CAAC;IACnF,GAAG,EAAE,OAAO,CAAC;CACb;AAED
|
|
1
|
+
{"version":3,"file":"resolve_specifier.d.ts","sourceRoot":"../src/lib/","sources":["resolve_specifier.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,SAAS,GAAG,4BAA4B,GAAG,4BAA4B,CAAC;IACnF,GAAG,EAAE,OAAO,CAAC;CACb;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,cAAe,MAAM,OAAO,MAAM,KAAG,kBAgDlE,CAAC"}
|
|
@@ -2,13 +2,9 @@ import { extname, isAbsolute, join, relative } from 'node:path';
|
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { replace_extension } from './paths.js';
|
|
4
4
|
/**
|
|
5
|
-
* Maps
|
|
5
|
+
* Maps an import `specifier` relative to `dir`,
|
|
6
6
|
* and infer the correct extension following Vite conventions.
|
|
7
|
-
* If no `.js` file is found for the
|
|
8
|
-
* @param specifier
|
|
9
|
-
* @param dir - if defined, enables relative importers like from esbuild plugins
|
|
10
|
-
* @param passthrough_extensions - used to support specifiers that have no file extention, which Vite supports, so we do our best effort
|
|
11
|
-
* @returns
|
|
7
|
+
* If no `.js` file is found for the specifier on the filesystem, it assumes `.ts`.
|
|
12
8
|
*/
|
|
13
9
|
export const resolve_specifier = (specifier, dir) => {
|
|
14
10
|
const raw = specifier.endsWith('?raw');
|
package/dist/src_json.d.ts
CHANGED
|
@@ -129,7 +129,19 @@ export declare const Src_Json: z.ZodObject<{
|
|
|
129
129
|
name: z.ZodString;
|
|
130
130
|
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
|
131
131
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
132
|
-
}, z.ZodTypeAny, "passthrough">>>,
|
|
132
|
+
}, z.ZodTypeAny, "passthrough">>>, Record<string, z.objectOutputType<{
|
|
133
|
+
path: z.ZodString;
|
|
134
|
+
declarations: z.ZodArray<z.ZodObject<{
|
|
135
|
+
name: z.ZodString;
|
|
136
|
+
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
|
137
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
138
|
+
name: z.ZodString;
|
|
139
|
+
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
|
140
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
141
|
+
name: z.ZodString;
|
|
142
|
+
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
|
143
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
144
|
+
}, z.ZodTypeAny, "passthrough">> | undefined, Record<string, z.objectInputType<{
|
|
133
145
|
path: z.ZodString;
|
|
134
146
|
declarations: z.ZodArray<z.ZodObject<{
|
|
135
147
|
name: z.ZodString;
|
|
@@ -181,7 +193,19 @@ export declare const Src_Json: z.ZodObject<{
|
|
|
181
193
|
name: z.ZodString;
|
|
182
194
|
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
|
183
195
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
184
|
-
}, z.ZodTypeAny, "passthrough">>>,
|
|
196
|
+
}, z.ZodTypeAny, "passthrough">>>, Record<string, z.objectOutputType<{
|
|
197
|
+
path: z.ZodString;
|
|
198
|
+
declarations: z.ZodArray<z.ZodObject<{
|
|
199
|
+
name: z.ZodString;
|
|
200
|
+
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
|
201
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
202
|
+
name: z.ZodString;
|
|
203
|
+
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
|
204
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
205
|
+
name: z.ZodString;
|
|
206
|
+
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
|
207
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
208
|
+
}, z.ZodTypeAny, "passthrough">> | undefined, Record<string, z.objectInputType<{
|
|
185
209
|
path: z.ZodString;
|
|
186
210
|
declarations: z.ZodArray<z.ZodObject<{
|
|
187
211
|
name: z.ZodString;
|
|
@@ -233,7 +257,19 @@ export declare const Src_Json: z.ZodObject<{
|
|
|
233
257
|
name: z.ZodString;
|
|
234
258
|
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
|
235
259
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
236
|
-
}, z.ZodTypeAny, "passthrough">>>,
|
|
260
|
+
}, z.ZodTypeAny, "passthrough">>>, Record<string, z.objectOutputType<{
|
|
261
|
+
path: z.ZodString;
|
|
262
|
+
declarations: z.ZodArray<z.ZodObject<{
|
|
263
|
+
name: z.ZodString;
|
|
264
|
+
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
|
265
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
266
|
+
name: z.ZodString;
|
|
267
|
+
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
|
268
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
269
|
+
name: z.ZodString;
|
|
270
|
+
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
|
271
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
272
|
+
}, z.ZodTypeAny, "passthrough">> | undefined, Record<string, z.objectInputType<{
|
|
237
273
|
path: z.ZodString;
|
|
238
274
|
declarations: z.ZodArray<z.ZodObject<{
|
|
239
275
|
name: z.ZodString;
|
package/dist/src_json.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"src_json.d.ts","sourceRoot":"../src/lib/","sources":["src_json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK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CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAMN,CAAC;AAChB,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,QAAQ,KAAK,QAAQ,GAAG,IAAI,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;AAE9F,eAAO,MAAM,eAAe,iBAAkB,YAAY,aAAa,MAAM,KAAG,QAK7E,CAAC;AAEJ,eAAO,MAAM,kBAAkB,aAAc,QAAQ,KAAG,MAGvD,CAAC;AAEF,eAAO,MAAM,cAAc,YACjB,oBAAoB,GAAG,SAAS,wBAEvC,WAAW,GAAG,SAsEhB,CAAC"}
|
|
@@ -34,7 +34,7 @@ export interface Parsed_Sveltekit_Config {
|
|
|
34
34
|
private_prefix: string | undefined;
|
|
35
35
|
public_prefix: string | undefined;
|
|
36
36
|
svelte_compile_options: CompileOptions;
|
|
37
|
-
svelte_compile_module_options:
|
|
37
|
+
svelte_compile_module_options: ModuleCompileOptions;
|
|
38
38
|
svelte_preprocessors: PreprocessorGroup | PreprocessorGroup[] | undefined;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sveltekit_config.d.ts","sourceRoot":"../src/lib/","sources":["sveltekit_config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,IAAI,eAAe,EAAC,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAC,cAAc,EAAE,oBAAoB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AAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,EAAE,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,SAAS,CAAC;IACxC,UAAU,EAAE,EAAE,GAAG,UAAU,MAAM,EAAE,GAAG,WAAW,MAAM,EAAE,GAAG,SAAS,CAAC;IAGtE;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,sBAAsB,EAAE,cAAc,CAAC;IACvC,6BAA6B,EAAE,oBAAoB,CAAC;IACpD,oBAAoB,EAAE,iBAAiB,GAAG,iBAAiB,EAAE,GAAG,SAAS,CAAC;CAC1E;AAGD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,mBAClB,MAAM,GAAG,eAAe,KACrC,OAAO,CAAC,uBAAuB,CA2CjC,CAAC;AAEF,eAAO,MAAM,iCAAiC,0CAK3C,cAAc,KAAG,oBAA4D,CAAC;AAEjF;;GAEG;AACH,eAAO,MAAM,wBAAwB,yBAAgC,CAAC"}
|
package/dist/sync.task.js
CHANGED
|
@@ -21,7 +21,7 @@ export const task = {
|
|
|
21
21
|
run: async ({ args, invoke_task, config, log }) => {
|
|
22
22
|
const { sveltekit, package_json, gen, install } = args;
|
|
23
23
|
if (install) {
|
|
24
|
-
const result = await spawn(
|
|
24
|
+
const result = await spawn(config.pm_cli, ['i']);
|
|
25
25
|
if (!result.ok) {
|
|
26
26
|
throw new Task_Error('Failed npm install');
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.task.d.ts","sourceRoot":"../src/lib/","sources":["upgrade.task.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"upgrade.task.d.ts","sourceRoot":"../src/lib/","sources":["upgrade.task.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAMhD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;EAeP,CAAC;AACX,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CA+C3B,CAAC"}
|
package/dist/upgrade.task.js
CHANGED
|
@@ -4,6 +4,7 @@ import { Task_Error } from './task.js';
|
|
|
4
4
|
import { extract_deps, load_package_json } from './package_json.js';
|
|
5
5
|
import { Git_Origin, git_pull } from './git.js';
|
|
6
6
|
import { spawn_cli } from './cli.js';
|
|
7
|
+
import { serialize_args, to_forwarded_args } from './args.js';
|
|
7
8
|
export const Args = z
|
|
8
9
|
.object({
|
|
9
10
|
_: z.array(z.string(), { description: 'names of deps to exclude from the upgrade' }).default([]),
|
|
@@ -23,7 +24,7 @@ export const Args = z
|
|
|
23
24
|
export const task = {
|
|
24
25
|
summary: 'upgrade deps',
|
|
25
26
|
Args,
|
|
26
|
-
run: async ({ args, log }) => {
|
|
27
|
+
run: async ({ args, log, config }) => {
|
|
27
28
|
const { _, only, origin, force, pull, dry } = args;
|
|
28
29
|
if (_.length && only.length) {
|
|
29
30
|
throw new Task_Error('Cannot call `gro upgrade` with both rest args and --only.');
|
|
@@ -50,7 +51,8 @@ export const task = {
|
|
|
50
51
|
if (force) {
|
|
51
52
|
install_args.push('--force');
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
+
install_args.push(...serialize_args(to_forwarded_args(config.pm_cli)));
|
|
55
|
+
await spawn(config.pm_cli, install_args);
|
|
54
56
|
// Sync in a new process to pick up any changes after installing, avoiding some errors.
|
|
55
57
|
await spawn_cli('gro', ['sync', '--no-install']); // don't install because we do above
|
|
56
58
|
},
|
package/dist/watch_dir.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch_dir.d.ts","sourceRoot":"../src/lib/","sources":["watch_dir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,eAAe,EAAiB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"watch_dir.d.ts","sourceRoot":"../src/lib/","sources":["watch_dir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,eAAe,EAAiB,MAAM,UAAU,CAAC;AAKrE,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAI3C,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;CACtB;AACD,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC9D,MAAM,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;AAEvE,MAAM,WAAW,OAAO;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,uBAAuB,CAAC;IACnC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,oDAMnB,OAAO,KAAG,aA6CZ,CAAC"}
|
package/dist/watch_dir.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { watch } from 'chokidar';
|
|
2
2
|
import { relative } from 'node:path';
|
|
3
3
|
import { statSync } from 'node:fs';
|
|
4
|
+
import { create_deferred } from '@ryanatkn/belt/async.js';
|
|
4
5
|
/**
|
|
5
6
|
* Watch for changes on the filesystem using chokidar.
|
|
6
7
|
*/
|
|
@@ -10,9 +11,8 @@ export const watch_dir = ({ dir, on_change, filter, absolute = true, chokidar, }
|
|
|
10
11
|
return {
|
|
11
12
|
init: async () => {
|
|
12
13
|
if (initing)
|
|
13
|
-
return initing;
|
|
14
|
-
|
|
15
|
-
initing = new Promise((r) => (resolve = r)); // TODO `create_deferred`?// cwd: chokidar?.cwd ?? process.cwd()
|
|
14
|
+
return initing.promise;
|
|
15
|
+
initing = create_deferred();
|
|
16
16
|
watcher = watch(dir, { ...chokidar });
|
|
17
17
|
watcher.on('add', (path) => {
|
|
18
18
|
const final_path = absolute ? path : relative(dir, path);
|
|
@@ -46,8 +46,8 @@ export const watch_dir = ({ dir, on_change, filter, absolute = true, chokidar, }
|
|
|
46
46
|
on_change({ type: 'delete', path: final_path, is_directory: true });
|
|
47
47
|
});
|
|
48
48
|
// wait until ready
|
|
49
|
-
watcher.once('ready', () => resolve());
|
|
50
|
-
await initing;
|
|
49
|
+
watcher.once('ready', () => initing?.resolve());
|
|
50
|
+
await initing.promise;
|
|
51
51
|
},
|
|
52
52
|
close: async () => {
|
|
53
53
|
initing = undefined;
|