pob 34.2.0 → 35.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.
- package/CHANGELOG.md +30 -0
- package/lib/generators/app/PobAppGenerator.js +90 -87
- package/lib/generators/app/e2e-testing/AppE2ETestingGenerator.js +5 -1
- package/lib/generators/app/ignorePaths.js +1 -2
- package/lib/generators/common/babel/CommonBabelGenerator.js +3 -3
- package/lib/generators/common/format-lint/CommonLintGenerator.js +17 -17
- package/lib/generators/common/format-lint/templates/{prettierignore.ejs → oxfmtrc.jsonc.ejs} +15 -8
- package/lib/generators/common/old-dependencies/CommonRemoveOldDependenciesGenerator.js +6 -1
- package/lib/generators/common/testing/CommonTestingGenerator.js +30 -162
- package/lib/generators/common/transpiler/CommonTranspilerGenerator.js +3 -3
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +24 -10
- package/lib/generators/common/typescript/templates/tsconfig.json.ejs +6 -5
- package/lib/generators/core/bun/templates/bunfig.toml.ejs +1 -1
- package/lib/generators/core/ci/CoreCIGenerator.js +4 -12
- package/lib/generators/core/ci/templates/github-action-push-workflow-split.yml.ejs +2 -2
- package/lib/generators/core/ci/templates/github-action-push-workflow.yml.ejs +2 -2
- package/lib/generators/core/package/CorePackageGenerator.js +2 -6
- package/lib/generators/core/renovate/CoreRenovateGenerator.js +1 -1
- package/lib/generators/core/sort-package/CoreSortPackageGenerator.js +1 -1
- package/lib/generators/core/vscode/CoreVSCodeGenerator.js +4 -4
- package/lib/generators/core/vscode/templates/settings.json.ejs +1 -1
- package/lib/generators/core/yarn/CoreYarnGenerator.js +6 -6
- package/lib/generators/lib/PobLibGenerator.js +2 -7
- package/lib/generators/lib/doc/LibDocGenerator.js +6 -4
- package/lib/generators/lib/readme/LibReadmeGenerator.js +2 -2
- package/lib/generators/monorepo/PobMonorepoGenerator.js +2 -2
- package/lib/generators/monorepo/lerna/MonorepoLernaGenerator.js +1 -1
- package/lib/generators/monorepo/typescript/MonorepoTypescriptGenerator.js +4 -5
- package/lib/generators/monorepo/workspaces/MonorepoWorkspacesGenerator.js +15 -10
- package/lib/generators/pob/PobBaseGenerator.js +4 -4
- package/lib/utils/ensureJsonFileFormatted.js +7 -11
- package/lib/utils/writeAndFormat.js +16 -31
- package/package.json +28 -30
- package/lib/generators/common/testing/templates/.eslintrc.json +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [35.0.0](https://github.com/christophehurpeau/pob/compare/pob@34.2.0...pob@35.0.0) (2026-05-20)
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* **deps:** update dependency typescript to v6 (#2752)
|
|
11
|
+
* stop using baseUrl replaced by hash slash import
|
|
12
|
+
* use oxfmt
|
|
13
|
+
* drop jest
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **deps:** update dependency eslint to v10.4.0 ([#2747](https://github.com/christophehurpeau/pob/issues/2747))
|
|
18
|
+
* **deps:** update dependency semver to v7.8.0 ([#2748](https://github.com/christophehurpeau/pob/issues/2748))
|
|
19
|
+
* **deps:** update dependency typescript to v6 ([#2752](https://github.com/christophehurpeau/pob/issues/2752))
|
|
20
|
+
* drop jest
|
|
21
|
+
* remove support for remix in PobAppGenerator and update ignorePaths
|
|
22
|
+
* replace webpack example by vite example and add tsconfig target vite
|
|
23
|
+
* stop using baseUrl replaced by hash slash import
|
|
24
|
+
* use oxfmt
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **deps:** update @pob/eslint-config to v65.4.3 ([#2722](https://github.com/christophehurpeau/pob/issues/2722))
|
|
29
|
+
|
|
30
|
+
Version bump for dependency: @pob/sort-object
|
|
31
|
+
Version bump for dependency: @pob/sort-pkg
|
|
32
|
+
Version bump for dependency: pob-dependencies
|
|
33
|
+
Version bump for dependency: @pob/root
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
## [34.2.0](https://github.com/christophehurpeau/pob/compare/pob@34.1.0...pob@34.2.0) (2026-05-01)
|
|
7
37
|
|
|
8
38
|
### Features
|
|
@@ -5,15 +5,18 @@ import inMonorepo from "../../utils/inMonorepo.js";
|
|
|
5
5
|
import * as packageUtils from "../../utils/package.js";
|
|
6
6
|
import { appIgnorePaths } from "./ignorePaths.js";
|
|
7
7
|
|
|
8
|
-
const appsWithTypescript = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"vite"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const appsWithTypescript = ["alp", "next.js", "vite", "expo", "yarn-plugin"];
|
|
9
|
+
const appsWithBrowser = ["alp", "next.js", "vite"];
|
|
10
|
+
const shouldEnableHashSlash = (appType) =>
|
|
11
|
+
appType === "alp" ||
|
|
12
|
+
appType === "vite" ||
|
|
13
|
+
appType === "alp-node" ||
|
|
14
|
+
appType === "next.js" ||
|
|
15
|
+
appType === "expo";
|
|
16
|
+
|
|
17
|
+
const srcDirectoriesFromAppType = {
|
|
18
|
+
"yarn-plugin": "sources",
|
|
19
|
+
};
|
|
17
20
|
|
|
18
21
|
export default class PobAppGenerator extends Generator {
|
|
19
22
|
constructor(args, opts) {
|
|
@@ -98,7 +101,6 @@ export default class PobAppGenerator extends Generator {
|
|
|
98
101
|
"alp",
|
|
99
102
|
"vite",
|
|
100
103
|
"next.js",
|
|
101
|
-
"remix",
|
|
102
104
|
"node",
|
|
103
105
|
"node-library", // monorepo library for app. Not a real library
|
|
104
106
|
"untranspiled-library", // monorepo library for app. Not a real library
|
|
@@ -142,8 +144,13 @@ export default class PobAppGenerator extends Generator {
|
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
default() {
|
|
147
|
+
if (this.appConfig.type === "remix") {
|
|
148
|
+
throw new Error(
|
|
149
|
+
"remix has been removed. Please migrate to 'vite' or 'expo'.",
|
|
150
|
+
);
|
|
151
|
+
}
|
|
145
152
|
const srcDirectory =
|
|
146
|
-
this.appConfig.type
|
|
153
|
+
srcDirectoriesFromAppType[this.appConfig.type] || "src";
|
|
147
154
|
const packageManager =
|
|
148
155
|
inMonorepo && !inMonorepo.root
|
|
149
156
|
? inMonorepo.pobMonorepoConfig.packageManager
|
|
@@ -216,6 +223,8 @@ export default class PobAppGenerator extends Generator {
|
|
|
216
223
|
pkg,
|
|
217
224
|
).filter(Boolean);
|
|
218
225
|
|
|
226
|
+
const enableHashSlash = shouldEnableHashSlash(this.appConfig.type);
|
|
227
|
+
|
|
219
228
|
this.composeWith("pob:common:typescript", {
|
|
220
229
|
enable:
|
|
221
230
|
typescript ||
|
|
@@ -241,21 +250,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
241
250
|
updateOnly: this.options.updateOnly,
|
|
242
251
|
resolveJsonModule: true,
|
|
243
252
|
onlyLatestLTS: true,
|
|
244
|
-
|
|
245
|
-
if (
|
|
246
|
-
this.appConfig.type === "alp" ||
|
|
247
|
-
this.appConfig.type === "vite" ||
|
|
248
|
-
this.appConfig.type === "alp-node" ||
|
|
249
|
-
this.appConfig.type === "next.js" ||
|
|
250
|
-
this.appConfig.type === "expo"
|
|
251
|
-
) {
|
|
252
|
-
return `./${srcDirectory}`;
|
|
253
|
-
}
|
|
254
|
-
if (this.appConfig.type === "remix") {
|
|
255
|
-
return ".";
|
|
256
|
-
}
|
|
257
|
-
return "";
|
|
258
|
-
})(),
|
|
253
|
+
enableHashSlash,
|
|
259
254
|
plugins: (() => {
|
|
260
255
|
if (this.appConfig.type === "next.js") {
|
|
261
256
|
return "next";
|
|
@@ -272,67 +267,65 @@ export default class PobAppGenerator extends Generator {
|
|
|
272
267
|
|
|
273
268
|
this.composeWith("pob:common:remove-old-dependencies");
|
|
274
269
|
|
|
275
|
-
|
|
276
|
-
this.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
});
|
|
270
|
+
this.composeWith("pob:common:testing", {
|
|
271
|
+
enable: this.appConfig.testing,
|
|
272
|
+
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
273
|
+
testing: this.appConfig.testing,
|
|
274
|
+
runner: this.appConfig.testing
|
|
275
|
+
? (inMonorepo
|
|
276
|
+
? inMonorepo.pobMonorepoConfig.testRunner
|
|
277
|
+
: this.appConfig.testRunner) || ""
|
|
278
|
+
: undefined,
|
|
279
|
+
e2eTesting: this.appConfig.e2e ? "." : "",
|
|
280
|
+
typescript,
|
|
281
|
+
build: typescript === true && this.appConfig.type !== "expo",
|
|
282
|
+
documentation: false,
|
|
283
|
+
codecov: this.appConfig.codecov,
|
|
284
|
+
ci: this.options.ci,
|
|
285
|
+
packageManager,
|
|
286
|
+
isApp: true,
|
|
287
|
+
splitCIJobs: false,
|
|
288
|
+
onlyLatestLTS: true,
|
|
289
|
+
srcDirectory,
|
|
290
|
+
});
|
|
297
291
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
292
|
+
this.composeWith("pob:app:e2e-testing", {
|
|
293
|
+
enable: this.appConfig.e2e,
|
|
294
|
+
});
|
|
301
295
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
296
|
+
this.composeWith("pob:common:format-lint", {
|
|
297
|
+
isApp: true,
|
|
298
|
+
documentation: false,
|
|
299
|
+
storybook: pkg?.devDependencies?.storybook,
|
|
300
|
+
testing: this.appConfig.testing,
|
|
301
|
+
testRunner: this.appConfig.testRunner,
|
|
302
|
+
babel,
|
|
303
|
+
typescript,
|
|
304
|
+
build: typescript === true,
|
|
305
|
+
node,
|
|
306
|
+
browser,
|
|
307
|
+
// nextjs now supports src rootAsSrc: this.appConfig.type === 'next.js',
|
|
308
|
+
enableSrcResolver: true,
|
|
309
|
+
packageManager,
|
|
310
|
+
yarnNodeLinker: this.options.yarnNodeLinker,
|
|
311
|
+
rootIgnorePaths: ignorePaths.join("\n"),
|
|
312
|
+
srcDirectory,
|
|
313
|
+
buildDirectory: this.appConfig.type === "expo" ? ".expo" : "build",
|
|
314
|
+
});
|
|
321
315
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
316
|
+
this.composeWith("pob:common:release", {
|
|
317
|
+
enable:
|
|
318
|
+
!inMonorepo &&
|
|
319
|
+
this.appConfig.testing &&
|
|
320
|
+
pkg.name !== "yarn-plugin-conventional-version",
|
|
321
|
+
enablePublish: false,
|
|
322
|
+
withBabel: babel,
|
|
323
|
+
isMonorepo: false,
|
|
324
|
+
ci: this.options.ci,
|
|
325
|
+
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
326
|
+
updateOnly: this.options.updateOnly,
|
|
327
|
+
packageManager,
|
|
328
|
+
});
|
|
336
329
|
|
|
337
330
|
this.composeWith("pob:core:vscode", {
|
|
338
331
|
root: !inMonorepo,
|
|
@@ -383,9 +376,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
383
376
|
|
|
384
377
|
if (platform !== "win32") {
|
|
385
378
|
execSync(
|
|
386
|
-
`rm -Rf ${["lib-*", "coverage", "docs", "dist"]
|
|
387
|
-
.filter(Boolean)
|
|
388
|
-
.join(" ")}`,
|
|
379
|
+
`rm -Rf ${["lib-*", "coverage", "docs", "dist"].filter(Boolean).join(" ")}`,
|
|
389
380
|
);
|
|
390
381
|
}
|
|
391
382
|
}
|
|
@@ -402,6 +393,18 @@ export default class PobAppGenerator extends Generator {
|
|
|
402
393
|
delete pkg.engines.yarn;
|
|
403
394
|
}
|
|
404
395
|
|
|
396
|
+
const srcDirectory =
|
|
397
|
+
srcDirectoriesFromAppType[this.appConfig.type] || "src";
|
|
398
|
+
if (shouldEnableHashSlash(this.appConfig.type)) {
|
|
399
|
+
pkg.imports = pkg.imports || {};
|
|
400
|
+
pkg.imports["#/*"] = `./${srcDirectory}/*`;
|
|
401
|
+
} else if (pkg.imports) {
|
|
402
|
+
delete pkg.imports["#/*"];
|
|
403
|
+
if (Object.keys(pkg.imports).length === 0) {
|
|
404
|
+
delete pkg.imports;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
405
408
|
this.fs.writeJSON(this.destinationPath("package.json"), pkg);
|
|
406
409
|
|
|
407
410
|
this.composeWith("pob:core:sort-package");
|
|
@@ -40,6 +40,10 @@ export default class AppE2ETestingGenerator extends Generator {
|
|
|
40
40
|
if (this.options.enable) {
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
writeAndFormatJson(
|
|
43
|
+
return writeAndFormatJson(
|
|
44
|
+
this.fs,
|
|
45
|
+
this.destinationPath("package.json"),
|
|
46
|
+
pkg,
|
|
47
|
+
);
|
|
44
48
|
}
|
|
45
49
|
}
|
|
@@ -10,8 +10,7 @@ export const appIgnorePaths = {
|
|
|
10
10
|
pkg?.dependencies?.tamagui ? "# tamagui" : undefined,
|
|
11
11
|
pkg?.dependencies?.tamagui ? "/.tamagui" : undefined,
|
|
12
12
|
].filter(Boolean),
|
|
13
|
-
|
|
14
|
-
vite: (config) => ["/build"],
|
|
13
|
+
vite: (config) => ["/dist"],
|
|
15
14
|
node: (config) => (config.distribute ? [] : ["/build"]),
|
|
16
15
|
"node-library": (config) => ["/build"],
|
|
17
16
|
"untranspiled-library": (config) => [],
|
|
@@ -396,7 +396,7 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
396
396
|
this.fs.writeJSON(this.destinationPath("package.json"), pkg);
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
-
writing() {
|
|
399
|
+
async writing() {
|
|
400
400
|
this.fs.delete("types.js");
|
|
401
401
|
|
|
402
402
|
const pkg = this.fs.readJSON(this.destinationPath("package.json"));
|
|
@@ -412,7 +412,7 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
412
412
|
this.fs.delete("rollup.config.js");
|
|
413
413
|
if (useBabel) {
|
|
414
414
|
if (this.options.isApp) {
|
|
415
|
-
copyAndFormatTpl(
|
|
415
|
+
await copyAndFormatTpl(
|
|
416
416
|
this.fs,
|
|
417
417
|
this.templatePath("app.rollup.config.mjs.ejs"),
|
|
418
418
|
this.destinationPath("rollup.config.mjs"),
|
|
@@ -423,7 +423,7 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
423
423
|
},
|
|
424
424
|
);
|
|
425
425
|
} else {
|
|
426
|
-
copyAndFormatTpl(
|
|
426
|
+
await copyAndFormatTpl(
|
|
427
427
|
this.fs,
|
|
428
428
|
this.templatePath("lib.rollup.config.mjs.ejs"),
|
|
429
429
|
this.destinationPath("rollup.config.mjs"),
|
|
@@ -50,8 +50,7 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
50
50
|
this.option("testRunner", {
|
|
51
51
|
type: String,
|
|
52
52
|
required: false,
|
|
53
|
-
|
|
54
|
-
description: "test runner: jest | node",
|
|
53
|
+
description: "test runner: vitest | node",
|
|
55
54
|
});
|
|
56
55
|
|
|
57
56
|
this.option("typescript", {
|
|
@@ -135,7 +134,7 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
135
134
|
});
|
|
136
135
|
}
|
|
137
136
|
|
|
138
|
-
writing() {
|
|
137
|
+
async writing() {
|
|
139
138
|
const pkg = this.fs.readJSON(this.destinationPath("package.json"));
|
|
140
139
|
const babelEnvs =
|
|
141
140
|
(pkg.pob &&
|
|
@@ -179,8 +178,7 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
179
178
|
}
|
|
180
179
|
|
|
181
180
|
delete pkg.standard;
|
|
182
|
-
|
|
183
|
-
pkg.prettier = "@pob/root/prettier-config";
|
|
181
|
+
delete pkg.prettier;
|
|
184
182
|
|
|
185
183
|
if (!inMonorepo || inMonorepo.root || this.options.monorepo) {
|
|
186
184
|
const rootIgnorePatterns = new Set(
|
|
@@ -203,8 +201,8 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
203
201
|
}
|
|
204
202
|
|
|
205
203
|
this.fs.copyTpl(
|
|
206
|
-
this.templatePath("
|
|
207
|
-
this.destinationPath(".
|
|
204
|
+
this.templatePath("oxfmtrc.jsonc.ejs"),
|
|
205
|
+
this.destinationPath(".oxfmtrc.jsonc"),
|
|
208
206
|
{
|
|
209
207
|
inRoot: !inMonorepo || inMonorepo.root || this.options.monorepo,
|
|
210
208
|
documentation: this.options.documentation,
|
|
@@ -217,7 +215,11 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
217
215
|
storybook: this.options.storybook,
|
|
218
216
|
},
|
|
219
217
|
);
|
|
220
|
-
} else if (this.fs.exists(this.destinationPath(".
|
|
218
|
+
} else if (this.fs.exists(this.destinationPath(".oxfmtrc.jsonc"))) {
|
|
219
|
+
this.fs.delete(this.destinationPath(".oxfmtrc.jsonc"));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (this.fs.exists(this.destinationPath(".prettierignore"))) {
|
|
221
223
|
this.fs.delete(this.destinationPath(".prettierignore"));
|
|
222
224
|
}
|
|
223
225
|
|
|
@@ -291,8 +293,8 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
291
293
|
);
|
|
292
294
|
}
|
|
293
295
|
} else {
|
|
294
|
-
if (pkg.name !== "pob-monorepo") {
|
|
295
|
-
packageUtils.removeDevDependencies(pkg, ["
|
|
296
|
+
if (pkg.name !== "pob-monorepo" && pkg.name !== "pob") {
|
|
297
|
+
packageUtils.removeDevDependencies(pkg, ["oxfmt"]);
|
|
296
298
|
}
|
|
297
299
|
packageUtils.addOrRemoveDevDependencies(
|
|
298
300
|
pkg,
|
|
@@ -418,9 +420,7 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
418
420
|
const srcLegacyEslintrcPath = this.options.rootAsSrc
|
|
419
421
|
? this.destinationPath(".eslintrc.json")
|
|
420
422
|
: this.destinationPath(
|
|
421
|
-
`${
|
|
422
|
-
useTypescript ? `${this.options.srcDirectory}/` : "lib/"
|
|
423
|
-
}.eslintrc.json`,
|
|
423
|
+
`${useTypescript ? `${this.options.srcDirectory}/` : "lib/"}.eslintrc.json`,
|
|
424
424
|
);
|
|
425
425
|
|
|
426
426
|
if (rootLegacyEslintrcPath) this.fs.delete(rootLegacyEslintrcPath);
|
|
@@ -477,7 +477,7 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
477
477
|
if (this.fs.exists(eslintConfigPath)) {
|
|
478
478
|
// TODO update config !
|
|
479
479
|
} else {
|
|
480
|
-
copyAndFormatTpl(
|
|
480
|
+
await copyAndFormatTpl(
|
|
481
481
|
this.fs,
|
|
482
482
|
this.templatePath("eslint.config.js.ejs"),
|
|
483
483
|
eslintConfigPath,
|
|
@@ -521,10 +521,10 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
521
521
|
});
|
|
522
522
|
|
|
523
523
|
if (!inMonorepo) {
|
|
524
|
-
pkg.scripts.lint = `${this.options.packageManager} run
|
|
524
|
+
pkg.scripts.lint = `${this.options.packageManager} run format && ${pkg.scripts.lint}`;
|
|
525
525
|
packageUtils.addScripts(pkg, {
|
|
526
|
-
|
|
527
|
-
"
|
|
526
|
+
format: "oxfmt",
|
|
527
|
+
"format:check": "oxfmt --check .",
|
|
528
528
|
});
|
|
529
529
|
} else {
|
|
530
530
|
delete pkg.scripts["lint:prettier"];
|
package/lib/generators/common/format-lint/templates/{prettierignore.ejs → oxfmtrc.jsonc.ejs}
RENAMED
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
|
3
|
+
"printWidth": 80,
|
|
4
|
+
"sortPackageJson": { "sortScripts": true },
|
|
5
|
+
"ignorePatterns": [
|
|
2
6
|
<% if (documentation) { -%>
|
|
3
|
-
/docs
|
|
7
|
+
"/docs",
|
|
4
8
|
<% } -%>
|
|
5
9
|
<% if (packageManager === 'yarn' && inRoot) { -%>
|
|
6
|
-
/.yarnrc.yml
|
|
7
|
-
/.yarn/**/*
|
|
10
|
+
"/.yarnrc.yml",
|
|
11
|
+
"/.yarn/**/*",
|
|
8
12
|
<% if (yarnNodeLinker === 'pnp') { -%>
|
|
9
|
-
/.pnp.*
|
|
13
|
+
"/.pnp.*",
|
|
10
14
|
<% } -%>
|
|
11
15
|
<% } -%>
|
|
12
16
|
<% for (let ignorePattern of rootIgnorePatterns) { -%>
|
|
13
|
-
<%= ignorePattern %>
|
|
17
|
+
"<%= ignorePattern %>",
|
|
14
18
|
<% } -%>
|
|
15
19
|
<% if (workspaces) { -%>
|
|
16
20
|
<% for (let workspace of workspaces) { -%>
|
|
17
21
|
<% if (ignorePatterns) { -%>
|
|
18
22
|
<% for (let ignorePattern of ignorePatterns) { -%>
|
|
19
|
-
<%= ignorePattern.startsWith('*') ? ignorePattern : '/' + workspace + ignorePattern %>
|
|
23
|
+
"<%= ignorePattern.startsWith('*') ? ignorePattern : '/' + workspace + ignorePattern %>",
|
|
20
24
|
<% } -%>
|
|
21
25
|
<% } -%>
|
|
22
26
|
<% } -%>
|
|
23
27
|
<% } else { -%>
|
|
24
28
|
<% for (let ignorePattern of ignorePatterns) { -%>
|
|
25
|
-
<%= ignorePattern %>
|
|
29
|
+
"<%= ignorePattern %>",
|
|
26
30
|
<% } -%>
|
|
27
31
|
<% } -%>
|
|
32
|
+
"CHANGELOG.md"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -45,12 +45,17 @@ export default class CommonRemoveOldDependenciesGenerator extends Generator {
|
|
|
45
45
|
"yarn-deduplicate", // in @pob/root (for yarn 1)
|
|
46
46
|
"yarn-berry-deduplicate", // use yarn dedupe with yarn 2
|
|
47
47
|
"yarn-update-lock",
|
|
48
|
-
"@pob/version",
|
|
49
48
|
"pob-release",
|
|
50
49
|
"eslint-plugin-typescript",
|
|
51
50
|
"xunit-file",
|
|
52
51
|
"rollup-plugin-copy",
|
|
52
|
+
"jest",
|
|
53
|
+
"@types/jest",
|
|
54
|
+
"jest-junit-reporter",
|
|
53
55
|
]);
|
|
56
|
+
if (pkg.name !== "pob-monorepo") {
|
|
57
|
+
packageUtils.removeDevDependencies(pkg, ["@pob/version"]);
|
|
58
|
+
}
|
|
54
59
|
|
|
55
60
|
this.fs.writeJSON(this.destinationPath("package.json"), pkg);
|
|
56
61
|
}
|