@defold-typescript/cli 0.5.3 → 0.5.5
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/bin.js +5 -2
- package/dist/index.js +5 -2
- package/dist/init.d.ts +1 -0
- package/package.json +3 -3
- package/src/init.ts +15 -11
package/dist/bin.js
CHANGED
|
@@ -648,12 +648,15 @@ function typesVersionSpec() {
|
|
|
648
648
|
}
|
|
649
649
|
var SCAFFOLD_DEV_DEPS = {
|
|
650
650
|
"@defold-typescript/types": typesVersionSpec(),
|
|
651
|
+
"@defold-typescript/cli": typesVersionSpec(),
|
|
651
652
|
"@biomejs/biome": "^2.2.0"
|
|
652
653
|
};
|
|
653
654
|
function repairManagedDevDeps(devDeps, force = false) {
|
|
654
655
|
delete devDeps["@defold-typescript/transpiler"];
|
|
655
|
-
|
|
656
|
-
devDeps["
|
|
656
|
+
for (const name of ["@defold-typescript/types", "@defold-typescript/cli"]) {
|
|
657
|
+
if (force || devDeps[name]?.startsWith("workspace:")) {
|
|
658
|
+
devDeps[name] = typesVersionSpec();
|
|
659
|
+
}
|
|
657
660
|
}
|
|
658
661
|
}
|
|
659
662
|
function writeJson(filePath, value) {
|
package/dist/index.js
CHANGED
|
@@ -712,12 +712,15 @@ function typesVersionSpec() {
|
|
|
712
712
|
}
|
|
713
713
|
var SCAFFOLD_DEV_DEPS = {
|
|
714
714
|
"@defold-typescript/types": typesVersionSpec(),
|
|
715
|
+
"@defold-typescript/cli": typesVersionSpec(),
|
|
715
716
|
"@biomejs/biome": "^2.2.0"
|
|
716
717
|
};
|
|
717
718
|
function repairManagedDevDeps(devDeps, force = false) {
|
|
718
719
|
delete devDeps["@defold-typescript/transpiler"];
|
|
719
|
-
|
|
720
|
-
devDeps["
|
|
720
|
+
for (const name of ["@defold-typescript/types", "@defold-typescript/cli"]) {
|
|
721
|
+
if (force || devDeps[name]?.startsWith("workspace:")) {
|
|
722
|
+
devDeps[name] = typesVersionSpec();
|
|
723
|
+
}
|
|
721
724
|
}
|
|
722
725
|
}
|
|
723
726
|
function writeJson(filePath, value) {
|
package/dist/init.d.ts
CHANGED
|
@@ -7,5 +7,6 @@ export interface RunInitResult {
|
|
|
7
7
|
readonly written: string[];
|
|
8
8
|
readonly scriptKind: ScriptKind | null;
|
|
9
9
|
}
|
|
10
|
+
export declare const SCAFFOLD_DEV_DEPS: Record<string, string>;
|
|
10
11
|
export declare function runNewProjectInit(cwd: string, force?: boolean): RunInitResult;
|
|
11
12
|
export declare function runInit(opts: RunInitOptions): RunInitResult;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defold-typescript/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "End-user CLI for scaffolding and building Defold projects written in TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test": "bun test"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@defold-typescript/transpiler": "0.5.
|
|
35
|
-
"@defold-typescript/types": "0.5.
|
|
34
|
+
"@defold-typescript/transpiler": "0.5.5",
|
|
35
|
+
"@defold-typescript/types": "0.5.5"
|
|
36
36
|
}
|
|
37
37
|
}
|
package/src/init.ts
CHANGED
|
@@ -269,27 +269,31 @@ function typesVersionSpec(): string {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
//
|
|
273
|
-
//
|
|
274
|
-
//
|
|
275
|
-
//
|
|
276
|
-
|
|
272
|
+
// @defold-typescript/types (type-only, for the editor) and @defold-typescript/cli
|
|
273
|
+
// (the local bin the managed `bunx --no-install defold-typescript` mise tasks
|
|
274
|
+
// resolve) both ship into the consumer. The transpiler must NOT be a direct
|
|
275
|
+
// consumer dep — it arrives transitively through the CLI. Pin both managed deps
|
|
276
|
+
// to this CLI's own version so the coordinated-release set stays in lockstep.
|
|
277
|
+
export const SCAFFOLD_DEV_DEPS: Record<string, string> = {
|
|
277
278
|
"@defold-typescript/types": typesVersionSpec(),
|
|
279
|
+
"@defold-typescript/cli": typesVersionSpec(),
|
|
278
280
|
"@biomejs/biome": "^2.2.0",
|
|
279
281
|
};
|
|
280
282
|
|
|
281
|
-
// Older scaffolds wrote
|
|
283
|
+
// Older scaffolds wrote the managed `@defold-typescript/*` devDeps as
|
|
282
284
|
// `workspace:*`, which only resolves inside this monorepo and breaks
|
|
283
285
|
// `bun install` in consumers. The additive merge in `writeTsSurface` never
|
|
284
286
|
// repairs an entry it didn't itself create, so repair them explicitly: the
|
|
285
287
|
// transpiler is CLI-internal and must not be a consumer dep at all, and a
|
|
286
|
-
// `workspace:` types pin must become a concrete published version. A
|
|
287
|
-
// user-chosen
|
|
288
|
-
// opt-in to refresh the managed
|
|
288
|
+
// `workspace:` types/cli pin must become a concrete published version. A
|
|
289
|
+
// concrete user-chosen pin is left alone unless `force` is set, the explicit
|
|
290
|
+
// opt-in to refresh the managed pins (and only those) to the CLI's version.
|
|
289
291
|
function repairManagedDevDeps(devDeps: Record<string, string>, force = false): void {
|
|
290
292
|
delete devDeps["@defold-typescript/transpiler"];
|
|
291
|
-
|
|
292
|
-
devDeps["
|
|
293
|
+
for (const name of ["@defold-typescript/types", "@defold-typescript/cli"]) {
|
|
294
|
+
if (force || devDeps[name]?.startsWith("workspace:")) {
|
|
295
|
+
devDeps[name] = typesVersionSpec();
|
|
296
|
+
}
|
|
293
297
|
}
|
|
294
298
|
}
|
|
295
299
|
|