@ryanatkn/gro 0.182.0 → 0.183.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.js +2 -2
- package/dist/check.task.js +2 -2
- package/dist/format_file.js +2 -2
- package/dist/gro.config.default.js +2 -2
- package/dist/gro_plugin_sveltekit_app.d.ts +1 -27
- package/dist/gro_plugin_sveltekit_app.d.ts.map +1 -1
- package/dist/gro_plugin_sveltekit_app.js +7 -156
- package/dist/gro_plugin_sveltekit_library.js +3 -3
- package/dist/invoke_task.js +2 -2
- package/dist/package_json.d.ts +12 -11
- package/dist/package_json.d.ts.map +1 -1
- package/dist/package_json.js +21 -19
- package/dist/publish.task.js +4 -4
- package/dist/release.task.js +2 -2
- package/dist/source_json.d.ts +0 -1
- package/dist/source_json.d.ts.map +1 -1
- package/dist/source_json.js +0 -4
- package/dist/sveltekit_helpers.js +2 -2
- package/dist/sync.task.js +2 -2
- package/dist/test.task.js +3 -3
- package/dist/upgrade.task.d.ts.map +1 -1
- package/dist/upgrade.task.js +3 -3
- package/package.json +3 -4
- package/src/lib/changeset.task.ts +2 -2
- package/src/lib/check.task.ts +2 -2
- package/src/lib/format_file.ts +2 -2
- package/src/lib/gro.config.default.ts +2 -2
- package/src/lib/gro_plugin_sveltekit_app.ts +6 -216
- package/src/lib/gro_plugin_sveltekit_library.ts +3 -3
- package/src/lib/invoke_task.ts +2 -2
- package/src/lib/package_json.ts +25 -19
- package/src/lib/publish.task.ts +4 -4
- package/src/lib/release.task.ts +2 -2
- package/src/lib/source_json.ts +0 -5
- package/src/lib/sveltekit_helpers.ts +2 -2
- package/src/lib/sync.task.ts +2 -2
- package/src/lib/test.task.ts +3 -3
- package/src/lib/upgrade.task.ts +7 -3
package/src/lib/sync.task.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {z} from 'zod';
|
|
|
2
2
|
import {spawn} from '@fuzdev/fuz_util/process.js';
|
|
3
3
|
|
|
4
4
|
import {TaskError, type Task} from './task.ts';
|
|
5
|
-
import {
|
|
5
|
+
import {package_json_sync} from './package_json.ts';
|
|
6
6
|
import {sveltekit_sync} from './sveltekit_helpers.ts';
|
|
7
7
|
|
|
8
8
|
/** @nodocs */
|
|
@@ -37,7 +37,7 @@ export const task: Task<Args> = {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
if (package_json && config.map_package_json) {
|
|
40
|
-
await
|
|
40
|
+
await package_json_sync(config.map_package_json, log);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
if (gen) {
|
package/src/lib/test.task.ts
CHANGED
|
@@ -3,7 +3,7 @@ import {spawn_cli} from '@ryanatkn/gro/cli.js';
|
|
|
3
3
|
|
|
4
4
|
import {TaskError, type Task} from './task.ts';
|
|
5
5
|
import {find_cli} from './cli.ts';
|
|
6
|
-
import {
|
|
6
|
+
import {package_json_has_dependency, package_json_load} from './package_json.ts';
|
|
7
7
|
import {serialize_args, to_implicit_forwarded_args} from './args.ts';
|
|
8
8
|
import {VITEST_CLI} from './constants.ts';
|
|
9
9
|
import {paths} from './paths.ts';
|
|
@@ -30,8 +30,8 @@ export const task: Task<Args> = {
|
|
|
30
30
|
run: async ({args}): Promise<void> => {
|
|
31
31
|
const {_: patterns, dir, fail_without_tests, t} = args;
|
|
32
32
|
|
|
33
|
-
const package_json = await
|
|
34
|
-
if (!
|
|
33
|
+
const package_json = await package_json_load();
|
|
34
|
+
if (!package_json_has_dependency(VITEST_CLI, package_json)) {
|
|
35
35
|
throw new TaskError('no test runner found, install vitest');
|
|
36
36
|
}
|
|
37
37
|
|
package/src/lib/upgrade.task.ts
CHANGED
|
@@ -4,7 +4,11 @@ import {rm} from 'node:fs/promises';
|
|
|
4
4
|
import {GitOrigin, git_pull} from '@fuzdev/fuz_util/git.js';
|
|
5
5
|
|
|
6
6
|
import {TaskError, type Task} from './task.ts';
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
package_json_extract_dependencies,
|
|
9
|
+
package_json_load,
|
|
10
|
+
type PackageJsonDep,
|
|
11
|
+
} from './package_json.ts';
|
|
8
12
|
import {spawn_cli} from './cli.ts';
|
|
9
13
|
import {serialize_args, to_forwarded_args} from './args.ts';
|
|
10
14
|
import {NODE_MODULES_DIRNAME} from './constants.ts';
|
|
@@ -83,9 +87,9 @@ export const task: Task<Args> = {
|
|
|
83
87
|
await rm(lockfile_path, {force: true});
|
|
84
88
|
}
|
|
85
89
|
|
|
86
|
-
const package_json = await
|
|
90
|
+
const package_json = await package_json_load();
|
|
87
91
|
|
|
88
|
-
const all_deps =
|
|
92
|
+
const all_deps = package_json_extract_dependencies(package_json);
|
|
89
93
|
|
|
90
94
|
const deps = only.length
|
|
91
95
|
? all_deps.filter((d) => only.includes(d.name))
|