pob 10.4.1 → 10.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 +45 -0
- package/lib/generators/app/PobAppGenerator.js +51 -38
- package/lib/generators/app/ignorePaths.js +1 -0
- package/lib/generators/app/remix/AppRemixGenerator.js +17 -0
- package/lib/generators/common/release/templates/release-please.yml.ejs +1 -1
- package/lib/generators/core/ci/templates/github-action-documentation-workflow.yml.ejs +1 -1
- package/lib/generators/core/ci/templates/github-action-node-workflow.yml.ejs +1 -1
- package/lib/generators/monorepo/lerna/templates/workflow-publish.yml.ejs +2 -2
- package/lib/pob.js +9 -2
- package/lib/utils/inLerna.js +5 -2
- package/package.json +3 -3
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
|
+
# [10.7.0](https://github.com/christophehurpeau/pob/compare/pob@10.6.0...pob@10.7.0) (2022-03-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **pob:** update option in monorepo ([ddb2129](https://github.com/christophehurpeau/pob/commit/ddb21299e99ae7e1044cbb9f480a94f94a6bcd7d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **deps:** update dependency eslint to v8.11.0 ([#1234](https://github.com/christophehurpeau/pob/issues/1234)) ([4f41e09](https://github.com/christophehurpeau/pob/commit/4f41e094c9f9e3cade7c72347a50477617b220d4))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [10.6.0](https://github.com/christophehurpeau/pob/compare/pob@10.5.0...pob@10.6.0) (2022-03-09)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* autodetect monorepo ([6057838](https://github.com/christophehurpeau/pob/commit/60578383b053635808473aa165234b13747be4bf))
|
|
28
|
+
* remove inNpmLerna ([154ba42](https://github.com/christophehurpeau/pob/commit/154ba4248c1f59c0d37967dee8b5aa3df91928d1))
|
|
29
|
+
* when projectPkg doesnt exists ([12598fe](https://github.com/christophehurpeau/pob/commit/12598fe8079ab5f577bf1299ae12ef29c57f6036))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
* add remix app ([104756a](https://github.com/christophehurpeau/pob/commit/104756a3dce93e23b1fc48825425903d9763e550))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# [10.5.0](https://github.com/christophehurpeau/pob/compare/pob@10.4.1...pob@10.5.0) (2022-03-05)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
|
|
45
|
+
* update actions/setup-node@v3 ([2ab3475](https://github.com/christophehurpeau/pob/commit/2ab3475da500ae3aaee0d9969eb7bb9bc207a8d0))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
6
51
|
## [10.4.1](https://github.com/christophehurpeau/pob/compare/pob@10.4.0...pob@10.4.1) (2022-03-05)
|
|
7
52
|
|
|
8
53
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { execSync } from 'child_process';
|
|
2
2
|
import Generator from 'yeoman-generator';
|
|
3
3
|
import inLerna from '../../utils/inLerna.js';
|
|
4
|
-
import inNpmLerna from '../../utils/inNpmLerna.js';
|
|
5
4
|
import * as packageUtils from '../../utils/package.js';
|
|
6
5
|
import { appIgnorePaths } from './ignorePaths.js';
|
|
7
6
|
|
|
8
|
-
const appsWithTypescript = ['alp', 'next.js', 'pobpack'];
|
|
9
|
-
const appsWithBrowser = ['alp', 'next.js'];
|
|
7
|
+
const appsWithTypescript = ['alp', 'next.js', 'remix', 'pobpack'];
|
|
8
|
+
const appsWithBrowser = ['alp', 'next.js', 'remix'];
|
|
10
9
|
|
|
11
10
|
export default class PobAppGenerator extends Generator {
|
|
12
11
|
constructor(args, opts) {
|
|
@@ -67,7 +66,15 @@ export default class PobAppGenerator extends Generator {
|
|
|
67
66
|
name: 'type',
|
|
68
67
|
message: 'What kind of app is this ?',
|
|
69
68
|
default: (config && config.type) || 'alp',
|
|
70
|
-
choices: [
|
|
69
|
+
choices: [
|
|
70
|
+
'alp',
|
|
71
|
+
'pobpack',
|
|
72
|
+
'next.js',
|
|
73
|
+
'remix',
|
|
74
|
+
'node',
|
|
75
|
+
'alp-node',
|
|
76
|
+
'other',
|
|
77
|
+
],
|
|
71
78
|
},
|
|
72
79
|
{
|
|
73
80
|
type: 'confirm',
|
|
@@ -154,44 +161,46 @@ export default class PobAppGenerator extends Generator {
|
|
|
154
161
|
) {
|
|
155
162
|
return './src';
|
|
156
163
|
}
|
|
157
|
-
|
|
164
|
+
if (this.appConfig.type === 'remix') return '.';
|
|
158
165
|
return '';
|
|
159
166
|
})(),
|
|
160
167
|
});
|
|
161
168
|
|
|
162
169
|
this.composeWith('pob:common:remove-old-dependencies');
|
|
163
170
|
|
|
164
|
-
this.
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
if (this.appConfig.type !== 'remix') {
|
|
172
|
+
this.composeWith('pob:common:testing', {
|
|
173
|
+
enable: this.appConfig.testing,
|
|
174
|
+
testing: this.appConfig.testing,
|
|
175
|
+
typescript: babel,
|
|
176
|
+
documentation: false,
|
|
177
|
+
codecov: this.appConfig.codecov,
|
|
178
|
+
ci: this.appConfig.ci,
|
|
179
|
+
packageManager: this.options.packageManager,
|
|
180
|
+
isApp: true,
|
|
181
|
+
});
|
|
174
182
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
183
|
+
this.composeWith('pob:common:format-lint', {
|
|
184
|
+
documentation: false,
|
|
185
|
+
testing: this.appConfig.testing,
|
|
186
|
+
babel,
|
|
187
|
+
node,
|
|
188
|
+
browser,
|
|
189
|
+
// nextjs now supports src rootAsSrc: this.appConfig.type === 'next.js',
|
|
190
|
+
enableSrcResolver: true,
|
|
191
|
+
packageManager: this.options.packageManager,
|
|
192
|
+
yarnNodeLinker: this.options.yarnNodeLinker,
|
|
193
|
+
ignorePaths: ignorePaths.join('\n'),
|
|
194
|
+
buildDirectory: 'build',
|
|
195
|
+
});
|
|
188
196
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
197
|
+
this.composeWith('pob:common:release', {
|
|
198
|
+
enable: !inLerna && this.appConfig.testing && this.appConfig.ci,
|
|
199
|
+
withBabel: babel,
|
|
200
|
+
documentation: false,
|
|
201
|
+
updateOnly: this.options.updateOnly,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
195
204
|
|
|
196
205
|
this.composeWith('pob:core:vscode', {
|
|
197
206
|
root: !inLerna,
|
|
@@ -224,6 +233,9 @@ export default class PobAppGenerator extends Generator {
|
|
|
224
233
|
export: this.appConfig.export,
|
|
225
234
|
});
|
|
226
235
|
break;
|
|
236
|
+
case 'remix':
|
|
237
|
+
this.composeWith('pob:app:remix', {});
|
|
238
|
+
break;
|
|
227
239
|
}
|
|
228
240
|
|
|
229
241
|
execSync(
|
|
@@ -237,10 +249,11 @@ export default class PobAppGenerator extends Generator {
|
|
|
237
249
|
// Re-read the content at this point because a composed generator might modify it.
|
|
238
250
|
const pkg = this.fs.readJSON(this.destinationPath('package.json'));
|
|
239
251
|
|
|
240
|
-
if (
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
} else
|
|
252
|
+
// if (isNpm) {
|
|
253
|
+
// if (!pkg.engines) pkg.engines = {};
|
|
254
|
+
// pkg.engines.yarn = '< 0.0.0';
|
|
255
|
+
// } else
|
|
256
|
+
if (pkg.engines) {
|
|
244
257
|
delete pkg.engines.yarn;
|
|
245
258
|
}
|
|
246
259
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export const appIgnorePaths = {
|
|
2
2
|
alp: (config) => ['# alp paths', '/build', '/public', '/data'],
|
|
3
3
|
'next.js': (config) => ['# next.js paths', '/.next', '/out', '/build'],
|
|
4
|
+
remix: (config) => ['# remix paths', '/.cache', '/build', '/public/build'],
|
|
4
5
|
pobpack: (config) => ['/build', '/public'],
|
|
5
6
|
node: (config) => ['/build'],
|
|
6
7
|
'alp-node': (config) => ['/build'],
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Generator from 'yeoman-generator';
|
|
2
|
+
import * as packageUtils from '../../../utils/package.js';
|
|
3
|
+
|
|
4
|
+
// run "yarn create remix remix" first, then "cd remix ; pob app"
|
|
5
|
+
export default class AppRemixGenerator extends Generator {
|
|
6
|
+
writing() {
|
|
7
|
+
const pkg = this.fs.readJSON(this.destinationPath('package.json'));
|
|
8
|
+
|
|
9
|
+
packageUtils.addScripts(pkg, {
|
|
10
|
+
build: 'cross-env NODE_ENV=production remix build',
|
|
11
|
+
start: 'cross-env NODE_ENV=development remix dev',
|
|
12
|
+
'start:prod': 'cross-env NODE_ENV=production remix-serve build',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
this.fs.writeJSON(this.destinationPath('package.json'), pkg);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -16,7 +16,7 @@ jobs:
|
|
|
16
16
|
token: ${{ secrets.GH_TOKEN }}
|
|
17
17
|
fetch-depth: 0
|
|
18
18
|
|
|
19
|
-
- uses: actions/setup-node@
|
|
19
|
+
- uses: actions/setup-node@v3
|
|
20
20
|
with:
|
|
21
21
|
node-version: 14
|
|
22
22
|
|
|
@@ -59,7 +59,7 @@ jobs:
|
|
|
59
59
|
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
|
60
60
|
<% if (publish) { -%>
|
|
61
61
|
|
|
62
|
-
- uses: actions/setup-node@
|
|
62
|
+
- uses: actions/setup-node@v3
|
|
63
63
|
if: |
|
|
64
64
|
github.ref == 'refs/heads/main'
|
|
65
65
|
&& contains(github.event.inputs.dry-run, 'y') == false
|
package/lib/pob.js
CHANGED
|
@@ -7,6 +7,7 @@ import argv from 'minimist-argv';
|
|
|
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';
|
|
10
|
+
import AppRemixGenerator from './generators/app/remix/AppRemixGenerator.js';
|
|
10
11
|
import CommonBabelGenerator from './generators/common/babel/CommonBabelGenerator.js';
|
|
11
12
|
import CommonLintGenerator from './generators/common/format-lint/CommonLintGenerator.js';
|
|
12
13
|
import CommonHuskyGenerator from './generators/common/husky/CommonHuskyGenerator.js';
|
|
@@ -84,6 +85,11 @@ env.registerStub(
|
|
|
84
85
|
'pob:app:nextjs',
|
|
85
86
|
`${__dirname}/generators/app/nextjs/AppNextjsGenerator.js`,
|
|
86
87
|
);
|
|
88
|
+
env.registerStub(
|
|
89
|
+
AppRemixGenerator,
|
|
90
|
+
'pob:app:remix',
|
|
91
|
+
`${__dirname}/generators/app/nextjs/AppRemixGenerator.js`,
|
|
92
|
+
);
|
|
87
93
|
env.registerStub(
|
|
88
94
|
CommonBabelGenerator,
|
|
89
95
|
'pob:common:babel',
|
|
@@ -210,9 +216,10 @@ env.registerStub(
|
|
|
210
216
|
`${__dirname}/generators/monorepo/typescript/MonorepoTypescriptGenerator.js`,
|
|
211
217
|
);
|
|
212
218
|
|
|
213
|
-
let monorepo = argv._[0] === 'lerna' || argv._[0] === 'monorepo';
|
|
214
|
-
const action = monorepo ? argv._[1] : argv._[0];
|
|
215
219
|
const projectPkg = readJson(path.resolve('./package.json'));
|
|
220
|
+
const monorepoArg = argv._[0] === 'lerna' || argv._[0] === 'monorepo';
|
|
221
|
+
let monorepo = monorepoArg || !!(projectPkg && projectPkg.workspaces);
|
|
222
|
+
const action = monorepoArg ? argv._[1] : argv._[0];
|
|
216
223
|
|
|
217
224
|
if (action === 'add') {
|
|
218
225
|
if (!projectPkg.workspaces) {
|
package/lib/utils/inLerna.js
CHANGED
|
@@ -23,7 +23,7 @@ const getInLernaThings = () => {
|
|
|
23
23
|
|
|
24
24
|
return {
|
|
25
25
|
rootMonorepoPkg,
|
|
26
|
-
lernaJsonPath,
|
|
26
|
+
lernaJsonPath: lernaJsonPath || path.resolve('lerna.json'),
|
|
27
27
|
rootPath: rootMonorepo,
|
|
28
28
|
root: rootMonorepo === cwd,
|
|
29
29
|
rootPackageManager:
|
|
@@ -44,6 +44,9 @@ const getInLernaThings = () => {
|
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
export default !(
|
|
47
|
+
export default !(
|
|
48
|
+
rootMonorepoPkg &&
|
|
49
|
+
(rootMonorepoPkg.workspaces || rootMonorepoPkg.lerna || !!lernaJsonPath)
|
|
50
|
+
)
|
|
48
51
|
? false
|
|
49
52
|
: getInLernaThings();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.7.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@pob/sort-object": "^4.0.1",
|
|
49
49
|
"@pob/sort-pkg": "^4.0.1",
|
|
50
50
|
"@yarnpkg/parsers": "2.5.0",
|
|
51
|
-
"eslint": "8.
|
|
51
|
+
"eslint": "8.11.0",
|
|
52
52
|
"findup-sync": "^5.0.0",
|
|
53
53
|
"git-remote-url": "^1.0.1",
|
|
54
54
|
"github-username": "^6.0.0",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"yeoman-environment": "^3.5.1",
|
|
68
68
|
"yeoman-generator": "^5.4.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "552efd409c73dc34014aaad8a5d05b513f849fb8"
|
|
71
71
|
}
|