pob 9.11.0 → 9.12.3

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,51 @@
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.12.3](https://github.com/christophehurpeau/pob/compare/pob@9.12.2...pob@9.12.3) (2022-01-02)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * remove legacy .yarn/build-state.yml ([b625bab](https://github.com/christophehurpeau/pob/commit/b625bab16caa53342fdcbf1961b73446cdfd2541))
12
+
13
+
14
+
15
+
16
+
17
+ ## [9.12.2](https://github.com/christophehurpeau/pob/compare/pob@9.12.1...pob@9.12.2) (2022-01-02)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **pob:** stop ci testing on node 14 on app projects ([c775697](https://github.com/christophehurpeau/pob/commit/c77569741136dc3feefcdc61f666092751be944c))
23
+
24
+
25
+
26
+
27
+
28
+ ## [9.12.1](https://github.com/christophehurpeau/pob/compare/pob@9.12.0...pob@9.12.1) (2022-01-02)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * set globalEslint default to true ([8d7d3d5](https://github.com/christophehurpeau/pob/commit/8d7d3d5917b340b901b565a23356b21939059cb8))
34
+ * use cjs for default main for jest which doesnt supports exports yet ([f97c897](https://github.com/christophehurpeau/pob/commit/f97c8972b35032078f4603d788b4a3e637d61637))
35
+
36
+
37
+
38
+
39
+
40
+ # [9.12.0](https://github.com/christophehurpeau/pob/compare/pob@9.11.0...pob@9.12.0) (2022-01-01)
41
+
42
+
43
+ ### Features
44
+
45
+ * **pob:** update release-please version ([8091222](https://github.com/christophehurpeau/pob/commit/80912226fedb9eb5e25936f2c9f4a719bf9605e9))
46
+
47
+
48
+
49
+
50
+
6
51
  # [9.11.0](https://github.com/christophehurpeau/pob/compare/pob@9.10.0...pob@9.11.0) (2022-01-01)
7
52
 
8
53
 
@@ -157,6 +157,7 @@ export default class PobAppGenerator extends Generator {
157
157
  codecov: false,
158
158
  ci: this.appConfig.ci,
159
159
  packageManager: this.options.packageManager,
160
+ isApp: true,
160
161
  });
161
162
 
162
163
  this.composeWith('pob:common:format-lint', {
@@ -125,10 +125,6 @@ export default class CommonBabelGenerator extends Generator {
125
125
  validate: (versions) => versions.length > 0,
126
126
  default: nodeVersions,
127
127
  choices: [
128
- {
129
- name: '12 (Maintenance LTS)',
130
- value: '12',
131
- },
132
128
  {
133
129
  name: '14 (Maintenance LTS)',
134
130
  value: '14',
@@ -614,9 +610,11 @@ export default class CommonBabelGenerator extends Generator {
614
610
  // jest: https://github.com/facebook/jest/issues/9771
615
611
  if (!pkg.main && exportName === '.') {
616
612
  pkg.main =
617
- exportTarget.default ||
618
- exportTarget.require ||
619
- exportTarget.import;
613
+ pkg.type === 'module'
614
+ ? exportTarget.import
615
+ : exportTarget.default ||
616
+ exportTarget.require ||
617
+ exportTarget.import;
620
618
  }
621
619
  } else if (target === 'browser') {
622
620
  if (formats.includes('es')) {
@@ -179,7 +179,8 @@ export default class CommonLintGenerator extends Generator {
179
179
  }
180
180
 
181
181
  const yoConfigPobMonorepo = inLerna && inLerna.pobMonorepoConfig;
182
- const globalEslint = yoConfigPobMonorepo && yoConfigPobMonorepo.eslint;
182
+ const globalEslint =
183
+ yoConfigPobMonorepo && yoConfigPobMonorepo.eslint !== false;
183
184
  const globalTesting = yoConfigPobMonorepo && yoConfigPobMonorepo.testing;
184
185
  const composite = yoConfigPobMonorepo && yoConfigPobMonorepo.typescript;
185
186
  const { rootPackageManager, rootYarnNodeLinker } = inLerna || {};
@@ -9,7 +9,7 @@ jobs:
9
9
  release-please:
10
10
  runs-on: ubuntu-latest
11
11
  steps:
12
- - uses: GoogleCloudPlatform/release-please-action@v2
12
+ - uses: GoogleCloudPlatform/release-please-action@v3
13
13
  id: release
14
14
  with:
15
15
  token: ${{ secrets.GH_TOKEN }}
@@ -48,6 +48,12 @@ export default class CommonTestingGenerator extends Generator {
48
48
  defaults: 'yarn',
49
49
  desc: 'yarn or npm',
50
50
  });
51
+
52
+ this.option('isApp', {
53
+ type: Boolean,
54
+ required: true,
55
+ desc: 'is app',
56
+ });
51
57
  }
52
58
 
53
59
  default() {
@@ -60,6 +66,7 @@ export default class CommonTestingGenerator extends Generator {
60
66
  documentation: this.options.documentation,
61
67
  codecov: this.options.codecov,
62
68
  packageManager: this.options.packageManager,
69
+ isApp: this.options.isApp,
63
70
  });
64
71
  } else {
65
72
  this.composeWith('pob:core:ci', {
@@ -54,6 +54,12 @@ export default class CoreCIGenerator extends Generator {
54
54
  required: true,
55
55
  desc: 'Include documentation generation',
56
56
  });
57
+
58
+ this.option('isApp', {
59
+ type: Boolean,
60
+ required: true,
61
+ desc: 'is app',
62
+ });
57
63
  }
58
64
 
59
65
  default() {
@@ -75,6 +81,7 @@ export default class CoreCIGenerator extends Generator {
75
81
  build: this.options.build,
76
82
  typescript: this.options.typescript,
77
83
  codecov: this.options.codecov,
84
+ supportsNode14: !this.options.isApp,
78
85
  },
79
86
  );
80
87
  } else {
@@ -8,7 +8,7 @@ jobs:
8
8
 
9
9
  strategy:
10
10
  matrix:
11
- node-version: [14.x, 16.x]
11
+ node-version: [<% if (supportsNode14) { -%>14.x, <% } -%>16.x]
12
12
 
13
13
  steps:
14
14
  - uses: actions/checkout@v2
@@ -25,7 +25,6 @@ jobs:
25
25
  <% if (packageManager === 'yarn') { -%>
26
26
  path: |
27
27
  .yarn/unplugged
28
- .yarn/build-state.yml
29
28
  .yarn/install-state.gz
30
29
  <% } else { -%>
31
30
  path: node_modules
@@ -13,6 +13,12 @@ export default class CoreGitGenerator extends Generator {
13
13
  defaults: '',
14
14
  desc: 'Should create the repo on github',
15
15
  });
16
+
17
+ this.option('isApp', {
18
+ type: String,
19
+ required: true,
20
+ desc: 'is app',
21
+ });
16
22
  }
17
23
 
18
24
  async initializing() {
@@ -94,6 +100,7 @@ export default class CoreGitGenerator extends Generator {
94
100
  shouldCreate: !this.originUrl,
95
101
  gitHostAccount: this.gitHostAccount,
96
102
  repoName: this.repoName,
103
+ isApp: this.options.isApp,
97
104
  });
98
105
  }
99
106
  }
@@ -15,14 +15,18 @@ const gh = got.extend({
15
15
  },
16
16
  });
17
17
 
18
- const configureProtectionRule = async (owner, repo) => {
18
+ const configureProtectionRule = async (owner, repo, isApp) => {
19
19
  for (const branch of ['main', 'master']) {
20
20
  try {
21
21
  await gh.put(`repos/${owner}/${repo}/branches/${branch}/protection`, {
22
22
  json: {
23
23
  required_status_checks: {
24
24
  strict: false,
25
- contexts: ['build (14.x)', 'build (16.x)', 'reviewflow'],
25
+ contexts: [
26
+ !isApp && 'build (14.x)',
27
+ 'build (16.x)',
28
+ 'reviewflow',
29
+ ].filter(Boolean),
26
30
  },
27
31
  enforce_admins: false, // true,
28
32
  required_pull_request_reviews: null,
@@ -67,6 +71,12 @@ export default class CoreGitGithubGenerator extends Generator {
67
71
  desc: 'repo name',
68
72
  });
69
73
 
74
+ this.option('isApp', {
75
+ type: String,
76
+ required: true,
77
+ desc: 'is app',
78
+ });
79
+
70
80
  if (!GITHUB_TOKEN && process.env.CI !== 'true') {
71
81
  throw new Error(
72
82
  'Missing POB_GITHUB_TOKEN. Create one with https://github.com/settings/tokens/new?scopes=repo&description=POB%20Generator and add it in your env variables.',
@@ -137,7 +147,7 @@ export default class CoreGitGithubGenerator extends Generator {
137
147
  cwd,
138
148
  });
139
149
 
140
- configureProtectionRule(owner, repo);
150
+ configureProtectionRule(owner, repo, this.options.isApp);
141
151
 
142
152
  // await gh.put(`/repos/${owner}/${repo}/topics`, {
143
153
  // names: pkg.keywords,
@@ -162,7 +172,7 @@ export default class CoreGitGithubGenerator extends Generator {
162
172
  },
163
173
  });
164
174
 
165
- configureProtectionRule(owner, repo);
175
+ configureProtectionRule(owner, repo, this.options.isApp);
166
176
  }
167
177
  }
168
178
  }
@@ -1,3 +1,2 @@
1
1
  /unplugged
2
- /build-state.yml
3
2
  /install-state.gz
@@ -250,6 +250,7 @@ export default class PobLibGenerator extends Generator {
250
250
  codecov: this.pobjson.testing && this.pobjson.testing.codecov,
251
251
  ci: this.pobjson.testing && this.pobjson.testing.ci,
252
252
  packageManager: this.options.packageManager,
253
+ isApp: false,
253
254
  });
254
255
 
255
256
  // must be after testing
@@ -193,6 +193,7 @@ export default class PobMonorepoGenerator extends Generator {
193
193
  codecov: this.pobLernaConfig.testing && this.pobLernaConfig.codecov,
194
194
  ci: this.pobLernaConfig.ci,
195
195
  packageManager: this.options.packageManager,
196
+ isApp: this.options.isAppProject,
196
197
  });
197
198
 
198
199
  this.composeWith('pob:common:format-lint', {
@@ -25,7 +25,6 @@ jobs:
25
25
  with:
26
26
  path: |
27
27
  .yarn/unplugged
28
- .yarn/build-state.yml
29
28
  .yarn/install-state.gz
30
29
  key: v2-dependencies--${{ matrix.node-version }}-${{ runner.OS }}-${{ hashFiles('yarn.lock') }}
31
30
  restore-keys: |
@@ -165,7 +165,9 @@ export default class PobBaseGenerator extends Generator {
165
165
  });
166
166
 
167
167
  if (!this.inLerna) {
168
- this.composeWith('pob:core:git');
168
+ this.composeWith('pob:core:git', {
169
+ isApp: this.projectConfig.type === 'app',
170
+ });
169
171
  } else {
170
172
  if (this.fs.exists('.git-hooks')) this.fs.delete('.git-hooks');
171
173
  if (this.fs.exists('git-hooks')) this.fs.delete('git-hooks');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "9.11.0",
3
+ "version": "9.12.3",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -61,11 +61,11 @@
61
61
  "mem-fs-editor": "9.4.0",
62
62
  "minimist-argv": "^1.1.0",
63
63
  "parse-author": "^2.0.0",
64
- "pob-dependencies": "6.6.0",
64
+ "pob-dependencies": "6.6.3",
65
65
  "prettier": "2.5.1",
66
66
  "semver": "^7.3.4",
67
67
  "yeoman-environment": "^3.5.1",
68
68
  "yeoman-generator": "^5.4.0"
69
69
  },
70
- "gitHead": "5d8871a5277b29282db5599a9e2a6032275da8d1"
70
+ "gitHead": "463af07ec0ae3131bc1728e275b8343d81025ddd"
71
71
  }