@pob/root 9.0.0 → 9.2.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,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
+ ## [9.2.0](https://github.com/christophehurpeau/pob/compare/@pob/root@9.1.0...@pob/root@9.2.0) (2024-02-17)
7
+
8
+
9
+ ### Features
10
+
11
+ * **deps:** update dependency @commitlint/cli to v18.5.0 ([#1907](https://github.com/christophehurpeau/pob/issues/1907)) ([f2937ca](https://github.com/christophehurpeau/pob/commit/f2937cafcf86e47edf34180f5980a8cf35da7cf9))
12
+ * **deps:** update dependency @commitlint/cli to v18.6.0 ([#1911](https://github.com/christophehurpeau/pob/issues/1911)) ([ad8faa9](https://github.com/christophehurpeau/pob/commit/ad8faa98aa8a57d5db36d6255b9d9b707917ae40))
13
+ * **deps:** update dependency husky to v9 ([#1910](https://github.com/christophehurpeau/pob/issues/1910)) ([6b88cd0](https://github.com/christophehurpeau/pob/commit/6b88cd016cc52cf2630a15a619a66b8ff47308f7))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **deps:** update dependency @commitlint/cli to v18.4.4 ([#1891](https://github.com/christophehurpeau/pob/issues/1891)) ([7d2cc61](https://github.com/christophehurpeau/pob/commit/7d2cc61261808491ff4bf51f4a752b853664eb05))
19
+ * **deps:** update dependency @commitlint/cli to v18.6.1 ([#1934](https://github.com/christophehurpeau/pob/issues/1934)) ([bee7710](https://github.com/christophehurpeau/pob/commit/bee77102ffdbc0b53de4116ca255cb009b7b56f7))
20
+ * **deps:** update dependency lint-staged to v15.2.1 ([#1922](https://github.com/christophehurpeau/pob/issues/1922)) ([f8376d3](https://github.com/christophehurpeau/pob/commit/f8376d3f9414ad168cac950315635e9740254297))
21
+ * **deps:** update dependency lint-staged to v15.2.2 ([#1929](https://github.com/christophehurpeau/pob/issues/1929)) ([051de50](https://github.com/christophehurpeau/pob/commit/051de50f705d37ff4ef9901b474c4d63c33f67a2))
22
+
23
+
24
+
25
+
26
+ ## [9.1.0](https://github.com/christophehurpeau/pob/compare/@pob/root@9.0.0...@pob/root@9.1.0) (2023-12-31)
27
+
28
+
29
+ ### Features
30
+
31
+ * improve renovate branch naming support ([2e3ded4](https://github.com/christophehurpeau/pob/commit/2e3ded4ff6cf6a2991f50bab9d76ed3b3b8d5a28))
32
+
33
+
34
+
35
+
6
36
  ## [9.0.0](https://github.com/christophehurpeau/pob/compare/@pob/root@8.12.0...@pob/root@9.0.0) (2023-12-29)
7
37
 
8
38
 
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env node
2
+ /* eslint-disable unicorn/no-await-expression-member */
2
3
 
3
- 'use strict';
4
-
5
- const fs = require('node:fs');
6
- const path = require('node:path');
7
- const whichPmRuns = require('which-pm-runs');
4
+ import fs from 'node:fs';
5
+ import path from 'node:path';
6
+ import whichPmRuns from 'which-pm-runs';
8
7
 
9
8
  if (!process.env.INIT_CWD) {
10
9
  console.error(
@@ -36,11 +35,14 @@ if (pm.name !== 'yarn' && pm.name !== 'npm') {
36
35
  process.exit(1);
37
36
  }
38
37
 
39
- require('./postinstall/update-yarn.cjs')({ pkg, pm });
40
- require('./postinstall/install-husky.cjs')({ pkg, pm });
41
- require('./postinstall/install-github-workflows.cjs')({ pkg, pm });
42
- require('./postinstall/install-scripts.cjs')({ pkg, pm });
38
+ (await import('./postinstall/update-yarn.js')).default({ pkg, pm });
39
+ (await import('./postinstall/install-husky.js')).default({ pkg, pm });
40
+ (await import('./postinstall/install-github-workflows.js')).default({
41
+ pkg,
42
+ pm,
43
+ });
44
+ (await import('./postinstall/install-scripts.js')).default({ pkg, pm });
43
45
 
44
46
  if (process.env.POB_EXPERIMENTAL_VSCODE_TASKS) {
45
- require('./postinstall/install-vscode-tasks.cjs')({ pkg, pm });
47
+ (await import('./postinstall/install-vscode-tasks.js')).default({ pkg, pm });
46
48
  }
@@ -5,6 +5,7 @@ on:
5
5
  branches:
6
6
  - "renovate/pob-root"
7
7
  - "renovate/pob-root-**"
8
+ - "renovate/major-pob-root"
8
9
 
9
10
  jobs:
10
11
  run-install-and-commit-modified-files:
@@ -4,6 +4,7 @@ on:
4
4
  push:
5
5
  branches:
6
6
  - "renovate/prettier-**"
7
+ - "renovate/major-prettier"
7
8
 
8
9
  jobs:
9
10
  run-prettier:
@@ -1,8 +1,7 @@
1
- 'use strict';
2
-
3
- const fs = require('node:fs');
4
- const path = require('node:path');
5
- const semver = require('semver');
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import semver from 'semver';
6
5
 
7
6
  const ensureWorkflowUninstalled = (workflowName) => {
8
7
  try {
@@ -15,7 +14,10 @@ const installWorkflow = (workflowName, condition = true) => {
15
14
  fs.writeFileSync(
16
15
  path.resolve(`.github/workflows/${workflowName}.yml`),
17
16
  fs.readFileSync(
18
- path.resolve(__dirname, `github-workflows/${workflowName}.yml`),
17
+ path.resolve(
18
+ path.dirname(fileURLToPath(import.meta.url)),
19
+ `github-workflows/${workflowName}.yml`,
20
+ ),
19
21
  ),
20
22
  );
21
23
  } else {
@@ -23,7 +25,7 @@ const installWorkflow = (workflowName, condition = true) => {
23
25
  }
24
26
  };
25
27
 
26
- module.exports = function installGithubWorkflows({ pkg, pm }) {
28
+ export default function installGithubWorkflows({ pkg, pm }) {
27
29
  const yarnMajorVersion = pm.name === 'yarn' && semver.major(pm.version);
28
30
  const isYarnBerry = pm.name === 'yarn' && yarnMajorVersion >= 2;
29
31
 
@@ -43,4 +45,4 @@ module.exports = function installGithubWorkflows({ pkg, pm }) {
43
45
  ensureWorkflowUninstalled('push-renovate-build');
44
46
  }
45
47
  }
46
- };
48
+ }
@@ -1,11 +1,9 @@
1
1
  /* eslint-disable complexity */
2
2
 
3
- 'use strict';
4
-
5
- const fs = require('node:fs');
6
- const path = require('node:path');
7
- const husky = require('husky');
8
- const semver = require('semver');
3
+ import fs from 'node:fs';
4
+ import path from 'node:path';
5
+ import husky from 'husky';
6
+ import semver from 'semver';
9
7
 
10
8
  const ensureLegacyHuskyConfigDeleted = () => {
11
9
  try {
@@ -27,7 +25,7 @@ const ensureHuskyNotInDevDependencies = (pkg) => {
27
25
  const writeHook = (hookName, hookContent) => {
28
26
  fs.writeFileSync(
29
27
  path.resolve(`.husky/${hookName}`),
30
- `#!/usr/bin/env sh\n. "$(dirname "$0")/_/husky.sh"\n\n${hookContent.trim()}\n`,
28
+ `#!/usr/bin/env sh\n\n${hookContent.trim()}\n`,
31
29
  {
32
30
  mode: '755',
33
31
  },
@@ -48,7 +46,7 @@ const readYarnConfigFile = () => {
48
46
  }
49
47
  };
50
48
 
51
- module.exports = function installHusky({ pkg, pm }) {
49
+ export default function installHusky({ pkg, pm }) {
52
50
  const yarnMajorVersion = pm.name === 'yarn' && semver.major(pm.version);
53
51
  const isYarnBerry = pm.name === 'yarn' && yarnMajorVersion >= 2;
54
52
  const isYarnPnp =
@@ -137,5 +135,5 @@ done
137
135
  ensureHookDeleted('pre-push');
138
136
  }
139
137
 
140
- husky.install('.husky');
141
- };
138
+ process.stdout.write(husky('.husky'));
139
+ }
@@ -1,6 +1,4 @@
1
- 'use strict';
2
-
3
- const fs = require('node:fs');
1
+ import fs from 'node:fs';
4
2
 
5
3
  const addPobRootPostinstallInScript = (pkg, scriptName) => {
6
4
  if (!pkg.scripts[scriptName]) {
@@ -12,7 +10,7 @@ const addPobRootPostinstallInScript = (pkg, scriptName) => {
12
10
  }
13
11
  };
14
12
 
15
- module.exports = function installScripts({ pkg, pm }) {
13
+ export default function installScripts({ pkg, pm }) {
16
14
  if (!pkg.scripts) pkg.scripts = {};
17
15
  if (pkg.name === 'pob-monorepo') return;
18
16
 
@@ -31,4 +29,4 @@ module.exports = function installScripts({ pkg, pm }) {
31
29
  }
32
30
 
33
31
  fs.writeFileSync('package.json', `${JSON.stringify(pkg, null, 2)}\n`, 'utf8');
34
- };
32
+ }
@@ -1,8 +1,6 @@
1
- 'use strict';
2
-
3
- const fs = require('node:fs');
4
- const JSON5 = require('json5');
5
- const prettier = require('prettier');
1
+ import fs from 'node:fs';
2
+ import JSON5 from 'json5';
3
+ import prettier from 'prettier';
6
4
 
7
5
  function readJSON5(path, defaults = null) {
8
6
  try {
@@ -28,7 +26,7 @@ function getProblemMatcherFromScriptName(scriptName) {
28
26
  return [];
29
27
  }
30
28
 
31
- module.exports = function installVscodeTasks({ pkg }) {
29
+ export default function installVscodeTasks({ pkg }) {
32
30
  const existingConfig = readJSON5('.vscode/tasks.json');
33
31
  const existingTasks = existingConfig?.tasks || [];
34
32
 
@@ -90,4 +88,4 @@ module.exports = function installVscodeTasks({ pkg }) {
90
88
  },
91
89
  ),
92
90
  );
93
- };
91
+ }
@@ -1,9 +1,7 @@
1
- 'use strict';
1
+ import { execSync } from 'node:child_process';
2
+ import semver from 'semver';
2
3
 
3
- const { execSync } = require('node:child_process');
4
- const semver = require('semver');
5
-
6
- module.exports = function updateYarn({ pkg, pm }) {
4
+ export default function updateYarn({ pkg, pm }) {
7
5
  if (pm.name !== 'yarn' || !pm.version) return;
8
6
 
9
7
  if (semver.lt(pm.version, '3.2.1')) {
@@ -28,4 +26,4 @@ module.exports = function updateYarn({ pkg, pm }) {
28
26
  });
29
27
  console.log('Yarn update success !');
30
28
  }
31
- };
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pob/root",
3
- "version": "9.0.0",
3
+ "version": "9.2.0",
4
4
  "description": "root package",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
@@ -19,7 +19,7 @@
19
19
  "bin": {
20
20
  "commitlint": "./bin/commitlint.cjs",
21
21
  "pob-root-lint-staged": "./bin/pob-root-lint-staged.js",
22
- "pob-root-postinstall": "./bin/pob-root-postinstall.cjs",
22
+ "pob-root-postinstall": "./bin/pob-root-postinstall.js",
23
23
  "pob-root-prettier": "./bin/prettier.cjs",
24
24
  "prettier": "./bin/prettier.cjs",
25
25
  "pretty-eslint-config": "./bin/pretty-eslint-config.js",
@@ -66,15 +66,15 @@
66
66
  "pob": {},
67
67
  "prettier": "@pob/root/prettier-config",
68
68
  "dependencies": {
69
- "@commitlint/cli": "18.4.3",
69
+ "@commitlint/cli": "18.6.1",
70
70
  "@pob/pretty-eslint-config": "5.3.1",
71
71
  "@pob/pretty-pkg": "7.0.0",
72
72
  "conventional-changelog-conventionalcommits": "^7.0.0",
73
73
  "cosmiconfig": "^8.3.6",
74
- "husky": "~8.0.1",
74
+ "husky": "~9.0.11",
75
75
  "json5": "^2.2.2",
76
- "lint-staged": "15.2.0",
77
- "pob-dependencies": "11.0.0",
76
+ "lint-staged": "15.2.2",
77
+ "pob-dependencies": "11.1.0",
78
78
  "prettier": "2.8.8",
79
79
  "repository-check-dirty": "6.3.1",
80
80
  "semver": "^7.3.7",