pob 36.0.0 → 37.0.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.
@@ -288,6 +288,7 @@ export default class PobAppGenerator extends Generator {
288
288
  documentation: false,
289
289
  codecov: this.appConfig.codecov,
290
290
  ci: this.options.ci,
291
+ ciPushWorkflow: this.options.ci,
291
292
  packageManager: this.options.packageManager,
292
293
  isApp: true,
293
294
  splitCIJobs: false,
@@ -39,6 +39,12 @@ export default class CommonTestingGenerator extends Generator {
39
39
  description: "ci",
40
40
  });
41
41
 
42
+ this.option("ciPushWorkflow", {
43
+ type: Boolean,
44
+ required: true,
45
+ description: "push workflow enabled",
46
+ });
47
+
42
48
  this.option("typescript", {
43
49
  type: Boolean,
44
50
  required: true,
@@ -124,6 +130,7 @@ export default class CommonTestingGenerator extends Generator {
124
130
  testing: this.options.enable,
125
131
  testRunner: this.options.runner,
126
132
  e2eTesting: this.options.e2eTesting,
133
+ push: this.options.pushWorkflow,
127
134
  build: this.options.build,
128
135
  typescript: this.options.typescript,
129
136
  documentation: this.options.documentation,
@@ -208,11 +208,14 @@ export default class CommonTypescriptGenerator extends Generator {
208
208
  delete pkg.scripts.flow;
209
209
  }
210
210
 
211
+ // "typescript" is aliased to the typescript 6 api package, still required by
212
+ // typescript-eslint and typedoc. "@typescript/native" is typescript 7, which
213
+ // provides the "tsc" binary.
211
214
  packageUtils.addOrRemoveDevDependencies(
212
215
  pkg,
213
216
  this.options.enable ||
214
217
  this.fs.exists(this.destinationPath("lib/index.d.ts")),
215
- ["typescript"],
218
+ ["typescript", "@typescript/native"],
216
219
  );
217
220
 
218
221
  const tsconfigPath = this.destinationPath("tsconfig.json");
@@ -20,6 +20,12 @@ export default class CoreCIGenerator extends Generator {
20
20
  description: "enable ci",
21
21
  });
22
22
 
23
+ this.option("push", {
24
+ type: Boolean,
25
+ default: true,
26
+ description: "enable push workflow",
27
+ });
28
+
23
29
  this.option("build", {
24
30
  type: Boolean,
25
31
  default: true,
@@ -113,57 +119,60 @@ export default class CoreCIGenerator extends Generator {
113
119
  this.options.testing && !!pkg.scripts && !!pkg.scripts.test;
114
120
  const build = this.options.build;
115
121
 
116
- await copyAndFormatTpl(
117
- this.fs,
118
- this.templatePath(
119
- this.options.splitJobs
120
- ? "github-action-push-workflow-split.yml.ejs"
121
- : "github-action-push-workflow.yml.ejs",
122
- ),
123
- this.destinationPath(".github/workflows/push.yml"),
124
- {
125
- packageManager: this.options.packageManager || "yarn",
126
- disableYarnGitCache: this.options.disableYarnGitCache,
127
- testing,
128
- e2eTesting:
129
- this.options.e2eTesting && this.options.e2eTesting !== "false"
130
- ? this.options.e2eTesting
131
- : false,
132
- checks,
133
- documentation: this.options.documentation,
134
- build,
135
- typescript: this.options.typescript,
136
- codecov: this.options.codecov,
137
- onlyLatestLTS: this.options.onlyLatestLTS,
138
- isReleasePleaseEnabled: this.isReleasePleaseEnabled,
139
- publishSinglePackage: this.isReleasePleaseEnabled && !pkg.private,
140
- publishMonorepo:
141
- this.isReleasePleaseEnabled &&
142
- inMonorepo &&
143
- inMonorepo.root &&
144
- inMonorepo.pobConfig?.project?.type === "lib",
145
- nodeLatestMajorVersion: latestLTS,
146
- nodeMaintenanceMajorVersion: maintenanceLTS,
147
- packageManagerRun,
148
- packageManagerExec,
149
- },
150
- );
151
-
152
- ciContexts.push(
153
- "reviewflow",
154
- ...(this.options.splitJobs
155
- ? [
156
- checks && "checks",
157
- build && "build",
158
- "lint",
159
- testing && !this.options.onlyLatestLTS && `test (${latestLTS})`,
160
- testing && `test (${maintenanceLTS})`,
161
- ].filter(Boolean)
162
- : [
163
- !this.options.onlyLatestLTS && `build (${latestLTS}.x)`,
164
- `build (${maintenanceLTS}.x)`,
165
- ].filter(Boolean)),
166
- );
122
+ if (this.options.push) {
123
+ await copyAndFormatTpl(
124
+ this.fs,
125
+ this.templatePath(
126
+ this.options.splitJobs
127
+ ? "github-action-push-workflow-split.yml.ejs"
128
+ : "github-action-push-workflow.yml.ejs",
129
+ ),
130
+ this.destinationPath(".github/workflows/push.yml"),
131
+ {
132
+ packageManager: this.options.packageManager || "yarn",
133
+ disableYarnGitCache: this.options.disableYarnGitCache,
134
+ testing,
135
+ e2eTesting:
136
+ this.options.e2eTesting && this.options.e2eTesting !== "false"
137
+ ? this.options.e2eTesting
138
+ : false,
139
+ checks,
140
+ documentation: this.options.documentation,
141
+ build,
142
+ typescript: this.options.typescript,
143
+ codecov: this.options.codecov,
144
+ onlyLatestLTS: this.options.onlyLatestLTS,
145
+ isReleasePleaseEnabled: this.isReleasePleaseEnabled,
146
+ publishSinglePackage: this.isReleasePleaseEnabled && !pkg.private,
147
+ publishMonorepo:
148
+ this.isReleasePleaseEnabled &&
149
+ inMonorepo &&
150
+ inMonorepo.root &&
151
+ inMonorepo.pobConfig?.project?.type === "lib",
152
+ nodeLatestMajorVersion: latestLTS,
153
+ nodeMaintenanceMajorVersion: maintenanceLTS,
154
+ packageManagerRun,
155
+ packageManagerExec,
156
+ },
157
+ );
158
+ ciContexts.push(
159
+ "reviewflow",
160
+ ...(this.options.splitJobs
161
+ ? [
162
+ checks && "checks",
163
+ build && "build",
164
+ "lint",
165
+ testing && !this.options.onlyLatestLTS && `test (${latestLTS})`,
166
+ testing && `test (${maintenanceLTS})`,
167
+ ].filter(Boolean)
168
+ : [
169
+ !this.options.onlyLatestLTS && `build (${latestLTS}.x)`,
170
+ `build (${maintenanceLTS}.x)`,
171
+ ].filter(Boolean)),
172
+ );
173
+ } else {
174
+ this.fs.delete(this.destinationPath(".github/workflows/push.yml"));
175
+ }
167
176
  } else {
168
177
  this.fs.delete(this.destinationPath(".github/workflows/push.yml"));
169
178
  }
@@ -7,6 +7,7 @@ import { writeAndFormat } from "../../../utils/writeAndFormat.js";
7
7
  const minimumReleaseAgeExcludePackages = [
8
8
  "@pob/*",
9
9
  "pob-dependencies",
10
+ "check-package-dependencies",
10
11
  "alouette",
11
12
  "alouette-icons",
12
13
  "nightingale",
@@ -76,6 +76,7 @@ export default class CoreVSCodeGenerator extends Generator {
76
76
  {
77
77
  yarn: this.options.packageManager === "yarn",
78
78
  pnp: this.options.yarnNodeLinker === "pnp",
79
+ typescript: this.options.typescript,
79
80
  },
80
81
  );
81
82
  await copyAndFormatTpl(
@@ -8,7 +8,8 @@
8
8
  <% } -%>
9
9
  "dbaeumer.vscode-eslint",
10
10
  "EditorConfig.EditorConfig",
11
- "esbenp.prettier-vscode"
11
+ "esbenp.prettier-vscode"<% if (typescript) { -%>,
12
+ "TypeScriptTeam.native-preview"<% } %>
12
13
  ],
13
14
  // List of extensions recommended by VS Code that should not be recommended for users of this workspace.
14
15
  "unwantedRecommendations": []
@@ -13,12 +13,9 @@
13
13
  },
14
14
  <% } -%>
15
15
  <% if (typescript) { -%>
16
- <% if (yarn && pnp) { -%>
17
- "typescript.tsdk": ".yarn/sdks/typescript/lib",
18
- <% } else { -%>
19
- "typescript.tsdk": "node_modules/typescript/lib",
20
- <% } -%>
21
- "typescript.enablePromptUseWorkspaceTsdk": true,
16
+ // typescript 7 is provided by the TypeScriptTeam.native-preview extension.
17
+ // "typescript" resolves to the typescript 6 api package, which has no
18
+ // tsserver, so it cannot be used as "typescript.tsdk".
22
19
  <% } -%>
23
20
 
24
21
  <% if (yarn) { -%>
@@ -321,6 +321,7 @@ export default class PobLibGenerator extends Generator {
321
321
  documentation: !!this.pobjson.documentation,
322
322
  codecov: this.pobjson.testing && this.pobjson.testing.codecov,
323
323
  ci: this.options.ci,
324
+ ciPushWorkflow: this.options.ci,
324
325
  packageManager,
325
326
  isApp: false,
326
327
  splitCIJobs: false,
@@ -167,6 +167,13 @@ export default class PobMonorepoGenerator extends Generator {
167
167
  : this.fs.exists(this.destinationPath(".circleci/config.yml")) ||
168
168
  this.fs.exists(this.destinationPath(".github/workflows")),
169
169
  },
170
+ {
171
+ type: "confirm",
172
+ name: "ciPushWorkflow",
173
+ message: "Would you like ci push workflow ?",
174
+ when: (answers) => answers.ci,
175
+ default: config.ciPushWorkflow == null ? true : config.ciPushWorkflow,
176
+ },
170
177
  {
171
178
  type: "confirm",
172
179
  name: "testing",
@@ -252,6 +259,7 @@ export default class PobMonorepoGenerator extends Generator {
252
259
  documentation: !!this.pobLernaConfig.documentation,
253
260
  codecov: this.pobLernaConfig.testing && this.pobLernaConfig.codecov,
254
261
  ci: this.pobLernaConfig.ci,
262
+ ciPushWorkflow: this.pobLernaConfig.ciPushWorkflow,
255
263
  packageManager: this.options.packageManager,
256
264
  isApp: this.options.isAppProject,
257
265
  onlyLatestLTS: this.options.onlyLatestLTS,
@@ -81,10 +81,13 @@ export default class MonorepoTypescriptGenerator extends Generator {
81
81
  delete pkg.scripts.flow;
82
82
  }
83
83
 
84
+ // "typescript" is aliased to the typescript 6 api package, still required by
85
+ // typescript-eslint and typedoc. "@typescript/native" is typescript 7, which
86
+ // provides the "tsc" binary.
84
87
  packageUtils.addOrRemoveDevDependencies(
85
88
  pkg,
86
89
  pkg.name === "@pob/eslint-config-monorepo" || this.options.enable,
87
- ["typescript"],
90
+ ["typescript", "@typescript/native"],
88
91
  );
89
92
 
90
93
  if (this.options.enable) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "36.0.0",
3
+ "version": "37.0.0",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/vitest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -39,25 +39,26 @@
39
39
  "lodash.camelcase": "^4.3.0",
40
40
  "lodash.kebabcase": "^4.1.1",
41
41
  "mem-fs": "4.1.5",
42
- "mem-fs-editor": "12.0.4",
42
+ "mem-fs-editor": "12.0.6",
43
43
  "minimist": "1.2.8",
44
44
  "oxfmt": "0.54.0",
45
45
  "parse-author": "2.0.0",
46
46
  "semver": "7.8.5",
47
- "typescript": "6.0.3",
47
+ "typescript": "npm:@typescript/typescript6@6.0.2",
48
48
  "validate-npm-package-name": "^8.0.0",
49
49
  "yeoman-environment": "6.1.0",
50
50
  "yeoman-generator": "8.2.2",
51
- "@pob/eslint-config": "65.7.0",
52
- "@pob/sort-object": "11.1.1",
51
+ "@pob/eslint-config": "66.0.0",
52
+ "@pob/eslint-config-typescript-react": "66.0.0",
53
53
  "@pob/sort-pkg": "13.1.2",
54
- "pob-dependencies": "25.0.0",
55
- "@pob/eslint-config-typescript-react": "65.7.0"
54
+ "@pob/sort-object": "11.1.1",
55
+ "pob-dependencies": "26.0.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/node": "24.13.3",
59
+ "@typescript/native": "npm:typescript@7.0.2",
59
60
  "@yeoman/types": "1.11.1",
60
- "@pob/root": "25.0.0"
61
+ "@pob/root": "26.0.0"
61
62
  },
62
63
  "engines": {
63
64
  "node": ">=22.18.0"