pob 9.6.1 → 9.7.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,26 @@
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.7.0](https://github.com/christophehurpeau/pob/compare/pob@9.6.1...pob@9.7.0) (2021-12-12)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * remove dependency generator-license ([f087175](https://github.com/christophehurpeau/pob/commit/f0871751cbd883b4a7e64f56853da73d1c2daef0))
12
+ * remove resolutions in pob ([04940d3](https://github.com/christophehurpeau/pob/commit/04940d36da39cc3771b241ff695b2ad54f28c5d3))
13
+ * update generator-license ([ef71b4d](https://github.com/christophehurpeau/pob/commit/ef71b4d2e0cb47736436945e4865df4e8eccd890))
14
+ * use lerna version with exact param ([9dd6a5c](https://github.com/christophehurpeau/pob/commit/9dd6a5c8d965cd4af40db3d93e022e6824baf97a))
15
+
16
+
17
+ ### Features
18
+
19
+ * support workspace:* in dependencies ([258a5e8](https://github.com/christophehurpeau/pob/commit/258a5e88ad890f0e2f429d63f8011e8d01c3ebe3))
20
+ * update @yarnpkg/parsers ([f778458](https://github.com/christophehurpeau/pob/commit/f778458f8e49f610f52e1111846d9465f54576a6))
21
+
22
+
23
+
24
+
25
+
6
26
  ## [9.6.1](https://github.com/christophehurpeau/pob/compare/pob@9.6.0...pob@9.6.1) (2021-12-12)
7
27
 
8
28
 
@@ -128,6 +128,13 @@ export default class CorePackageGenerator extends Generator {
128
128
  choices: ['commonjs', 'module'],
129
129
  when: !pkg.type,
130
130
  },
131
+ {
132
+ name: 'license',
133
+ message: 'License Type',
134
+ type: 'list',
135
+ choices: ['MIT', 'ISC', 'UNLICENSED'],
136
+ when: !pkg.license,
137
+ },
131
138
  ].filter(Boolean),
132
139
  );
133
140
 
@@ -232,6 +239,18 @@ export default class CorePackageGenerator extends Generator {
232
239
  author.url ? ` (${author.url})` : ''
233
240
  }`;
234
241
 
242
+ if (!pkg.license) {
243
+ pkg.license = props.license;
244
+ this.fs.copyTpl(
245
+ this.templatePath(`licenses/${props.license}.ejs`),
246
+ this.destinationPath('LICENSE'),
247
+ {
248
+ year: new Date().getFullYear(),
249
+ author: pkg.author,
250
+ },
251
+ );
252
+ }
253
+
235
254
  if (pkg.private) {
236
255
  if (!pkg.description) delete pkg.description;
237
256
  if (!pkg.keywords || pkg.keywords.length === 0) delete pkg.keywords;
@@ -0,0 +1,15 @@
1
+ Copyright (c) <%- year %> <%- author %>
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for
4
+ any purpose with or without fee is hereby granted, provided that the
5
+ above copyright notice and this permission notice appear in all
6
+ copies.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
9
+ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
10
+ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
11
+ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
13
+ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
14
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
+ PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) <%- year %> <%- author %>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,2 @@
1
+ Copyright (c) <%- year %> <%- author %>
2
+ All rights reserved.
@@ -39,7 +39,7 @@ jobs:
39
39
  if: |
40
40
  github.ref == 'refs/heads/main'
41
41
  && contains(github.event.inputs.dry-run, 'y')
42
- run: yarn lerna version --yes --no-push --conventional-commits --conventional-graduate --no-git-tag-version --loglevel=verbose
42
+ run: yarn lerna version --yes --no-push --exact --conventional-commits --conventional-graduate --no-git-tag-version --loglevel=verbose
43
43
 
44
44
  - name: Configure Git user
45
45
  if: |
@@ -54,7 +54,7 @@ jobs:
54
54
  github.ref == 'refs/heads/main'
55
55
  && contains(github.event.inputs.dry-run, 'y') == false
56
56
  run: |
57
- yarn lerna version --yes --push --conventional-commits --conventional-graduate --create-release=github -m 'chore: release [skip ci]'
57
+ yarn lerna version --yes --push --exact --conventional-commits --conventional-graduate --create-release=github -m 'chore: release [skip ci]'
58
58
  env:
59
59
  GH_TOKEN: ${{ secrets.GH_TOKEN }}
60
60
  YARN_ENABLE_IMMUTABLE_INSTALLS: false
@@ -43,13 +43,6 @@ export default class PobBaseGenerator extends Generator {
43
43
  required: true,
44
44
  desc: "Don't check diff",
45
45
  });
46
-
47
- this.option('license', {
48
- type: Boolean,
49
- required: false,
50
- defaults: true,
51
- desc: 'Include a license',
52
- });
53
46
  }
54
47
 
55
48
  rootGeneratorName() {
@@ -145,20 +138,6 @@ export default class PobBaseGenerator extends Generator {
145
138
  this.fs.delete('Makefile');
146
139
  this.fs.delete(this.destinationPath('.commitrc.js'));
147
140
 
148
- const pkg = this.fs.readJSON(this.destinationPath('package.json'), {});
149
- if (
150
- this.options.license &&
151
- !this.fs.exists(this.destinationPath('LICENSE'))
152
- ) {
153
- const author = packageUtils.parsePkgAuthor(pkg) || {};
154
- this.composeWith('generator-license/app', {
155
- name: author.name,
156
- email: author.email,
157
- website: author.url,
158
- defaultLicense: 'ISC',
159
- });
160
- }
161
-
162
141
  this.composeWith('pob:core:editorconfig');
163
142
 
164
143
  this.composeWith('pob:core:clean', {
@@ -170,6 +149,8 @@ export default class PobBaseGenerator extends Generator {
170
149
  app: this.projectConfig.type === 'app',
171
150
  });
172
151
 
152
+ const pkg = this.fs.readJSON(this.destinationPath('package.json'), {});
153
+
173
154
  this.composeWith('pob:core:vscode', {
174
155
  root: this.isRoot,
175
156
  packageManager: this.projectConfig.packageManager,
@@ -145,7 +145,10 @@ const internalAddDependencies = (pkg, type, dependencies, cleaned, prefix) => {
145
145
  ? `${prefix || ''}${potentialNewVersionCleaned}`
146
146
  : potentialNewVersion;
147
147
  try {
148
- if (
148
+ if (currentVersion === 'workspace:*') {
149
+ // the package is in the monorepo
150
+ return;
151
+ } else if (
149
152
  !currentVersion ||
150
153
  semver.gt(potentialNewVersionCleaned, cleanVersion(currentVersion))
151
154
  ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "9.6.1",
3
+ "version": "9.7.0",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -38,21 +38,14 @@
38
38
  "arrowParens": "always"
39
39
  },
40
40
  "pob": {},
41
- "resolutions": {
42
- "yeoman-generator": "4.13.0"
43
- },
44
- "resolutionsExplained": {
45
- "yeoman-generator": "generator-license has a dependency to yeoman-generator@2.0.5"
46
- },
47
41
  "dependencies": {
48
42
  "@lerna/package-graph": "^4.0.0",
49
43
  "@lerna/project": "^4.0.0",
50
44
  "@pob/sort-eslint-config": "^3.0.1",
51
45
  "@pob/sort-object": "^4.0.1",
52
46
  "@pob/sort-pkg": "^4.0.1",
53
- "@yarnpkg/parsers": "^2.2.0",
47
+ "@yarnpkg/parsers": "2.5.0-rc.6",
54
48
  "findup-sync": "^5.0.0",
55
- "generator-license": "^5.4.0",
56
49
  "git-remote-url": "^1.0.1",
57
50
  "github-username": "^6.0.0",
58
51
  "got": "^11.8.1",
@@ -64,12 +57,12 @@
64
57
  "mem-fs-editor": "8.1.2",
65
58
  "minimist-argv": "^1.1.0",
66
59
  "parse-author": "^2.0.0",
67
- "pob-dependencies": "^6.2.1",
60
+ "pob-dependencies": "6.3.0",
68
61
  "prettier": "2.5.1",
69
62
  "semver": "^7.3.4",
70
63
  "update-notifier": "^5.0.1",
71
64
  "yeoman-environment": "^3.5.1",
72
65
  "yeoman-generator": "^5.4.0"
73
66
  },
74
- "gitHead": "c4e9e72111816af56f3303a4c04988011428b06e"
67
+ "gitHead": "64c950f50f9ebd3fd0a135bc911a9edd6b70f23f"
75
68
  }