pob 23.0.0 → 23.1.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 CHANGED
@@ -3,6 +3,31 @@
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
+ ## [23.1.0](https://github.com/christophehurpeau/pob/compare/pob@23.0.1...pob@23.1.0) (2024-08-14)
7
+
8
+ ### Features
9
+
10
+ * support commonjs eslint config ([d69b1c0](https://github.com/christophehurpeau/pob/commit/d69b1c09e397a576b19ab4e25784a90f855b87b2))
11
+ * update eslint 9 ([7542a8c](https://github.com/christophehurpeau/pob/commit/7542a8c009f65fbde196139e7e9e88ec2790e9f5))
12
+
13
+ ### Bug Fixes
14
+
15
+ * eslint command for flat config ([0250f19](https://github.com/christophehurpeau/pob/commit/0250f19c252f47ba2523a98e8d1e20400743dc0c))
16
+
17
+ Version bump for dependency: yarn-workspace-utils
18
+ Version bump for dependency: @pob/root
19
+
20
+
21
+ ## [23.0.1](https://github.com/christophehurpeau/pob/compare/pob@23.0.0...pob@23.0.1) (2024-08-12)
22
+
23
+ ### Bug Fixes
24
+
25
+ * **pob:** use copyAndFormatTpl to auto format eslint.config.js ([06b0707](https://github.com/christophehurpeau/pob/commit/06b0707532223f4c55c070d116f839af5f9aaa45))
26
+ * update pob eslint config ([981c435](https://github.com/christophehurpeau/pob/commit/981c435c6741f672eb96651726c879ace6c1ec63))
27
+
28
+ Version bump for dependency: yarn-workspace-utils
29
+
30
+
6
31
  ## [23.0.0](https://github.com/christophehurpeau/pob/compare/pob@22.5.0...pob@23.0.0) (2024-08-11)
7
32
 
8
33
  ### ⚠ BREAKING CHANGES
@@ -2,6 +2,7 @@ import path from "node:path";
2
2
  import Generator from "yeoman-generator";
3
3
  import inMonorepo from "../../../utils/inMonorepo.js";
4
4
  import * as packageUtils from "../../../utils/package.js";
5
+ import { copyAndFormatTpl } from "../../../utils/writeAndFormat.js";
5
6
  import { appIgnorePaths } from "../../app/ignorePaths.js";
6
7
 
7
8
  export default class CommonLintGenerator extends Generator {
@@ -381,8 +382,8 @@ export default class CommonLintGenerator extends Generator {
381
382
  if (!useTypescript) {
382
383
  return [
383
384
  useNode
384
- ? "...pobConfig(import.meta.url).configs.nodeModule"
385
- : "...pobConfig(import.meta.url).configs.baseModule",
385
+ ? `...pobConfig(import.meta.url).configs.node${pkg.type === "commonjs" ? "Commonjs" : "Module"}`
386
+ : `...pobConfig(import.meta.url).configs.base${pkg.type === "commonjs" ? "Commonjs" : "Module"}`,
386
387
  ];
387
388
  }
388
389
  if (!hasReact) {
@@ -427,7 +428,14 @@ export default class CommonLintGenerator extends Generator {
427
428
  if (rootLegacyEslintrcPath) this.fs.delete(rootLegacyEslintrcPath);
428
429
  this.fs.delete(srcLegacyEslintrcPath);
429
430
 
430
- const eslintConfigPath = this.destinationPath("eslint.config.js");
431
+ const eslintConfigPath = this.destinationPath(
432
+ pkg.type === "commonjs" ? "eslint.config.mjs" : "eslint.config.js",
433
+ );
434
+
435
+ const invalidEslintConfigPath = this.destinationPath(
436
+ pkg.type !== "commonjs" ? "eslint.config.mjs" : "eslint.config.js",
437
+ );
438
+ this.fs.delete(invalidEslintConfigPath);
431
439
 
432
440
  if (!inMonorepo || inMonorepo.root) {
433
441
  const getRootIgnorePatterns = () => {
@@ -474,7 +482,8 @@ export default class CommonLintGenerator extends Generator {
474
482
  if (this.fs.exists(eslintConfigPath)) {
475
483
  // TODO update config !
476
484
  } else {
477
- this.fs.copyTpl(
485
+ copyAndFormatTpl(
486
+ this.fs,
478
487
  this.templatePath("eslint.config.js.ejs"),
479
488
  eslintConfigPath,
480
489
  {
@@ -102,7 +102,7 @@ export default class MonorepoWorkspacesGenerator extends Generator {
102
102
  this.packagesConfig.length > 15
103
103
  ? "NODE_OPTIONS=--max_old_space_size=4096 "
104
104
  : ""
105
- }eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet .`
105
+ }eslint --quiet .`
106
106
  : // eslint-disable-next-line unicorn/no-nested-ternary
107
107
  this.options.packageManager === "yarn"
108
108
  ? `NODE_OPTIONS=--max_old_space_size=4096 eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet . --ignore-pattern ${pkg.workspaces.join(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "23.0.0",
3
+ "version": "23.1.0",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -34,15 +34,16 @@
34
34
  "scripts": {
35
35
  "format": "prettier --write",
36
36
  "lint": "yarn run lint:eslint",
37
- "lint:eslint": "yarn ../.. run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/pob",
38
- "tsc": "tsc -p ./tsconfig.json"
37
+ "lint:eslint": "yarn ../.. run eslint --quiet packages/pob"
38
+ },
39
+ "pob": {
40
+ "typescript": "check-only"
39
41
  },
40
- "pob": {},
41
42
  "prettier": "@pob/root/prettier-config",
42
43
  "dependencies": {
43
- "@pob/eslint-config": "57.3.0",
44
- "@pob/eslint-config-typescript": "57.3.0",
45
- "@pob/eslint-config-typescript-react": "57.3.0",
44
+ "@pob/eslint-config": "58.0.0",
45
+ "@pob/eslint-config-typescript": "58.0.0",
46
+ "@pob/eslint-config-typescript-react": "58.0.0",
46
47
  "@pob/sort-eslint-config": "6.0.0",
47
48
  "@pob/sort-object": "7.0.0",
48
49
  "@pob/sort-pkg": "8.0.0",
@@ -52,7 +53,7 @@
52
53
  "@yarnpkg/core": "4.1.2",
53
54
  "@yarnpkg/fslib": "3.1.0",
54
55
  "@yeoman/types": "1.2.0",
55
- "eslint": "8.57.0",
56
+ "eslint": "9.9.0",
56
57
  "findup-sync": "^5.0.0",
57
58
  "git-remote-url": "^1.0.1",
58
59
  "github-username": "^7.0.0",
@@ -64,16 +65,16 @@
64
65
  "mem-fs-editor": "11.0.1",
65
66
  "minimist": "1.2.8",
66
67
  "parse-author": "2.0.0",
67
- "pob-dependencies": "14.0.0",
68
+ "pob-dependencies": "14.1.0",
68
69
  "prettier": "3.3.3",
69
70
  "semver": "7.6.3",
70
71
  "validate-npm-package-name": "^5.0.0",
71
- "yarn-workspace-utils": "6.0.0",
72
+ "yarn-workspace-utils": "6.0.2",
72
73
  "yeoman-environment": "4.4.1",
73
74
  "yeoman-generator": "7.3.2"
74
75
  },
75
76
  "devDependencies": {
76
- "@pob/root": "13.0.0",
77
+ "@pob/root": "13.1.0",
77
78
  "@types/node": "20.14.15",
78
79
  "typescript": "5.5.4"
79
80
  }