@ykdz/template 0.0.8 → 0.0.9

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.
Files changed (39) hide show
  1. package/dist/cli.js +7 -7
  2. package/node_modules/@ykdz/template-builtin-source/dist/src/index.js +10 -6
  3. package/node_modules/@ykdz/template-builtin-source/dist/templates/hono-api/projection.js +15 -5
  4. package/node_modules/@ykdz/template-builtin-source/dist/templates/ts-lib/projection.js +15 -5
  5. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-app/projection.js +23 -4
  6. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-hono-app/projection.js +6 -6
  7. package/node_modules/@ykdz/template-builtin-source/package.json +15 -2
  8. package/node_modules/@ykdz/template-builtin-source/templates/preset-source.json +14 -2
  9. package/node_modules/@ykdz/template-builtin-source/templates/shared/oxc/node/oxlint.config.ts +25 -3
  10. package/node_modules/@ykdz/template-builtin-source/templates/shared/oxc/tsconfig.config.json +20 -0
  11. package/node_modules/@ykdz/template-builtin-source/templates/shared/oxc/vue/oxlint.config.ts +27 -3
  12. package/node_modules/@ykdz/template-builtin-source/templates/vue-app/env.d.ts +7 -0
  13. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/env.d.ts +7 -0
  14. package/node_modules/@ykdz/template-core/dist/declarations.js +34 -1
  15. package/node_modules/@ykdz/template-core/dist/dependency-catalog.js +11 -6
  16. package/node_modules/@ykdz/template-core/dist/devcontainer.d.ts +5 -5
  17. package/node_modules/@ykdz/template-core/dist/editor-customization.js +20 -29
  18. package/node_modules/@ykdz/template-core/dist/generated-scenarios.d.ts +4 -4
  19. package/node_modules/@ykdz/template-core/dist/generated-scenarios.js +29 -9
  20. package/node_modules/@ykdz/template-core/dist/generation-context.js +8 -3
  21. package/node_modules/@ykdz/template-core/dist/next-step-instructions.js +3 -0
  22. package/node_modules/@ykdz/template-core/dist/package-addition.d.ts +2 -2
  23. package/node_modules/@ykdz/template-core/dist/package-addition.js +22 -8
  24. package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +1 -0
  25. package/node_modules/@ykdz/template-core/dist/preset-projection.d.ts +3 -3
  26. package/node_modules/@ykdz/template-core/dist/preset-projection.js +1 -0
  27. package/node_modules/@ykdz/template-core/dist/preset-source.js +60 -45
  28. package/node_modules/@ykdz/template-core/dist/project-github.d.ts +3 -3
  29. package/node_modules/@ykdz/template-core/dist/project-github.js +1 -0
  30. package/node_modules/@ykdz/template-core/dist/projection-capabilities.d.ts +7 -3
  31. package/node_modules/@ykdz/template-core/dist/projection-capabilities.js +187 -120
  32. package/node_modules/@ykdz/template-core/dist/renderer.d.ts +2 -2
  33. package/node_modules/@ykdz/template-core/dist/renderer.js +2 -2
  34. package/node_modules/@ykdz/template-core/dist/template-boundary-check.d.ts +1 -1
  35. package/node_modules/@ykdz/template-core/dist/template-boundary-check.js +8 -10
  36. package/node_modules/@ykdz/template-core/dist/toolchain-resolution.d.ts +5 -5
  37. package/node_modules/@ykdz/template-core/dist/toolchain-resolution.js +9 -10
  38. package/node_modules/@ykdz/template-core/package.json +9 -2
  39. package/package.json +12 -5
@@ -122,15 +122,14 @@ function parsePnpmRegistryMetadata(value) {
122
122
  if (!isRecord(metadata)) {
123
123
  continue;
124
124
  }
125
- versions[version] = {
126
- engines: isRecord(metadata.engines)
127
- ? {
128
- node: typeof metadata.engines.node === "string"
129
- ? metadata.engines.node
130
- : undefined,
131
- }
132
- : undefined,
133
- };
125
+ const nodeRange = isRecord(metadata.engines)
126
+ ? metadata.engines.node
127
+ : undefined;
128
+ versions[version] = isRecord(metadata.engines)
129
+ ? {
130
+ engines: typeof nodeRange === "string" ? { node: nodeRange } : {},
131
+ }
132
+ : {};
134
133
  }
135
134
  return { versions };
136
135
  }
@@ -139,7 +138,7 @@ function latestCompatiblePnpmVersion(metadata, nodeMajor) {
139
138
  .filter(([version]) => /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(version))
140
139
  .filter(([, packageMetadata]) => nodeSatisfiesRange(nodeMajor, packageMetadata.engines?.node))
141
140
  .map(([version]) => version)
142
- .sort(compareSemver);
141
+ .toSorted(compareSemver);
143
142
  const latest = candidates.at(-1);
144
143
  if (!latest) {
145
144
  throw new Error(`pnpm registry metadata did not contain a release compatible with Node ${nodeMajor}`);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ykdz/template-core",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "private": true,
5
5
  "files": [
6
6
  "dist"
@@ -14,6 +14,10 @@
14
14
  },
15
15
  "scripts": {
16
16
  "build": "rm -rf dist && tsc -p tsconfig.build.json && cp ../../pnpm-workspace.yaml dist/pnpm-workspace.yaml",
17
+ "format:check": "oxfmt --check --config ../../oxfmt.config.ts --ignore-path ../../.oxfmtignore .",
18
+ "format:write": "oxfmt --write --config ../../oxfmt.config.ts --ignore-path ../../.oxfmtignore .",
19
+ "lint": "oxlint --config ../../oxlint.config.ts --ignore-pattern dist .",
20
+ "lint:fix": "oxlint --config ../../oxlint.config.ts --ignore-pattern dist . --fix",
17
21
  "typecheck": "tsc -p tsconfig.json --noEmit"
18
22
  },
19
23
  "dependencies": {
@@ -22,6 +26,9 @@
22
26
  },
23
27
  "devDependencies": {
24
28
  "@types/node": "catalog:",
25
- "execa": "catalog:"
29
+ "execa": "catalog:",
30
+ "oxfmt": "catalog:",
31
+ "oxlint": "catalog:",
32
+ "oxlint-tsgolint": "catalog:"
26
33
  }
27
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ykdz/template",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "private": false,
5
5
  "description": "Project template generator for YKDZ starter projects.",
6
6
  "keywords": [
@@ -33,13 +33,16 @@
33
33
  "dependencies": {
34
34
  "typescript": "^6.0.3",
35
35
  "valibot": "^1.4.2",
36
- "@ykdz/template-builtin-source": "0.0.8",
37
- "@ykdz/template-core": "0.0.8"
36
+ "@ykdz/template-builtin-source": "0.0.9",
37
+ "@ykdz/template-core": "0.0.9"
38
38
  },
39
39
  "devDependencies": {
40
- "@types/node": "^24.0.0"
40
+ "@types/node": "^24.0.0",
41
+ "oxfmt": "^0.57.0",
42
+ "oxlint": "^1.72.0",
43
+ "oxlint-tsgolint": "^0.24.0"
41
44
  },
42
- "bundledDependencies": [
45
+ "bundleDependencies": [
43
46
  "@ykdz/template-builtin-source",
44
47
  "@ykdz/template-core"
45
48
  ],
@@ -48,6 +51,10 @@
48
51
  },
49
52
  "scripts": {
50
53
  "build": "rm -rf dist && tsc -p tsconfig.build.json",
54
+ "format:check": "oxfmt --check --config ../../oxfmt.config.ts --ignore-path ../../.oxfmtignore .",
55
+ "format:write": "oxfmt --write --config ../../oxfmt.config.ts --ignore-path ../../.oxfmtignore .",
56
+ "lint": "oxlint --config ../../oxlint.config.ts --ignore-pattern dist .",
57
+ "lint:fix": "oxlint --config ../../oxlint.config.ts --ignore-pattern dist . --fix",
51
58
  "typecheck": "tsc -p tsconfig.json --noEmit"
52
59
  }
53
60
  }