@ryanatkn/gro 0.174.0 → 0.174.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/loader.d.ts.map +1 -1
- package/dist/loader.js +5 -4
- package/dist/publish.task.d.ts.map +1 -1
- package/dist/publish.task.js +10 -3
- package/dist/sveltekit_shim_app_state.js +1 -1
- package/package.json +2 -2
- package/src/lib/loader.ts +6 -5
- package/src/lib/publish.task.ts +11 -3
- package/src/lib/sveltekit_shim_app_state.ts +1 -1
package/dist/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,QAAQ,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AA2EvD,cAAc;AACd,eAAO,MAAM,IAAI,EAAE,QA0GlB,CAAC;AAEF,cAAc;AACd,eAAO,MAAM,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,QAAQ,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AA2EvD,cAAc;AACd,eAAO,MAAM,IAAI,EAAE,QA0GlB,CAAC;AAEF,cAAc;AACd,eAAO,MAAM,OAAO,EAAE,WAsDrB,CAAC"}
|
package/dist/loader.js
CHANGED
|
@@ -169,6 +169,11 @@ export const resolve = async (specifier, context, nextResolve) => {
|
|
|
169
169
|
shortCircuit: true,
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
+
// Support SvelteKit `$app` imports, including from node_modules
|
|
173
|
+
const shimmed = sveltekit_shim_app_specifiers.get(s);
|
|
174
|
+
if (shimmed !== undefined) {
|
|
175
|
+
return nextResolve(shimmed, context);
|
|
176
|
+
}
|
|
172
177
|
// Special case for Gro's dependencies that import into Gro.
|
|
173
178
|
// Without this, we'd need to add a dev dep to Gro for Gro, which causes problems.
|
|
174
179
|
// TODO maybe make this generic, checking `package_json.name` against `s` and map it, possibly need to export `resolve_exported_value`
|
|
@@ -179,10 +184,6 @@ export const resolve = async (specifier, context, nextResolve) => {
|
|
|
179
184
|
if (!parent_url || NODE_MODULES_MATCHER.test(parent_url)) {
|
|
180
185
|
return nextResolve(s, context);
|
|
181
186
|
}
|
|
182
|
-
const shimmed = sveltekit_shim_app_specifiers.get(s);
|
|
183
|
-
if (shimmed !== undefined) {
|
|
184
|
-
return nextResolve(shimmed, context);
|
|
185
|
-
}
|
|
186
187
|
s = map_sveltekit_aliases(s, aliases);
|
|
187
188
|
// The specifier has now been mapped to its final form, so we can inspect it.
|
|
188
189
|
// Imports into `node_modules` use the default algorithm, and the rest use use Vite conventions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/publish.task.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAYtB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAQhD,cAAc;AACd,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;kBAuCf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,cAAc;AACd,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"publish.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/publish.task.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAYtB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAQhD,cAAc;AACd,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;kBAuCf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,cAAc;AACd,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAkK3B,CAAC"}
|
package/dist/publish.task.js
CHANGED
|
@@ -54,7 +54,7 @@ export const Args = z.strictObject({
|
|
|
54
54
|
export const task = {
|
|
55
55
|
summary: 'bump version, publish to the configured registry, and git push',
|
|
56
56
|
Args,
|
|
57
|
-
run: async ({ args, log, invoke_task }) => {
|
|
57
|
+
run: async ({ args, log, invoke_task, config }) => {
|
|
58
58
|
const { branch, origin, changelog, preserve_changelog, dry, check, build, pull, sync, install, optional, changeset_cli, } = args;
|
|
59
59
|
if (dry) {
|
|
60
60
|
log.info(st('green', 'dry run!'));
|
|
@@ -111,8 +111,8 @@ export const task = {
|
|
|
111
111
|
' or an object with the `url` key');
|
|
112
112
|
}
|
|
113
113
|
// This is the first line that alters the repo.
|
|
114
|
-
const
|
|
115
|
-
if (!
|
|
114
|
+
const changeset_version_result = await spawn_cli(found_changeset_cli, ['version'], log);
|
|
115
|
+
if (!changeset_version_result?.ok) {
|
|
116
116
|
throw Error('changeset version failed: no commits were made: see the error above');
|
|
117
117
|
}
|
|
118
118
|
if (!preserve_changelog) {
|
|
@@ -122,6 +122,13 @@ export const task = {
|
|
|
122
122
|
}
|
|
123
123
|
await update_changelog(parsed_repo_url.owner, parsed_repo_url.repo, changelog, token, log);
|
|
124
124
|
}
|
|
125
|
+
// Update package-lock.json to reflect the new version.
|
|
126
|
+
if (install) {
|
|
127
|
+
const install_result = await spawn(config.pm_cli, ['install']);
|
|
128
|
+
if (!install_result.ok) {
|
|
129
|
+
throw new Task_Error(`Failed \`${config.pm_cli} install\` after version bump`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
125
132
|
// Regenerate files that depend on package.json version.
|
|
126
133
|
// The check above ensures gen is updated.
|
|
127
134
|
await invoke_task('gen');
|
|
@@ -16,7 +16,7 @@ export const page = {
|
|
|
16
16
|
route: { id: null },
|
|
17
17
|
state: {},
|
|
18
18
|
status: -1,
|
|
19
|
-
url: new URL('https://github.com/ryanatkn/gro'),
|
|
19
|
+
url: new URL('https://github.com/ryanatkn/gro'), // TODO maybe use package.json?
|
|
20
20
|
};
|
|
21
21
|
export const updated = {
|
|
22
22
|
current: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryanatkn/gro",
|
|
3
|
-
"version": "0.174.
|
|
3
|
+
"version": "0.174.2",
|
|
4
4
|
"description": "task runner and toolkit extending SvelteKit",
|
|
5
5
|
"motto": "generate, run, optimize",
|
|
6
6
|
"glyph": "🌰",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@changesets/changelog-git": "^0.2.1",
|
|
84
84
|
"@changesets/types": "^6.1.0",
|
|
85
85
|
"@ryanatkn/eslint-config": "^0.9.0",
|
|
86
|
-
"@ryanatkn/fuz": "^0.
|
|
86
|
+
"@ryanatkn/fuz": "^0.156.0",
|
|
87
87
|
"@ryanatkn/moss": "^0.37.0",
|
|
88
88
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
89
89
|
"@sveltejs/kit": "^2.47.2",
|
package/src/lib/loader.ts
CHANGED
|
@@ -206,6 +206,12 @@ export const resolve: ResolveHook = async (specifier, context, nextResolve) => {
|
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
// Support SvelteKit `$app` imports, including from node_modules
|
|
210
|
+
const shimmed = sveltekit_shim_app_specifiers.get(s);
|
|
211
|
+
if (shimmed !== undefined) {
|
|
212
|
+
return nextResolve(shimmed, context);
|
|
213
|
+
}
|
|
214
|
+
|
|
209
215
|
// Special case for Gro's dependencies that import into Gro.
|
|
210
216
|
// Without this, we'd need to add a dev dep to Gro for Gro, which causes problems.
|
|
211
217
|
// TODO maybe make this generic, checking `package_json.name` against `s` and map it, possibly need to export `resolve_exported_value`
|
|
@@ -218,11 +224,6 @@ export const resolve: ResolveHook = async (specifier, context, nextResolve) => {
|
|
|
218
224
|
return nextResolve(s, context);
|
|
219
225
|
}
|
|
220
226
|
|
|
221
|
-
const shimmed = sveltekit_shim_app_specifiers.get(s);
|
|
222
|
-
if (shimmed !== undefined) {
|
|
223
|
-
return nextResolve(shimmed, context);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
227
|
s = map_sveltekit_aliases(s, aliases);
|
|
227
228
|
|
|
228
229
|
// The specifier has now been mapped to its final form, so we can inspect it.
|
package/src/lib/publish.task.ts
CHANGED
|
@@ -66,7 +66,7 @@ export type Args = z.infer<typeof Args>;
|
|
|
66
66
|
export const task: Task<Args> = {
|
|
67
67
|
summary: 'bump version, publish to the configured registry, and git push',
|
|
68
68
|
Args,
|
|
69
|
-
run: async ({args, log, invoke_task}): Promise<void> => {
|
|
69
|
+
run: async ({args, log, invoke_task, config}): Promise<void> => {
|
|
70
70
|
const {
|
|
71
71
|
branch,
|
|
72
72
|
origin,
|
|
@@ -151,8 +151,8 @@ export const task: Task<Args> = {
|
|
|
151
151
|
|
|
152
152
|
// This is the first line that alters the repo.
|
|
153
153
|
|
|
154
|
-
const
|
|
155
|
-
if (!
|
|
154
|
+
const changeset_version_result = await spawn_cli(found_changeset_cli, ['version'], log);
|
|
155
|
+
if (!changeset_version_result?.ok) {
|
|
156
156
|
throw Error('changeset version failed: no commits were made: see the error above');
|
|
157
157
|
}
|
|
158
158
|
|
|
@@ -166,6 +166,14 @@ export const task: Task<Args> = {
|
|
|
166
166
|
await update_changelog(parsed_repo_url.owner, parsed_repo_url.repo, changelog, token, log);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
// Update package-lock.json to reflect the new version.
|
|
170
|
+
if (install) {
|
|
171
|
+
const install_result = await spawn(config.pm_cli, ['install']);
|
|
172
|
+
if (!install_result.ok) {
|
|
173
|
+
throw new Task_Error(`Failed \`${config.pm_cli} install\` after version bump`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
169
177
|
// Regenerate files that depend on package.json version.
|
|
170
178
|
// The check above ensures gen is updated.
|
|
171
179
|
await invoke_task('gen');
|
|
@@ -24,7 +24,7 @@ export const page: typeof base_page = {
|
|
|
24
24
|
route: {id: null},
|
|
25
25
|
state: {},
|
|
26
26
|
status: -1,
|
|
27
|
-
url: new URL('https://github.com/ryanatkn/gro') as any,
|
|
27
|
+
url: new URL('https://github.com/ryanatkn/gro') as any, // TODO maybe use package.json?
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
export const updated: typeof base_updated = {
|