@ryanatkn/gro 0.189.0 → 0.189.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/args.js +3 -1
- package/dist/check.task.d.ts +3 -0
- package/dist/check.task.d.ts.map +1 -1
- package/dist/check.task.js +11 -1
- package/package.json +5 -5
- package/src/lib/args.ts +3 -3
- package/src/lib/check.task.ts +24 -1
package/dist/args.js
CHANGED
|
@@ -52,7 +52,9 @@ export const to_forwarded_args_by_command = (raw_rest_args = to_raw_rest_args())
|
|
|
52
52
|
const args = argv_parse(argv);
|
|
53
53
|
let command = args._.shift();
|
|
54
54
|
if (!command) {
|
|
55
|
-
|
|
55
|
+
// Skip sections without a command name - these are handled by `to_implicit_forwarded_args`.
|
|
56
|
+
// This allows `gro run script.ts -- --help` to pass `--help` to the script.
|
|
57
|
+
continue;
|
|
56
58
|
}
|
|
57
59
|
// Gro commands get combined with their task name.
|
|
58
60
|
if (command === 'gro') {
|
package/dist/check.task.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ export declare const Args: z.ZodObject<{
|
|
|
14
14
|
'no-package_json': z.ZodDefault<z.ZodBoolean>;
|
|
15
15
|
lint: z.ZodDefault<z.ZodBoolean>;
|
|
16
16
|
'no-lint': z.ZodDefault<z.ZodBoolean>;
|
|
17
|
+
build: z.ZodDefault<z.ZodBoolean>;
|
|
18
|
+
'no-build': z.ZodDefault<z.ZodBoolean>;
|
|
19
|
+
force_build: z.ZodDefault<z.ZodBoolean>;
|
|
17
20
|
sync: z.ZodDefault<z.ZodBoolean>;
|
|
18
21
|
'no-sync': z.ZodDefault<z.ZodBoolean>;
|
|
19
22
|
install: z.ZodDefault<z.ZodBoolean>;
|
package/dist/check.task.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/check.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAKtB,OAAO,EAAY,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAG/C,cAAc;AACd,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"check.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/check.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAKtB,OAAO,EAAY,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAG/C,cAAc;AACd,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;kBA6Bf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,cAAc;AACd,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CA6E3B,CAAC"}
|
package/dist/check.task.js
CHANGED
|
@@ -21,6 +21,12 @@ export const Args = z.strictObject({
|
|
|
21
21
|
.default(false),
|
|
22
22
|
lint: z.boolean().meta({ description: 'dual of no-lint' }).default(true),
|
|
23
23
|
'no-lint': z.boolean().meta({ description: 'opt out of linting' }).default(false),
|
|
24
|
+
build: z.boolean().meta({ description: 'dual of no-build' }).default(false),
|
|
25
|
+
'no-build': z.boolean().meta({ description: 'opt out of building' }).default(true),
|
|
26
|
+
force_build: z
|
|
27
|
+
.boolean()
|
|
28
|
+
.meta({ description: 'force a fresh build, ignoring the cache' })
|
|
29
|
+
.default(false),
|
|
24
30
|
sync: z.boolean().meta({ description: 'dual of no-sync' }).default(true),
|
|
25
31
|
'no-sync': z.boolean().meta({ description: 'opt out of syncing' }).default(false),
|
|
26
32
|
install: z.boolean().meta({ description: 'opt into installing packages' }).default(false),
|
|
@@ -34,7 +40,7 @@ export const task = {
|
|
|
34
40
|
summary: 'check that everything is ready to commit',
|
|
35
41
|
Args,
|
|
36
42
|
run: async ({ args, invoke_task, log, config }) => {
|
|
37
|
-
const { typecheck, test, gen, format, package_json, lint, sync, install, workspace } = args;
|
|
43
|
+
const { typecheck, test, gen, format, package_json, lint, build, force_build, sync, install, workspace, } = args;
|
|
38
44
|
// When checking the workspace, which was added for CI, never sync.
|
|
39
45
|
// Setup like installing packages and `sveltekit-sync` should be done in the CI setup.
|
|
40
46
|
if (!workspace) {
|
|
@@ -71,6 +77,10 @@ export const task = {
|
|
|
71
77
|
if (lint) {
|
|
72
78
|
await invoke_task('lint');
|
|
73
79
|
}
|
|
80
|
+
if (build) {
|
|
81
|
+
// Skip sync/gen/install since check handles those separately
|
|
82
|
+
await invoke_task('build', { sync: false, gen: false, install: false, force_build });
|
|
83
|
+
}
|
|
74
84
|
if (workspace) {
|
|
75
85
|
const error_message = await git_check_clean_workspace();
|
|
76
86
|
if (error_message) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryanatkn/gro",
|
|
3
|
-
"version": "0.189.
|
|
3
|
+
"version": "0.189.2",
|
|
4
4
|
"description": "task runner and toolkit extending SvelteKit",
|
|
5
5
|
"motto": "generate, run, optimize",
|
|
6
6
|
"glyph": "🌰",
|
|
@@ -86,16 +86,16 @@
|
|
|
86
86
|
"@fuzdev/fuz_util": "^0.48.0",
|
|
87
87
|
"@ryanatkn/eslint-config": "^0.9.0",
|
|
88
88
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
89
|
-
"@sveltejs/kit": "^2.
|
|
89
|
+
"@sveltejs/kit": "^2.50.1",
|
|
90
90
|
"@sveltejs/package": "^2.5.7",
|
|
91
|
-
"@sveltejs/vite-plugin-svelte": "^6.2.
|
|
91
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
92
92
|
"@types/node": "^24.10.1",
|
|
93
93
|
"@webref/css": "^8.2.0",
|
|
94
94
|
"esbuild": "^0.27.1",
|
|
95
95
|
"eslint": "^9.39.1",
|
|
96
96
|
"eslint-plugin-svelte": "^3.13.1",
|
|
97
|
-
"svelte": "^5.
|
|
98
|
-
"svelte-check": "^4.3.
|
|
97
|
+
"svelte": "^5.48.2",
|
|
98
|
+
"svelte-check": "^4.3.5",
|
|
99
99
|
"typescript": "^5.9.3",
|
|
100
100
|
"typescript-eslint": "^8.48.1",
|
|
101
101
|
"vitest": "^4.0.15"
|
package/src/lib/args.ts
CHANGED
|
@@ -57,9 +57,9 @@ export const to_forwarded_args_by_command = (
|
|
|
57
57
|
const args = argv_parse(argv);
|
|
58
58
|
let command = args._.shift();
|
|
59
59
|
if (!command) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
// Skip sections without a command name - these are handled by `to_implicit_forwarded_args`.
|
|
61
|
+
// This allows `gro run script.ts -- --help` to pass `--help` to the script.
|
|
62
|
+
continue;
|
|
63
63
|
}
|
|
64
64
|
// Gro commands get combined with their task name.
|
|
65
65
|
if (command === 'gro') {
|
package/src/lib/check.task.ts
CHANGED
|
@@ -23,6 +23,12 @@ export const Args = z.strictObject({
|
|
|
23
23
|
.default(false),
|
|
24
24
|
lint: z.boolean().meta({description: 'dual of no-lint'}).default(true),
|
|
25
25
|
'no-lint': z.boolean().meta({description: 'opt out of linting'}).default(false),
|
|
26
|
+
build: z.boolean().meta({description: 'dual of no-build'}).default(false),
|
|
27
|
+
'no-build': z.boolean().meta({description: 'opt out of building'}).default(true),
|
|
28
|
+
force_build: z
|
|
29
|
+
.boolean()
|
|
30
|
+
.meta({description: 'force a fresh build, ignoring the cache'})
|
|
31
|
+
.default(false),
|
|
26
32
|
sync: z.boolean().meta({description: 'dual of no-sync'}).default(true),
|
|
27
33
|
'no-sync': z.boolean().meta({description: 'opt out of syncing'}).default(false),
|
|
28
34
|
install: z.boolean().meta({description: 'opt into installing packages'}).default(false),
|
|
@@ -38,7 +44,19 @@ export const task: Task<Args> = {
|
|
|
38
44
|
summary: 'check that everything is ready to commit',
|
|
39
45
|
Args,
|
|
40
46
|
run: async ({args, invoke_task, log, config}) => {
|
|
41
|
-
const {
|
|
47
|
+
const {
|
|
48
|
+
typecheck,
|
|
49
|
+
test,
|
|
50
|
+
gen,
|
|
51
|
+
format,
|
|
52
|
+
package_json,
|
|
53
|
+
lint,
|
|
54
|
+
build,
|
|
55
|
+
force_build,
|
|
56
|
+
sync,
|
|
57
|
+
install,
|
|
58
|
+
workspace,
|
|
59
|
+
} = args;
|
|
42
60
|
|
|
43
61
|
// When checking the workspace, which was added for CI, never sync.
|
|
44
62
|
// Setup like installing packages and `sveltekit-sync` should be done in the CI setup.
|
|
@@ -81,6 +99,11 @@ export const task: Task<Args> = {
|
|
|
81
99
|
await invoke_task('lint');
|
|
82
100
|
}
|
|
83
101
|
|
|
102
|
+
if (build) {
|
|
103
|
+
// Skip sync/gen/install since check handles those separately
|
|
104
|
+
await invoke_task('build', {sync: false, gen: false, install: false, force_build});
|
|
105
|
+
}
|
|
106
|
+
|
|
84
107
|
if (workspace) {
|
|
85
108
|
const error_message = await git_check_clean_workspace();
|
|
86
109
|
if (error_message) {
|