pob 11.4.3 → 11.5.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
+ # [11.5.0](https://github.com/christophehurpeau/pob/compare/pob@11.4.3...pob@11.5.0) (2022-12-30)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * add fixes for windows ([930c09e](https://github.com/christophehurpeau/pob/commit/930c09ead7e8757a1a37e7ed92c251917c3d1571))
12
+ * **deps:** update dependency prettier to v2.8.1 ([#1476](https://github.com/christophehurpeau/pob/issues/1476)) ([d9b8ef2](https://github.com/christophehurpeau/pob/commit/d9b8ef2e75c5c9a5e1d0a573a6c2fa81857f3f8e))
13
+ * downgrade lerna and make sure nx is not installed ([45523f1](https://github.com/christophehurpeau/pob/commit/45523f167467bcab9d9435d9089eccc46ae5947d))
14
+ * fixes in jest configs for windows ([b66306f](https://github.com/christophehurpeau/pob/commit/b66306f3e9cdd64b7ed8503ddab6da3947014a3f))
15
+ * remove jest.nodeEnv as yarn test is used by default ([b96d6d6](https://github.com/christophehurpeau/pob/commit/b96d6d6b7fa090b838242728e7d5277ef87b17bd))
16
+ * update json5 ([808e9a5](https://github.com/christophehurpeau/pob/commit/808e9a5f7be5b7460945b9748fd950ed3ddc1e9a))
17
+
18
+
19
+ ### Features
20
+
21
+ * **deps:** update @pob/eslint-config to v50 (major) ([#1459](https://github.com/christophehurpeau/pob/issues/1459)) ([8180c9b](https://github.com/christophehurpeau/pob/commit/8180c9bbfc09a9101862d2568808d2ea1ad7e72f))
22
+ * **deps:** update dependency eslint to v8.29.0 ([#1472](https://github.com/christophehurpeau/pob/issues/1472)) ([a77364c](https://github.com/christophehurpeau/pob/commit/a77364cd6805b945b2964e1bd1071f390c2408e7))
23
+ * **deps:** update dependency eslint to v8.30.0 ([#1484](https://github.com/christophehurpeau/pob/issues/1484)) ([4e7a2b0](https://github.com/christophehurpeau/pob/commit/4e7a2b0e5adb299c409367490f353d000c475d75))
24
+ * **deps:** update dependency prettier to v2.8.0 ([#1461](https://github.com/christophehurpeau/pob/issues/1461)) ([2ca692d](https://github.com/christophehurpeau/pob/commit/2ca692d78f53a99a3ef43af1a01df626e5bb5d70))
25
+ * **deps:** update dependency yeoman-environment to v3.13.0 ([#1469](https://github.com/christophehurpeau/pob/issues/1469)) ([371b679](https://github.com/christophehurpeau/pob/commit/371b679f6c099497316ca51f00452596216b32a5))
26
+
27
+
28
+
29
+
30
+
6
31
  ## [11.4.3](https://github.com/christophehurpeau/pob/compare/pob@11.4.2...pob@11.4.3) (2022-11-19)
7
32
 
8
33
 
@@ -1,4 +1,5 @@
1
1
  import { execSync } from 'child_process';
2
+ import { platform } from 'process';
2
3
  import Generator from 'yeoman-generator';
3
4
  import inLerna from '../../utils/inLerna.js';
4
5
  import * as packageUtils from '../../utils/package.js';
@@ -246,11 +247,13 @@ export default class PobAppGenerator extends Generator {
246
247
  break;
247
248
  }
248
249
 
249
- execSync(
250
- `rm -Rf ${['lib-*', 'coverage', 'docs', 'dist']
251
- .filter(Boolean)
252
- .join(' ')}`,
253
- );
250
+ if (platform !== 'win32') {
251
+ execSync(
252
+ `rm -Rf ${['lib-*', 'coverage', 'docs', 'dist']
253
+ .filter(Boolean)
254
+ .join(' ')}`,
255
+ );
256
+ }
254
257
  }
255
258
 
256
259
  writing() {
@@ -160,7 +160,7 @@ export default class CommonTestingGenerator extends Generator {
160
160
  const workspacesPattern =
161
161
  workspacesWithoutStar.length === 1
162
162
  ? workspacesWithoutStar[0]
163
- : `(${workspacesWithoutStar.join('|')})`;
163
+ : `@(${workspacesWithoutStar.join('|')})`;
164
164
  hasReact = yoConfigPobMonorepo.packageNames.some((pkgName) =>
165
165
  pkgName.startsWith('react-'),
166
166
  );
@@ -170,10 +170,10 @@ export default class CommonTestingGenerator extends Generator {
170
170
  cacheDirectory: './node_modules/.cache/jest',
171
171
  testEnvironment: 'node',
172
172
  testMatch: [
173
- `<rootDir>/${workspacesPattern}/*/(src|lib)/**/__tests__/**/*.${
173
+ `<rootDir>/${workspacesPattern}/*/@(src|lib)/**/__tests__/**/*.${
174
174
  transpileWithBabel ? '(ts|js|cjs|mjs)' : '(js|cjs|mjs)'
175
175
  }${hasReact ? '?(x)' : ''}`,
176
- `<rootDir>/${workspacesPattern}/*/(src|lib)/**/*.test.${
176
+ `<rootDir>/${workspacesPattern}/*/@(src|lib)/**/*.test.${
177
177
  transpileWithBabel ? '(ts|js|cjs|mjs)' : '(js|cjs|mjs)'
178
178
  }${hasReact ? '?(x)' : ''}`,
179
179
  ],
@@ -148,8 +148,6 @@ export default class CoreVSCodeGenerator extends Generator {
148
148
  : {}),
149
149
  ...(this.options.testing
150
150
  ? {
151
- 'jest.jestCommandLine':
152
- 'NODE_OPTIONS=--experimental-vm-modules node_modules/.bin/jest',
153
151
  // disable all folders to enable only root.
154
152
  'jest.disabledWorkspaceFolders': folders.map(
155
153
  (folder) => folder.name,
@@ -34,11 +34,6 @@
34
34
  "source.organizeImports": false
35
35
  },
36
36
 
37
- <% if (testing && module) { -%>
38
- // jest
39
- "jest.jestCommandLine": "NODE_OPTIONS=--experimental-vm-modules node_modules/.bin/jest",
40
- <% } -%>
41
-
42
37
  // eslint config
43
38
  "eslint.workingDirectories": ["."],
44
39
  "eslint.options": {
@@ -119,9 +119,13 @@ export default class CoreYarnGenerator extends Generator {
119
119
  if (this.options.yarnNodeLinker === 'pnp') {
120
120
  this.spawnCommandSync('yarn', ['dlx', '@yarnpkg/sdks', 'vscode']);
121
121
  } else {
122
- this.spawnCommandSync('rm', ['-Rf', '.yarn/sdks']);
122
+ this.fs.delete('.yarn/sdks');
123
123
  }
124
- this.spawnCommandSync('yarn', ['install']);
124
+ this.spawnCommandSync('yarn', ['install'], {
125
+ env: {
126
+ YARN_ENABLE_IMMUTABLE_INSTALLS: 'false',
127
+ },
128
+ });
125
129
  this.spawnCommandSync('yarn', ['dedupe']);
126
130
 
127
131
  this.spawnCommandSync('yarn', ['prettier', '--write', '.vscode']);
@@ -1,6 +1,7 @@
1
1
  import { execSync } from 'child_process';
2
2
  import fs from 'fs';
3
3
  import path from 'path';
4
+ import { platform } from 'process';
4
5
  import { PackageGraph } from '@lerna/package-graph';
5
6
  import { Project as LernaProject } from '@lerna/project';
6
7
  import Generator from 'yeoman-generator';
@@ -103,7 +104,10 @@ export default class PobMonorepoGenerator extends Generator {
103
104
  this.packages.push(...batch.map((node) => node.pkg));
104
105
  this.packageLocations.push(
105
106
  ...batch.map((node) =>
106
- path.relative(this.destinationPath(), node.location),
107
+ path
108
+ .relative(this.destinationPath(), node.location)
109
+ // transform windows path to linux
110
+ .replace(/\\+/g, '/'),
107
111
  ),
108
112
  );
109
113
 
@@ -282,9 +286,11 @@ export default class PobMonorepoGenerator extends Generator {
282
286
 
283
287
  this.fs.writeJSON(this.destinationPath('package.json'), pkg);
284
288
 
285
- execSync(
286
- `rm -Rf ${['lib-*', 'coverage', 'docs'].filter(Boolean).join(' ')}`,
287
- );
289
+ if (platform !== 'win32') {
290
+ execSync(
291
+ `rm -Rf ${['lib-*', 'coverage', 'docs'].filter(Boolean).join(' ')}`,
292
+ );
293
+ }
288
294
  }
289
295
 
290
296
  writing() {
@@ -171,6 +171,15 @@ export default class MonorepoLernaGenerator extends Generator {
171
171
  : 'npm run lint:eslint --workspaces',
172
172
  });
173
173
 
174
+ packageUtils.addOrRemoveScripts(
175
+ pkg,
176
+ this.options.packageManager === 'yarn',
177
+ {
178
+ version:
179
+ 'YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn && git add yarn.lock',
180
+ },
181
+ );
182
+
174
183
  this.fs.copyTpl(
175
184
  this.templatePath('workflow-publish.yml.ejs'),
176
185
  this.destinationPath('.github/workflows/publish.yml'),
@@ -208,7 +217,6 @@ export default class MonorepoLernaGenerator extends Generator {
208
217
  // }
209
218
 
210
219
  delete pkg.scripts.postbuild;
211
- delete pkg.scripts.version;
212
220
  delete pkg.scripts.prepublishOnly;
213
221
 
214
222
  if (this.npm) {
@@ -36,7 +36,10 @@ const getInLernaThings = () => {
36
36
  rootYoConfig.pob &&
37
37
  rootYoConfig.pob.project &&
38
38
  rootYoConfig.pob.project.yarnNodeLinker,
39
- relative: path.relative(rootMonorepo, cwd),
39
+ relative: path
40
+ .relative(rootMonorepo, cwd)
41
+ // transform windows to linux-like paths
42
+ .replace(/\\+/g, '/'),
40
43
  rootYoConfig,
41
44
  pobConfig: rootYoConfig && rootYoConfig.pob,
42
45
  pobMonorepoConfig:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "11.4.3",
3
+ "version": "11.5.0",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -35,21 +35,21 @@
35
35
  "prettier": "@pob/root/prettier-config",
36
36
  "pob": {},
37
37
  "dependencies": {
38
- "@lerna/package-graph": "^5.0.0",
39
- "@lerna/project": "^5.0.0",
40
- "@pob/eslint-config": "49.4.0",
41
- "@pob/eslint-config-typescript": "49.4.0",
42
- "@pob/eslint-config-typescript-react": "49.4.0",
38
+ "@lerna/package-graph": "5.5.4",
39
+ "@lerna/project": "5.5.4",
40
+ "@pob/eslint-config": "50.0.0",
41
+ "@pob/eslint-config-typescript": "50.0.0",
42
+ "@pob/eslint-config-typescript-react": "50.0.0",
43
43
  "@pob/sort-eslint-config": "4.1.0",
44
44
  "@pob/sort-object": "5.1.0",
45
45
  "@pob/sort-pkg": "5.1.0",
46
- "eslint": "8.28.0",
46
+ "eslint": "8.30.0",
47
47
  "findup-sync": "^5.0.0",
48
48
  "git-remote-url": "^1.0.1",
49
49
  "github-username": "^6.0.0",
50
50
  "inquirer-npm-name": "^4.0.0",
51
51
  "js-yaml": "^4.1.0",
52
- "json5": "^2.2.1",
52
+ "json5": "^2.2.2",
53
53
  "lodash.camelcase": "^4.3.0",
54
54
  "lodash.kebabcase": "^4.1.1",
55
55
  "mem-fs": "2.2.1",
@@ -57,14 +57,14 @@
57
57
  "minimist": "1.2.7",
58
58
  "node-fetch": "3.3.0",
59
59
  "parse-author": "2.0.0",
60
- "pob-dependencies": "7.2.0",
61
- "prettier": "2.7.1",
60
+ "pob-dependencies": "7.3.0",
61
+ "prettier": "2.8.1",
62
62
  "semver": "7.3.8",
63
- "yeoman-environment": "3.12.1",
63
+ "yeoman-environment": "3.13.0",
64
64
  "yeoman-generator": "5.7.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@pob/root": "7.2.0"
67
+ "@pob/root": "7.3.0"
68
68
  },
69
- "gitHead": "7dd064381689bf8324f688292bfa0bf266d2ec24"
69
+ "gitHead": "d8f2ef86402ce3aa4c7bf9d0f02175bf7be2751a"
70
70
  }