pob 10.9.0 → 10.11.1

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,42 @@
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
+ ## [10.11.1](https://github.com/christophehurpeau/pob/compare/pob@10.11.0...pob@10.11.1) (2022-04-18)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update codecov-action@v3 ([957ddce](https://github.com/christophehurpeau/pob/commit/957ddce5ea0e162739f752a04e96de9b5237a58d))
12
+ * update semver ([11a8763](https://github.com/christophehurpeau/pob/commit/11a8763b942e0e9fb348249b126ed4c15d20f2cb))
13
+
14
+
15
+
16
+
17
+
18
+ # [10.11.0](https://github.com/christophehurpeau/pob/compare/pob@10.10.0...pob@10.11.0) (2022-04-09)
19
+
20
+
21
+ ### Features
22
+
23
+ * update actions/cache to v3 ([f30c138](https://github.com/christophehurpeau/pob/commit/f30c13878d869bdcc9c5f52603d8154f2ba08524))
24
+
25
+
26
+
27
+
28
+
29
+ # [10.10.0](https://github.com/christophehurpeau/pob/compare/pob@10.9.0...pob@10.10.0) (2022-04-09)
30
+
31
+
32
+ ### Features
33
+
34
+ * **deps:** update @pob/eslint-config ([#1236](https://github.com/christophehurpeau/pob/issues/1236)) ([e3cc1ad](https://github.com/christophehurpeau/pob/commit/e3cc1ad732f162391cdf4df87bc5f65e9c61e347))
35
+ * **deps:** update dependency eslint to v8.13.0 ([#1253](https://github.com/christophehurpeau/pob/issues/1253)) ([8dcb07c](https://github.com/christophehurpeau/pob/commit/8dcb07c46858dd94fc812cc0cd4c45db41bbdf6c))
36
+ * **pob:** remove dev dependency prettier now it is reexported from @pob/root ([83caec0](https://github.com/christophehurpeau/pob/commit/83caec02203d3afd2e28c5efac4ff73c169803eb))
37
+
38
+
39
+
40
+
41
+
6
42
  # [10.9.0](https://github.com/christophehurpeau/pob/compare/pob@10.8.0...pob@10.9.0) (2022-04-03)
7
43
 
8
44
 
@@ -225,11 +225,7 @@ export default class CommonLintGenerator extends Generator {
225
225
  true,
226
226
  );
227
227
  } else {
228
- packageUtils.addOrRemoveDevDependencies(
229
- pkg,
230
- (inLerna && inLerna.root) || this.options.monorepo || !globalEslint,
231
- ['prettier'],
232
- );
228
+ packageUtils.removeDevDependencies(pkg, ['prettier']);
233
229
  packageUtils.addOrRemoveDevDependencies(
234
230
  pkg,
235
231
  !globalEslint ||
@@ -15,7 +15,7 @@ jobs:
15
15
  node-version: 16
16
16
 
17
17
  - name: Cache dependencies
18
- uses: actions/cache@v2
18
+ uses: actions/cache@v3
19
19
  with:
20
20
  path: |
21
21
  .yarn/unplugged
@@ -20,7 +20,7 @@ jobs:
20
20
 
21
21
  <% if (packageManager !== 'npm') { -%>
22
22
  - name: Cache dependencies
23
- uses: actions/cache@v2
23
+ uses: actions/cache@v3
24
24
  with:
25
25
  <% if (packageManager === 'yarn') { -%>
26
26
  path: |
@@ -82,7 +82,7 @@ jobs:
82
82
  CI: true
83
83
 
84
84
  - name: Send results to codecov
85
- uses: codecov/codecov-action@v2
85
+ uses: codecov/codecov-action@v3
86
86
  with:
87
87
  token: ${{ secrets.CODECOV_TOKEN }}
88
88
  if: startsWith(matrix.node-version, '16.')
@@ -1,5 +1,5 @@
1
1
  import fs from 'fs';
2
- import yarnParsers from '@yarnpkg/parsers';
2
+ import yml from 'js-yaml';
3
3
  import Generator from 'yeoman-generator';
4
4
  import ensureJsonFileFormatted from '../../../utils/ensureJsonFileFormatted.js';
5
5
  import inLerna from '../../../utils/inLerna.js';
@@ -95,11 +95,14 @@ export default class CoreYarnGenerator extends Generator {
95
95
 
96
96
  // must be done after plugins installed
97
97
  const configString = this.fs.read('.yarnrc.yml');
98
- const config = yarnParsers.parseSyml(configString);
98
+ const config = yml.load(configString, {
99
+ schema: yml.FAILSAFE_SCHEMA,
100
+ json: true,
101
+ });
99
102
  config.defaultSemverRangePrefix = this.options.type === 'app' ? '' : '^';
100
103
  config.enableMessageNames = false;
101
104
  config.nodeLinker = this.options.yarnNodeLinker;
102
- writeAndFormat(this.fs, '.yarnrc.yml', yarnParsers.stringifySyml(config));
105
+ writeAndFormat(this.fs, '.yarnrc.yml', yml.dump(config, {}));
103
106
  } else {
104
107
  this.fs.delete('.yarn');
105
108
  this.fs.delete('.yarnrc.yml');
@@ -21,7 +21,7 @@ jobs:
21
21
  node-version: 14
22
22
 
23
23
  - name: Cache dependencies
24
- uses: actions/cache@v2
24
+ uses: actions/cache@v3
25
25
  with:
26
26
  path: |
27
27
  .yarn/unplugged
package/lib/pob.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import { spawnSync } from 'child_process';
4
4
  import fs, { existsSync, writeFileSync, readFileSync } from 'fs';
5
5
  import path from 'path';
6
- import argv from 'minimist-argv';
6
+ import minimist from 'minimist';
7
7
  import yeoman from 'yeoman-environment';
8
8
  import PobAppGenerator from './generators/app/PobAppGenerator.js';
9
9
  import AppNextjsGenerator from './generators/app/nextjs/AppNextjsGenerator.js';
@@ -44,7 +44,7 @@ const printUsage = () => {
44
44
 
45
45
  const readJson = (filepath) => {
46
46
  try {
47
- return JSON.parse(readFileSync(filepath, 'utf-8'));
47
+ return JSON.parse(readFileSync(filepath, 'utf8'));
48
48
  } catch {
49
49
  return null;
50
50
  }
@@ -54,6 +54,8 @@ const readJson = (filepath) => {
54
54
  // console.log(pkg.version);
55
55
  // };
56
56
 
57
+ const argv = minimist(process.argv.slice(2));
58
+
57
59
  if (argv.version) {
58
60
  // printVersion();
59
61
  process.exit(0);
@@ -4,7 +4,7 @@ import prettier from 'prettier';
4
4
 
5
5
  export default function ensureJsonFileFormatted(path) {
6
6
  try {
7
- let contentJson = fs.readFileSync(path, 'utf-8');
7
+ let contentJson = fs.readFileSync(path, 'utf8');
8
8
  if (path === 'package.json' || path.endsWith('/package.json')) {
9
9
  contentJson = JSON.stringify(sortPkg(JSON.parse(contentJson)), null, 2);
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "10.9.0",
3
+ "version": "10.11.1",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -41,31 +41,31 @@
41
41
  "dependencies": {
42
42
  "@lerna/package-graph": "^4.0.0",
43
43
  "@lerna/project": "^4.0.0",
44
- "@pob/eslint-config": "49.0.0",
45
- "@pob/eslint-config-typescript": "49.0.0",
46
- "@pob/eslint-config-typescript-react": "49.0.1",
44
+ "@pob/eslint-config": "49.1.0",
45
+ "@pob/eslint-config-typescript": "49.2.1",
46
+ "@pob/eslint-config-typescript-react": "49.2.0",
47
47
  "@pob/sort-eslint-config": "^3.0.1",
48
48
  "@pob/sort-object": "^4.0.1",
49
49
  "@pob/sort-pkg": "^4.0.1",
50
- "@yarnpkg/parsers": "2.5.0",
51
- "eslint": "8.12.0",
50
+ "eslint": "8.13.0",
52
51
  "findup-sync": "^5.0.0",
53
52
  "git-remote-url": "^1.0.1",
54
53
  "github-username": "^6.0.0",
55
54
  "got": "^11.8.1",
56
55
  "inquirer-npm-name": "^4.0.0",
56
+ "js-yaml": "^4.1.0",
57
57
  "json5": "^2.2.0",
58
58
  "lodash.camelcase": "^4.3.0",
59
59
  "lodash.kebabcase": "^4.1.1",
60
60
  "mem-fs": "2.2.1",
61
61
  "mem-fs-editor": "9.4.0",
62
- "minimist-argv": "^1.1.0",
63
- "parse-author": "^2.0.0",
62
+ "minimist": "1.2.6",
63
+ "parse-author": "2.0.0",
64
64
  "pob-dependencies": "6.17.0",
65
65
  "prettier": "2.6.2",
66
- "semver": "^7.3.4",
67
- "yeoman-environment": "^3.5.1",
68
- "yeoman-generator": "^5.4.0"
66
+ "semver": "7.3.7",
67
+ "yeoman-environment": "3.5.1",
68
+ "yeoman-generator": "5.4.0"
69
69
  },
70
- "gitHead": "a8c255c612c8a46b22c4e75f5bcca59a10a1f091"
70
+ "gitHead": "6ad1a292d40033d37e71b6cb8b4eab413795fc92"
71
71
  }