@ryanatkn/gro 0.174.0 → 0.174.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.
@@ -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,CA0J3B,CAAC"}
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"}
@@ -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 changeset_ersion_result = await spawn_cli(found_changeset_cli, ['version'], log);
115
- if (!changeset_ersion_result?.ok) {
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');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryanatkn/gro",
3
- "version": "0.174.0",
3
+ "version": "0.174.1",
4
4
  "description": "task runner and toolkit extending SvelteKit",
5
5
  "motto": "generate, run, optimize",
6
6
  "glyph": "🌰",
@@ -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 changeset_ersion_result = await spawn_cli(found_changeset_cli, ['version'], log);
155
- if (!changeset_ersion_result?.ok) {
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');