pob 36.1.0 → 38.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.
@@ -332,13 +332,13 @@ export default class CommonBabelGenerator extends Generator {
332
332
  }
333
333
  const isLibraryRollupPlugin = pkg.name.includes("rollup-plugin");
334
334
 
335
- packageUtils.addOrRemoveDevDependencies(
336
- pkg,
337
- (useBabel && pkg.pob.jsx) ||
338
- (pkg.devDependencies?.["@babel/preset-react"] &&
339
- (isLibraryRollupPlugin || pkg.name === "alouette-icons")),
340
- ["@babel/preset-react"],
341
- );
335
+ // packageUtils.addOrRemoveDevDependencies(
336
+ // pkg,
337
+ // (useBabel && pkg.pob.jsx) ||
338
+ // (pkg.devDependencies?.["@babel/preset-react"] &&
339
+ // (isLibraryRollupPlugin || pkg.name === "alouette-icons")),
340
+ // ["@babel/preset-react"],
341
+ // );
342
342
 
343
343
  packageUtils.removeDevDependencies(pkg, [
344
344
  "babel-preset-env", // now @babel/preset-env
@@ -316,7 +316,12 @@ export default class CommonFormatLintGenerator extends Generator {
316
316
  !pkg.name.startsWith("@pob/eslint-config") &&
317
317
  pkg.name !== "@pob/use-eslint-plugin"
318
318
  ) {
319
- packageUtils.addDevDependencies(pkg, ["@pob/eslint-config"]);
319
+ // @pob/eslint-config is provided through @pob/root (which re-exports it
320
+ // via "@pob/root/eslint-config"), so projects only need @pob/root.
321
+ if (pkg.name !== "@pob/root") {
322
+ packageUtils.addDevDependencies(pkg, ["@pob/root"]);
323
+ }
324
+ packageUtils.removeDevDependencies(pkg, ["@pob/eslint-config"]);
320
325
  packageUtils.addOrRemoveDevDependencies(
321
326
  pkg,
322
327
  shouldHavePluginsDependencies,
@@ -373,7 +378,7 @@ export default class CommonFormatLintGenerator extends Generator {
373
378
 
374
379
  return {
375
380
  imports: [
376
- 'import pobConfig from "@pob/eslint-config"',
381
+ 'import pobConfig from "@pob/root/eslint-config"',
377
382
  useTypescript &&
378
383
  hasReact &&
379
384
  'import pobTypescriptConfigReact from "@pob/eslint-config-typescript-react"',
@@ -385,25 +390,23 @@ export default class CommonFormatLintGenerator extends Generator {
385
390
  if (!useTypescript) {
386
391
  return [
387
392
  useNode
388
- ? `...pobConfig(import.meta.url).configs.node${pkg.type === "commonjs" ? "Commonjs" : "Module"}`
389
- : `...pobConfig(import.meta.url).configs.base${pkg.type === "commonjs" ? "Commonjs" : "Module"}`,
393
+ ? `...pobConfig.configs.node${pkg.type === "commonjs" ? "Commonjs" : "Module"}`
394
+ : `...pobConfig.configs.base${pkg.type === "commonjs" ? "Commonjs" : "Module"}`,
390
395
  ];
391
396
  }
392
397
  if (!hasReact) {
393
398
  return [
394
399
  useNode
395
- ? "...pobConfig(import.meta.url).configs.node"
396
- : "...pobConfig(import.meta.url).configs.base",
400
+ ? "...pobConfig.configs.node"
401
+ : "...pobConfig.configs.base",
397
402
  ];
398
403
  }
399
404
 
400
405
  return [
401
- useNode
402
- ? "...pobConfig(import.meta.url).configs.node"
403
- : "...pobConfig(import.meta.url).configs.base",
404
- this.options.isApp && "...pobConfig(import.meta.url).configs.app",
406
+ useNode ? "...pobConfig.configs.node" : "...pobConfig.configs.base",
407
+ this.options.isApp && "...pobConfig.configs.app",
405
408
  pkg.dependencies?.["react-native-web"] &&
406
- '...pobTypescriptConfigReact(import.meta.url).configs["react-native-web"]',
409
+ '...pobTypescriptConfigReact.configs["react-native-web"]',
407
410
  ];
408
411
  })().filter(Boolean),
409
412
  };
@@ -412,7 +415,7 @@ export default class CommonFormatLintGenerator extends Generator {
412
415
  const isMonorepoRoot =
413
416
  this.options.monorepo || Boolean(inMonorepo && inMonorepo.root);
414
417
  if (isMonorepoRoot && useTypescript) {
415
- flatCascade.push("...pobConfig(import.meta.url).configs.monorepo");
418
+ flatCascade.push("...pobConfig.configs.monorepo");
416
419
  }
417
420
 
418
421
  const eslintrcBadPath = this.destinationPath(".eslintrc");
@@ -39,6 +39,12 @@ export default class CommonTestingGenerator extends Generator {
39
39
  description: "ci",
40
40
  });
41
41
 
42
+ this.option("disablePushWorkflow", {
43
+ type: Boolean,
44
+ required: true,
45
+ description: "disable push workflow",
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
+ disablePushWorkflow: this.options.disablePushWorkflow,
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("disablePushWorkflow", {
24
+ type: Boolean,
25
+ default: true,
26
+ description: "disable push workflow",
27
+ });
28
+
23
29
  this.option("build", {
24
30
  type: Boolean,
25
31
  default: true,
@@ -113,57 +119,72 @@ 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.disablePushWorkflow) {
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: (script, packagePath) => {
155
+ return packageManagerRun(
156
+ this.options.packageManager,
157
+ script,
158
+ packagePath,
159
+ );
160
+ },
161
+ packageManagerExec: (command, packagePath) => {
162
+ return packageManagerExec(
163
+ this.options.packageManager,
164
+ command,
165
+ packagePath,
166
+ );
167
+ },
168
+ },
169
+ );
170
+ ciContexts.push(
171
+ "reviewflow",
172
+ ...(this.options.splitJobs
173
+ ? [
174
+ checks && "checks",
175
+ build && "build",
176
+ "lint",
177
+ testing && !this.options.onlyLatestLTS && `test (${latestLTS})`,
178
+ testing && `test (${maintenanceLTS})`,
179
+ ].filter(Boolean)
180
+ : [
181
+ !this.options.onlyLatestLTS && `build (${latestLTS}.x)`,
182
+ `build (${maintenanceLTS}.x)`,
183
+ ].filter(Boolean)),
184
+ );
185
+ } else {
186
+ this.fs.delete(this.destinationPath(".github/workflows/push.yml"));
187
+ }
167
188
  } else {
168
189
  this.fs.delete(this.destinationPath(".github/workflows/push.yml"));
169
190
  }
@@ -179,6 +200,13 @@ export default class CoreCIGenerator extends Generator {
179
200
  this.destinationPath(".github/workflows/gh-pages.yml"),
180
201
  {
181
202
  packageManager: this.options.packageManager,
203
+ packageManagerRun: (script, packagePath) => {
204
+ return packageManagerRun(
205
+ this.options.packageManager,
206
+ "docs:build",
207
+ packagePath,
208
+ );
209
+ },
182
210
  disableYarnGitCache: this.options.disableYarnGitCache,
183
211
  testing: this.options.testing,
184
212
  testRunner: this.options.testRunner,
@@ -58,11 +58,11 @@ jobs:
58
58
  <% if (testRunner === 'node') { -%>
59
59
 
60
60
  - name: Generate Coverage
61
- run: NODE_V8_COVERAGE=./docs/coverage <%= packageManager %> run test:coverage:generate
61
+ run: NODE_V8_COVERAGE=./docs/coverage <%= packageManagerRun("test:coverage:generate") %>
62
62
  <% } else {-%>
63
63
 
64
64
  - name: Generate Coverage
65
- run: <%= packageManager %> run test:coverage:generate
65
+ run: <%= packageManagerRun("test:coverage:generate") %>
66
66
  <% } -%>
67
67
  <% } -%>
68
68
 
@@ -46,7 +46,7 @@ jobs:
46
46
  <% } -%>
47
47
 
48
48
  - name: Checks
49
- run: <%= packageManager %> run checks
49
+ run: <%= packageManagerRun("checks") %>
50
50
 
51
51
  <% } -%>
52
52
  <% if (build) { -%>
@@ -91,10 +91,10 @@ jobs:
91
91
  <% } -%>
92
92
 
93
93
  - name: Build
94
- run: <%= packageManager %> run build
94
+ run: <%= packageManagerRun("build") %>
95
95
 
96
96
  - name: Check nothing was forgotten before commit
97
- run: <%= packageManagerExec(packageManager, 'repository-check-dirty') %>
97
+ run: <%= packageManagerExec('repository-check-dirty') %>
98
98
 
99
99
  <% } -%>
100
100
  lint:
@@ -140,15 +140,15 @@ jobs:
140
140
  <% } -%>
141
141
 
142
142
  - name: Format
143
- run: <%= packageManager %> run format:check
143
+ run: <%= packageManagerRun("format:check") %>
144
144
  <% if (typescript) { -%>
145
145
 
146
146
  - name: Typescript
147
- run: <%= packageManager %> run tsc
147
+ run: <%= packageManagerRun("tsc") %>
148
148
  <% } -%>
149
149
 
150
150
  - name: Eslint
151
- run: <%= packageManager %> run lint:eslint
151
+ run: <%= packageManagerRun("lint:eslint") %>
152
152
  <% if (testing) { -%>
153
153
 
154
154
  test:
@@ -199,11 +199,11 @@ jobs:
199
199
 
200
200
  <% if (codecov) { -%>
201
201
  - name: Test
202
- run: <%= packageManager %> run test
202
+ run: <%= packageManagerRun("test") %>
203
203
  if: matrix.node-version != <%= nodeLatestMajorVersion %>
204
204
 
205
205
  - name: Generate Test Coverage
206
- run: <%= packageManager %> run test:coverage:generate
206
+ run: <%= packageManagerRun("test:coverage:generate") %>
207
207
  if: matrix.node-version == <%= nodeLatestMajorVersion %>
208
208
  env:
209
209
  CI: true
@@ -217,7 +217,7 @@ jobs:
217
217
  <% } else { -%>
218
218
 
219
219
  - name: Test
220
- run: <%= packageManager %> run test
220
+ run: <%= packageManagerRun("test") %>
221
221
  <% } -%>
222
222
  <% } -%>
223
223
  <% if (e2eTesting) { -%>
@@ -269,7 +269,7 @@ jobs:
269
269
  <% } -%>
270
270
 
271
271
  - name: E2E testing
272
- run: <%= packageManager %> <%= e2eTesting === '.' || e2eTesting === true ? '.' : `./${e2eTesting}` %> run test:e2e
272
+ run: <%= packageManagerRun("test:e2e", e2eTesting) %>
273
273
  <% } -%>
274
274
  <% if (isReleasePleaseEnabled) { -%>
275
275
  release:
@@ -84,12 +84,12 @@ jobs:
84
84
 
85
85
  - name: Check nothing was forgotten before commit
86
86
  if: startsWith(matrix.node-version, '<%= nodeLatestMajorVersion %>.')
87
- run: <%= packageManagerExec(packageManager, 'repository-check-dirty') %>
87
+ run: <%= packageManagerExec('repository-check-dirty') %>
88
88
  <% } -%>
89
89
  <% if (codecov) { -%>
90
90
 
91
91
  - name: Generate Test Coverage
92
- run: <%= packageManager %> run test:coverage:generate
92
+ run: <%= packageManagerRun("test:coverage:generate) %>
93
93
  if: startsWith(matrix.node-version, '<%= nodeLatestMajorVersion %>.')
94
94
  env:
95
95
  CI: true
@@ -112,7 +112,7 @@ jobs:
112
112
  <% if (e2eTesting) { -%>
113
113
 
114
114
  - name: E2E testing
115
- run: <%= packageManager %> <%= e2eTesting %> run test:e2e
115
+ run: <%= packageManagerRun("test:e2e", e2eTesting) %>
116
116
  <% } -%>
117
117
  <% if (isReleasePleaseEnabled) { -%>
118
118
 
@@ -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) { -%>
@@ -151,13 +151,19 @@ export default class PobMonorepoGenerator extends Generator {
151
151
  const config = this.config.get("monorepo");
152
152
 
153
153
  if (this.options.updateOnly && config) {
154
- this.pobLernaConfig = config;
155
- this.pobLernaConfig.packageNames = this.packageNames;
156
- this.config.set("monorepo", this.pobLernaConfig);
154
+ this.pobMonorepoConfig = config;
155
+ this.pobMonorepoConfig.packageNames = this.packageNames;
156
+ this.config.set("monorepo", this.pobMonorepoConfig);
157
157
  return;
158
158
  }
159
159
 
160
- this.pobLernaConfig = await this.prompt([
160
+ if (this.pobMonorepoConfig.ciPushWorkflow) {
161
+ throw new Error(
162
+ "ciPushWorkflow is deprecated, use disablePushWorkflow instead",
163
+ );
164
+ }
165
+
166
+ this.pobMonorepoConfig = await this.prompt([
161
167
  {
162
168
  type: "confirm",
163
169
  name: "ci",
@@ -167,6 +173,13 @@ export default class PobMonorepoGenerator extends Generator {
167
173
  : this.fs.exists(this.destinationPath(".circleci/config.yml")) ||
168
174
  this.fs.exists(this.destinationPath(".github/workflows")),
169
175
  },
176
+ {
177
+ type: "confirm",
178
+ name: "disablePushWorkflow",
179
+ message: "Would you like to DISABLE push workflow ?",
180
+ when: (answers) => answers.ci,
181
+ default: config.disablePushWorkflow,
182
+ },
170
183
  {
171
184
  type: "confirm",
172
185
  name: "testing",
@@ -216,8 +229,8 @@ export default class PobMonorepoGenerator extends Generator {
216
229
  default: config ? config.eslint : true,
217
230
  },
218
231
  ]);
219
- this.pobLernaConfig.packageNames = this.packageNames;
220
- this.config.set("monorepo", this.pobLernaConfig);
232
+ this.pobMonorepoConfig.packageNames = this.packageNames;
233
+ this.config.set("monorepo", this.pobMonorepoConfig);
221
234
  this.config.delete("pob-config");
222
235
  }
223
236
 
@@ -226,7 +239,7 @@ export default class PobMonorepoGenerator extends Generator {
226
239
 
227
240
  const packageNames = this.packageNames;
228
241
  const packagePaths = this.packageLocations.filter(
229
- this.pobLernaConfig.typescript
242
+ this.pobMonorepoConfig.typescript
230
243
  ? (packagePath) => fs.existsSync(`${packagePath}/tsconfig.json`)
231
244
  : Boolean,
232
245
  );
@@ -242,16 +255,17 @@ export default class PobMonorepoGenerator extends Generator {
242
255
 
243
256
  this.composeWith("pob:common:testing", {
244
257
  monorepo: true,
245
- enable: this.pobLernaConfig.testing,
246
- runner: this.pobLernaConfig.testRunner,
258
+ enable: this.pobMonorepoConfig.testing,
259
+ runner: this.pobMonorepoConfig.testRunner,
247
260
  disableYarnGitCache: this.options.disableYarnGitCache,
248
- testing: this.pobLernaConfig.testing,
249
- e2eTesting: this.pobLernaConfig.e2eTesting,
250
- build: this.pobLernaConfig.typescript === true,
251
- typescript: this.pobLernaConfig.typescript,
252
- documentation: !!this.pobLernaConfig.documentation,
253
- codecov: this.pobLernaConfig.testing && this.pobLernaConfig.codecov,
254
- ci: this.pobLernaConfig.ci,
261
+ testing: this.pobMonorepoConfig.testing,
262
+ e2eTesting: this.pobMonorepoConfig.e2eTesting,
263
+ build: this.pobMonorepoConfig.typescript === true,
264
+ typescript: this.pobMonorepoConfig.typescript,
265
+ documentation: !!this.pobMonorepoConfig.documentation,
266
+ codecov: this.pobMonorepoConfig.testing && this.pobMonorepoConfig.codecov,
267
+ ci: this.pobMonorepoConfig.ci,
268
+ disablePushWorkflow: this.pobMonorepoConfig.disablePushWorkflow,
255
269
  packageManager: this.options.packageManager,
256
270
  isApp: this.options.isAppProject,
257
271
  onlyLatestLTS: this.options.onlyLatestLTS,
@@ -259,10 +273,10 @@ export default class PobMonorepoGenerator extends Generator {
259
273
  });
260
274
 
261
275
  const rootIgnorePaths = [
262
- this.pobLernaConfig.e2eTesting &&
263
- `${this.pobLernaConfig.e2eTesting === "." || this.pobLernaConfig.e2eTesting === true ? "" : `/${this.pobLernaConfig.e2eTesting}`}/playwright-report/`,
264
- this.pobLernaConfig.e2eTesting &&
265
- `${this.pobLernaConfig.e2eTesting === "." || this.pobLernaConfig.e2eTesting === true ? "" : `/${this.pobLernaConfig.e2eTesting}`}/test-results/`,
276
+ this.pobMonorepoConfig.e2eTesting &&
277
+ `${this.pobMonorepoConfig.e2eTesting === "." || this.pobMonorepoConfig.e2eTesting === true ? "" : `/${this.pobMonorepoConfig.e2eTesting}`}/playwright-report/`,
278
+ this.pobMonorepoConfig.e2eTesting &&
279
+ `${this.pobMonorepoConfig.e2eTesting === "." || this.pobMonorepoConfig.e2eTesting === true ? "" : `/${this.pobMonorepoConfig.e2eTesting}`}/test-results/`,
266
280
  ].filter(Boolean);
267
281
 
268
282
  if (hasTamagui(this.packages, this.packageConfigs)) {
@@ -275,12 +289,12 @@ export default class PobMonorepoGenerator extends Generator {
275
289
 
276
290
  this.composeWith("pob:common:format-lint", {
277
291
  monorepo: true,
278
- documentation: this.pobLernaConfig.documentation,
292
+ documentation: this.pobMonorepoConfig.documentation,
279
293
  storybook: pkg?.devDependencies?.storybook,
280
- typescript: this.pobLernaConfig.typescript,
281
- build: this.pobLernaConfig.typescript === true,
282
- testing: this.pobLernaConfig.testing,
283
- testRunner: this.pobLernaConfig.testRunner,
294
+ typescript: this.pobMonorepoConfig.typescript,
295
+ build: this.pobMonorepoConfig.typescript === true,
296
+ testing: this.pobMonorepoConfig.testing,
297
+ testRunner: this.pobMonorepoConfig.testRunner,
284
298
  packageManager: this.options.packageManager,
285
299
  yarnNodeLinker: this.options.yarnNodeLinker,
286
300
  appTypes: JSON.stringify(getAppTypes(this.packageConfigs)),
@@ -296,8 +310,8 @@ export default class PobMonorepoGenerator extends Generator {
296
310
  });
297
311
 
298
312
  this.composeWith("pob:lib:doc", {
299
- enabled: this.pobLernaConfig.documentation,
300
- testing: this.pobLernaConfig.testing,
313
+ enabled: this.pobMonorepoConfig.documentation,
314
+ testing: this.pobMonorepoConfig.testing,
301
315
  packageNames: JSON.stringify(packageNames),
302
316
  packagePaths: JSON.stringify(packagePaths),
303
317
  packageManager: this.options.packageManager,
@@ -308,9 +322,9 @@ export default class PobMonorepoGenerator extends Generator {
308
322
  monorepo: true,
309
323
  packageManager: this.options.packageManager,
310
324
  yarnNodeLinker: this.options.yarnNodeLinker,
311
- typescript: this.pobLernaConfig.typescript,
312
- testing: this.pobLernaConfig.testing,
313
- testRunner: this.pobLernaConfig.testRunner,
325
+ typescript: this.pobMonorepoConfig.typescript,
326
+ testing: this.pobMonorepoConfig.testing,
327
+ testRunner: this.pobMonorepoConfig.testRunner,
314
328
  packageNames: JSON.stringify(packageNames),
315
329
  packageLocations: JSON.stringify(this.packageLocations),
316
330
  });
@@ -318,9 +332,9 @@ export default class PobMonorepoGenerator extends Generator {
318
332
  // Always add a gitignore, because npm publish uses it.
319
333
  this.composeWith("pob:core:gitignore", {
320
334
  root: true,
321
- typescript: this.pobLernaConfig.typescript,
322
- documentation: this.pobLernaConfig.documentation,
323
- testing: this.pobLernaConfig.testing,
335
+ typescript: this.pobMonorepoConfig.typescript,
336
+ documentation: this.pobMonorepoConfig.documentation,
337
+ testing: this.pobMonorepoConfig.testing,
324
338
  // TODO add workspaces paths like we do in format-lint
325
339
  paths: [
326
340
  // TODO remove gitignorePaths
@@ -328,7 +342,7 @@ export default class PobMonorepoGenerator extends Generator {
328
342
  ...rootIgnorePaths,
329
343
  ].join("\n"),
330
344
  // todo: fix this using workspaces
331
- // buildDirectory: this.pobLernaConfig.typescript ? `/*/build` : "",
345
+ // buildDirectory: this.pobMonorepoConfig.typescript ? `/*/build` : "",
332
346
  });
333
347
 
334
348
  this.composeWith("pob:common:remove-old-dependencies");
@@ -337,20 +351,20 @@ export default class PobMonorepoGenerator extends Generator {
337
351
  enable: true,
338
352
  packageManager: this.options.packageManager,
339
353
  enablePublish: !this.options.isAppProject,
340
- withBabel: this.pobLernaConfig.typescript,
354
+ withBabel: this.pobMonorepoConfig.typescript,
341
355
  isMonorepo: true,
342
- ci: this.pobLernaConfig.ci,
356
+ ci: this.pobMonorepoConfig.ci,
343
357
  disableYarnGitCache: this.options.disableYarnGitCache,
344
358
  updateOnly: this.options.updateOnly,
345
359
  });
346
360
 
347
361
  this.composeWith("pob:monorepo:typescript", {
348
- enable: this.pobLernaConfig.typescript,
349
- checkOnly: this.pobLernaConfig.typescript === "check-only",
362
+ enable: this.pobMonorepoConfig.typescript,
363
+ checkOnly: this.pobMonorepoConfig.typescript === "check-only",
350
364
  isAppProject: this.options.isAppProject,
351
365
  packageNames: JSON.stringify(packageNames),
352
366
  packagePaths: JSON.stringify(packagePaths),
353
- testRunner: this.pobLernaConfig.testRunner,
367
+ testRunner: this.pobMonorepoConfig.testRunner,
354
368
  onlyLatestLTS: this.options.onlyLatestLTS,
355
369
  packageManager: this.options.packageManager,
356
370
  });
@@ -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) {
@@ -1,16 +1,18 @@
1
1
  import { quoteArg } from "./execUtils.js";
2
2
 
3
- export const packageManagerRun = (packageManager, script) => {
3
+ export const packageManagerRun = (packageManager, script, packagePath) => {
4
+ const packagePathArg =
5
+ packagePath === "." || packagePath === true ? "" : packagePath;
4
6
  switch (packageManager) {
5
7
  case undefined:
6
8
  case "yarn":
7
- return `yarn run ${script}`;
9
+ return `yarn${packagePathArg ? ` ${packagePathArg}` : ""} run ${script}`;
8
10
  case "npm":
9
- return `npm run ${script}`;
11
+ return `npm run${packagePathArg ? ` --prefix ${packagePathArg}` : ""} ${script}`;
10
12
  case "bun":
11
- return `bun run ${script}`;
13
+ return `bun run${packagePathArg ? ` --cwd ${packagePathArg}` : ""} ${script}`;
12
14
  case "pnpm":
13
- return `pnpm run ${script}`;
15
+ return `pnpm${packagePathArg ? ` --dir ${packagePathArg}` : ""} run ${script}`;
14
16
  default:
15
17
  throw new Error(`Unsupported package manager: ${packageManager}`);
16
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "36.1.0",
3
+ "version": "38.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-typescript-react": "65.8.0",
52
- "@pob/eslint-config": "65.7.0",
51
+ "@pob/eslint-config": "67.0.0",
52
+ "@pob/eslint-config-typescript-react": "67.0.0",
53
53
  "@pob/sort-pkg": "13.1.2",
54
54
  "@pob/sort-object": "11.1.1",
55
- "pob-dependencies": "25.1.0"
55
+ "pob-dependencies": "27.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.1.0"
61
+ "@pob/root": "27.0.0"
61
62
  },
62
63
  "engines": {
63
64
  "node": ">=22.18.0"