pob 13.5.0 → 14.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,44 @@
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
+ ## [14.1.0](https://github.com/christophehurpeau/pob/compare/pob@14.0.1...pob@14.1.0) (2023-09-24)
7
+
8
+
9
+ ### Features
10
+
11
+ * add option to disable yarn cache ([761436f](https://github.com/christophehurpeau/pob/commit/761436fb7946c52a4d02b61b5c81ea122d64dc05))
12
+ * **deps:** update dependency eslint to v8.50.0 ([#1778](https://github.com/christophehurpeau/pob/issues/1778)) ([9002346](https://github.com/christophehurpeau/pob/commit/9002346e6f50bf455a47e63141d2f4fdf8689f8e))
13
+ * update actions/checkout ([f040a5d](https://github.com/christophehurpeau/pob/commit/f040a5d3a87d8e3f5b5ae890ec49db37e435d22b))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * add missing options to disable yarn cache ([2138584](https://github.com/christophehurpeau/pob/commit/21385841d31755f44a5661a282d094dc994f7404))
19
+
20
+
21
+
22
+ ## [14.0.1](https://github.com/christophehurpeau/pob/compare/pob@14.0.0...pob@14.0.1) (2023-09-18)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * fix yarn publish configuration ([997808f](https://github.com/christophehurpeau/pob/commit/997808fae5154309eacd39d6cc04ee37c1982262))
28
+
29
+
30
+
31
+ ## [14.0.0](https://github.com/christophehurpeau/pob/compare/pob@13.5.0...pob@14.0.0) (2023-09-18)
32
+
33
+
34
+ ### ⚠ BREAKING CHANGES
35
+
36
+ * **lerna-light:** replace yarn lerna publish to yarn workpaces foreach --no-private npm publish --tolerate-republish
37
+
38
+ ### Features
39
+
40
+ * **lerna-light:** remove publish command ([c838a68](https://github.com/christophehurpeau/pob/commit/c838a680fb03247b3254780e2850cfb4ae07e681))
41
+
42
+
43
+
6
44
  ## [13.5.0](https://github.com/christophehurpeau/pob/compare/pob@13.4.0...pob@13.5.0) (2023-09-18)
7
45
 
8
46
 
@@ -44,6 +44,13 @@ export default class PobAppGenerator extends Generator {
44
44
  default: 'node-modules',
45
45
  desc: 'Defines what linker should be used for installing Node packages (useful to enable the node-modules plugin), one of: pnp, node-modules.',
46
46
  });
47
+
48
+ this.option('disableYarnGitCache', {
49
+ type: Boolean,
50
+ required: false,
51
+ default: false,
52
+ desc: 'Disable git cache. See https://yarnpkg.com/features/caching#offline-mirror.',
53
+ });
47
54
  }
48
55
 
49
56
  initializing() {
@@ -205,6 +212,7 @@ export default class PobAppGenerator extends Generator {
205
212
  if (this.appConfig.type !== 'remix') {
206
213
  this.composeWith('pob:common:testing', {
207
214
  enable: this.appConfig.testing,
215
+ disableYarnGitCache: this.options.disableYarnGitCache,
208
216
  enableReleasePlease,
209
217
  testing: this.appConfig.testing,
210
218
  typescript: babel,
@@ -100,6 +100,13 @@ export default class CommonTestingGenerator extends Generator {
100
100
  default: 'src',
101
101
  desc: 'customize srcDir, if different than rootDir',
102
102
  });
103
+
104
+ this.option('disableYarnGitCache', {
105
+ type: Boolean,
106
+ required: false,
107
+ default: false,
108
+ desc: 'Disable git cache. See https://yarnpkg.com/features/caching#offline-mirror.',
109
+ });
103
110
  }
104
111
 
105
112
  default() {
@@ -108,6 +115,7 @@ export default class CommonTestingGenerator extends Generator {
108
115
  enable: this.options.ci,
109
116
  enableReleasePlease: this.options.enableReleasePlease,
110
117
  enableYarnVersion: this.options.enableYarnVersion,
118
+ disableYarnGitCache: this.options.disableYarnGitCache,
111
119
  testing: this.options.enable,
112
120
  build: this.options.build,
113
121
  typescript: this.options.typescript,
@@ -87,6 +87,13 @@ export default class CoreCIGenerator extends Generator {
87
87
  required: true,
88
88
  desc: 'split CI jobs for faster result',
89
89
  });
90
+
91
+ this.option('disableYarnGitCache', {
92
+ type: Boolean,
93
+ required: false,
94
+ default: false,
95
+ desc: 'Disable git cache. See https://yarnpkg.com/features/caching#offline-mirror.',
96
+ });
90
97
  }
91
98
 
92
99
  async prompting() {
@@ -136,6 +143,7 @@ export default class CoreCIGenerator extends Generator {
136
143
  this.destinationPath('.github/workflows/push.yml'),
137
144
  {
138
145
  packageManager: this.options.packageManager,
146
+ disableYarnGitCache: this.options.disableYarnGitCache,
139
147
  testing,
140
148
  checks,
141
149
  documentation: this.options.documentation,
@@ -184,6 +192,7 @@ export default class CoreCIGenerator extends Generator {
184
192
  this.destinationPath('.github/workflows/gh-pages.yml'),
185
193
  {
186
194
  packageManager: this.options.packageManager,
195
+ disableYarnGitCache: this.options.disableYarnGitCache,
187
196
  testing: this.options.testing,
188
197
  typedoc: this.options.documentation && this.options.typescript,
189
198
  },
@@ -8,14 +8,18 @@ jobs:
8
8
  create-documentation-and-deploy:
9
9
  runs-on: ubuntu-latest
10
10
  steps:
11
- - uses: actions/checkout@v3
11
+ - uses: actions/checkout@v4
12
12
 
13
13
  - uses: actions/setup-node@v3
14
14
  with:
15
15
  node-version: 18
16
16
 
17
17
  - name: Install Dependencies
18
+ <% if (disableYarnGitCache) { -%>
19
+ run: yarn install --immutable
20
+ <% } else { -%>
18
21
  run: yarn install --immutable --immutable-cache
22
+ <% } -%>
19
23
 
20
24
  <% if (typedoc) { -%>
21
25
  - name: Run tsc for tsc cache
@@ -8,14 +8,18 @@ jobs:
8
8
  runs-on: ubuntu-latest
9
9
 
10
10
  steps:
11
- - uses: actions/checkout@v3
11
+ - uses: actions/checkout@v4
12
12
 
13
13
  - uses: actions/setup-node@v3
14
14
  with:
15
15
  node-version: 18
16
16
 
17
17
  - name: Install Dependencies
18
+ <% if (disableYarnGitCache) { -%>
19
+ run: yarn install --immutable
20
+ <% } else { -%>
18
21
  run: yarn install --immutable --immutable-cache
22
+ <% } -%>
19
23
 
20
24
  - name: Checks
21
25
  run: yarn run checks
@@ -26,14 +30,18 @@ jobs:
26
30
  runs-on: ubuntu-latest
27
31
 
28
32
  steps:
29
- - uses: actions/checkout@v3
33
+ - uses: actions/checkout@v4
30
34
 
31
35
  - uses: actions/setup-node@v3
32
36
  with:
33
37
  node-version: 18
34
38
 
35
39
  - name: Install Dependencies
40
+ <% if (disableYarnGitCache) { -%>
41
+ run: yarn install --immutable
42
+ <% } else { -%>
36
43
  run: yarn install --immutable --immutable-cache
44
+ <% } -%>
37
45
 
38
46
  - name: Build
39
47
  run: yarn run build
@@ -46,14 +54,18 @@ jobs:
46
54
  runs-on: ubuntu-latest
47
55
 
48
56
  steps:
49
- - uses: actions/checkout@v3
57
+ - uses: actions/checkout@v4
50
58
 
51
59
  - uses: actions/setup-node@v3
52
60
  with:
53
61
  node-version: 18
54
62
 
55
63
  - name: Install Dependencies
64
+ <% if (disableYarnGitCache) { -%>
65
+ run: yarn install --immutable
66
+ <% } else { -%>
56
67
  run: yarn install --immutable --immutable-cache
68
+ <% } -%>
57
69
 
58
70
  - name: Prettier
59
71
  run: yarn run lint:prettier
@@ -75,14 +87,18 @@ jobs:
75
87
  node-version: [18, 20]
76
88
 
77
89
  steps:
78
- - uses: actions/checkout@v3
90
+ - uses: actions/checkout@v4
79
91
 
80
92
  - uses: actions/setup-node@v3
81
93
  with:
82
94
  node-version: ${{ matrix.node-version }}
83
95
 
84
96
  - name: Install Dependencies
97
+ <% if (disableYarnGitCache) { -%>
98
+ run: yarn install --immutable
99
+ <% } else { -%>
85
100
  run: yarn install --immutable --immutable-cache
101
+ <% } -%>
86
102
 
87
103
  <% if (codecov) { -%>
88
104
  - name: Test
@@ -111,7 +127,7 @@ jobs:
111
127
  needs: [<%= checks ? '"checks", ' : '' -%><%= build ? '"build", ' : '' -%>"lint"<%= testing ? ', "test"' : '' -%>]
112
128
 
113
129
  steps:
114
- - uses: actions/checkout@v3
130
+ - uses: actions/checkout@v4
115
131
 
116
132
  - uses: actions/setup-node@v3
117
133
  with:
@@ -11,7 +11,7 @@ jobs:
11
11
  node-version: [18.x<% if (!onlyLatestLTS) { -%>, 20.x <% } -%>]
12
12
 
13
13
  steps:
14
- - uses: actions/checkout@v3
14
+ - uses: actions/checkout@v4
15
15
 
16
16
  - name: Use Node.js ${{ matrix.node-version }}
17
17
  uses: actions/setup-node@v3
@@ -21,7 +21,11 @@ jobs:
21
21
 
22
22
  <% if (packageManager === 'yarn') { -%>
23
23
  - name: Install Dependencies
24
+ <% if (disableYarnGitCache) { -%>
25
+ run: yarn install --immutable
26
+ <% } else { -%>
24
27
  run: yarn install --immutable --immutable-cache
28
+ <% } -%>
25
29
  <% } else if (packageManager === 'npm') { -%>
26
30
  - name: Install Dependencies
27
31
  run: npm ci
@@ -29,6 +29,13 @@ export default class CoreYarnGenerator extends Generator {
29
29
  default: 'node-modules',
30
30
  desc: 'Defines what linker should be used for installing Node packages (useful to enable the node-modules plugin), one of: pnp, node-modules.',
31
31
  });
32
+
33
+ this.option('disableYarnGitCache', {
34
+ type: Boolean,
35
+ required: false,
36
+ default: false,
37
+ desc: 'Disable git cache. See https://yarnpkg.com/features/caching#offline-mirror.',
38
+ });
32
39
  }
33
40
 
34
41
  initializing() {
@@ -52,7 +59,9 @@ export default class CoreYarnGenerator extends Generator {
52
59
  this.fs.copyTpl(
53
60
  this.templatePath('yarn_gitignore.ejs'),
54
61
  this.destinationPath('.yarn/.gitignore'),
55
- {},
62
+ {
63
+ disableYarnGitCache: this.options.disableYarnGitCache,
64
+ },
56
65
  );
57
66
 
58
67
  const { stdout } = this.spawnSync(
@@ -1,2 +1,5 @@
1
1
  /unplugged
2
2
  /install-state.gz
3
+ <% if (disableYarnGitCache) { -%>
4
+ /cache
5
+ <% } -%>
@@ -32,6 +32,13 @@ export default class PobLibGenerator extends Generator {
32
32
  default: 'node-modules',
33
33
  desc: 'Defines what linker should be used for installing Node packages (useful to enable the node-modules plugin), one of: pnp, node-modules.',
34
34
  });
35
+
36
+ this.option('disableYarnGitCache', {
37
+ type: Boolean,
38
+ required: false,
39
+ default: false,
40
+ desc: 'Disable git cache. See https://yarnpkg.com/features/caching#offline-mirror.',
41
+ });
35
42
  }
36
43
 
37
44
  initializing() {
@@ -264,6 +271,7 @@ export default class PobLibGenerator extends Generator {
264
271
 
265
272
  this.composeWith('pob:common:testing', {
266
273
  enable: this.pobjson.testing,
274
+ disableYarnGitCache: this.options.disableYarnGitCache,
267
275
  enableReleasePlease,
268
276
  testing: this.pobjson.testing,
269
277
  runner: this.pobjson.testing
@@ -79,6 +79,13 @@ export default class PobMonorepoGenerator extends Generator {
79
79
  required: true,
80
80
  desc: 'only latest lts',
81
81
  });
82
+
83
+ this.option('disableYarnGitCache', {
84
+ type: Boolean,
85
+ required: false,
86
+ default: false,
87
+ desc: 'Disable git cache. See https://yarnpkg.com/features/caching#offline-mirror.',
88
+ });
82
89
  }
83
90
 
84
91
  async initializing() {
@@ -218,6 +225,7 @@ export default class PobMonorepoGenerator extends Generator {
218
225
  this.composeWith('pob:common:testing', {
219
226
  monorepo: true,
220
227
  enable: this.pobLernaConfig.testing,
228
+ disableYarnGitCache: this.options.disableYarnGitCache,
221
229
  enableReleasePlease: false,
222
230
  enableYarnVersion: isYarnVersionEnabled,
223
231
  testing: this.pobLernaConfig.testing,
@@ -22,6 +22,13 @@ export default class MonorepoLernaGenerator extends Generator {
22
22
  default: 'yarn',
23
23
  desc: 'yarn or npm',
24
24
  });
25
+
26
+ this.option('disableYarnGitCache', {
27
+ type: Boolean,
28
+ required: false,
29
+ default: false,
30
+ desc: 'Disable git cache. See https://yarnpkg.com/features/caching#offline-mirror.',
31
+ });
25
32
  }
26
33
 
27
34
  initializing() {
@@ -196,6 +203,7 @@ export default class MonorepoLernaGenerator extends Generator {
196
203
  {
197
204
  publish: !this.options.isAppProject,
198
205
  enableYarnVersion: isYarnVersionEnabled,
206
+ disableYarnGitCache: this.options.disableYarnGitCache,
199
207
  isIndependent: lernaConfig.version === 'independent',
200
208
  },
201
209
  );
@@ -23,7 +23,7 @@ jobs:
23
23
  publish:
24
24
  runs-on: ubuntu-latest
25
25
  steps:
26
- - uses: actions/checkout@v3
26
+ - uses: actions/checkout@v4
27
27
  with:
28
28
  token: ${{ secrets.GH_TOKEN }}
29
29
  fetch-depth: 0
@@ -33,7 +33,11 @@ jobs:
33
33
  node-version: 18
34
34
 
35
35
  - name: Install Dependencies
36
+ <% if (disableYarnGitCache) { -%>
37
+ run: yarn install --immutable
38
+ <% } else { -%>
36
39
  run: yarn install --immutable --immutable-cache
40
+ <% } -%>
37
41
 
38
42
  - name: New version (dry run)
39
43
  if: github.ref == 'refs/heads/main' && inputs.dry-run
@@ -62,7 +66,6 @@ jobs:
62
66
  YARN_ENABLE_IMMUTABLE_INSTALLS: false
63
67
  <% if (publish) { -%>
64
68
 
65
- <% if (enableYarnVersion) { -%>
66
69
  - name: Publish to npm
67
70
  run: |
68
71
  if [ -z "$NODE_AUTH_TOKEN" ]; then
@@ -72,15 +75,6 @@ jobs:
72
75
  echo >> ./.yarnrc.yml
73
76
  echo "npmAuthToken: $NODE_AUTH_TOKEN" >> ./.yarnrc.yml
74
77
  yarn workspaces foreach --no-private npm publish --tolerate-republish
75
- <% } else { -%>
76
- - uses: actions/setup-node@v3
77
- if: github.ref == 'refs/heads/main' && !inputs.dry-run
78
- with:
79
- node-version: 18
80
- registry-url: "https://registry.npmjs.org"
81
-
82
- - run: yarn lerna publish from-git --no-verify-access --yes
83
- <% } -%>
84
78
  if: github.ref == 'refs/heads/main' && !inputs.dry-run
85
79
  env:
86
80
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -125,6 +125,7 @@ export default class PobBaseGenerator extends Generator {
125
125
  type: this.projectConfig.type,
126
126
  enable: this.isRoot && this.projectConfig.packageManager === 'yarn',
127
127
  yarnNodeLinker: this.projectConfig.yarnNodeLinker,
128
+ disableYarnGitCache: this.projectConfig.disableYarnGitCache,
128
129
  });
129
130
 
130
131
  this.composeWith('pob:core:package', {
@@ -139,6 +140,7 @@ export default class PobBaseGenerator extends Generator {
139
140
  force: this.options.force,
140
141
  isAppProject: this.projectConfig.type === 'app',
141
142
  packageManager: this.projectConfig.packageManager,
143
+ disableYarnGitCache: this.projectConfig.disableYarnGitCache,
142
144
  });
143
145
  }
144
146
 
@@ -197,6 +199,7 @@ export default class PobBaseGenerator extends Generator {
197
199
  ),
198
200
  {
199
201
  updateOnly: this.options.updateOnly,
202
+ disableYarnGitCache: this.projectConfig.disableYarnGitCache,
200
203
  isAppProject: this.projectConfig.type === 'app',
201
204
  packageManager: this.projectConfig.packageManager,
202
205
  yarnNodeLinker: this.projectConfig.yarnNodeLinker,
@@ -209,6 +212,7 @@ export default class PobBaseGenerator extends Generator {
209
212
  this.composeWith('pob:lib', {
210
213
  monorepo: this.useLerna,
211
214
  isRoot: this.isRoot,
215
+ disableYarnGitCache: this.projectConfig.disableYarnGitCache,
212
216
  updateOnly: this.options.updateOnly,
213
217
  fromPob: this.options.fromPob,
214
218
  packageManager: this.projectConfig.packageManager,
@@ -219,6 +223,7 @@ export default class PobBaseGenerator extends Generator {
219
223
  this.composeWith('pob:app', {
220
224
  monorepo: this.useLerna,
221
225
  isRoot: this.isRoot,
226
+ disableYarnGitCache: this.projectConfig.disableYarnGitCache,
222
227
  updateOnly: this.options.updateOnly,
223
228
  fromPob: this.options.fromPob,
224
229
  packageManager: this.projectConfig.packageManager,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "13.5.0",
3
+ "version": "14.1.0",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -46,7 +46,7 @@
46
46
  "@pob/sort-pkg": "6.0.1",
47
47
  "@types/inquirer": "9.0.3",
48
48
  "@yeoman/types": "1.0.1",
49
- "eslint": "8.49.0",
49
+ "eslint": "8.50.0",
50
50
  "findup-sync": "^5.0.0",
51
51
  "git-remote-url": "^1.0.1",
52
52
  "github-username": "^7.0.0",
@@ -59,14 +59,13 @@
59
59
  "mem-fs-editor": "10.0.2",
60
60
  "minimist": "1.2.8",
61
61
  "parse-author": "2.0.0",
62
- "pob-dependencies": "8.5.0",
62
+ "pob-dependencies": "8.6.0",
63
63
  "prettier": "2.8.8",
64
64
  "semver": "7.5.4",
65
65
  "yeoman-environment": "4.0.0-beta.4",
66
66
  "yeoman-generator": "6.0.0-rc.4"
67
67
  },
68
68
  "devDependencies": {
69
- "@pob/root": "8.2.1"
70
- },
71
- "gitHead": "d0f03216f6a01951143697797f10b9ae101f13fe"
72
- }
69
+ "@pob/root": "8.3.0"
70
+ }
71
+ }