pob 11.8.1 → 11.9.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 +22 -0
- package/lib/generators/app/PobAppGenerator.js +10 -4
- package/lib/generators/app/ignorePaths.js +13 -0
- package/lib/generators/common/format-lint/CommonLintGenerator.js +28 -20
- package/lib/generators/common/testing/CommonTestingGenerator.js +7 -1
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +7 -0
- package/lib/generators/common/typescript/templates/tsconfig.json.ejs +5 -4
- package/lib/generators/core/yarn/CoreYarnGenerator.js +6 -0
- package/lib/generators/lib/PobLibGenerator.js +1 -0
- package/lib/generators/lib/doc/templates/tsconfig.doc.json.lerna.ejs +1 -1
- package/lib/generators/monorepo/PobMonorepoGenerator.js +1 -0
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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.9.0](https://github.com/christophehurpeau/pob/compare/pob@11.8.1...pob@11.9.0) (2023-04-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add expo app ([5b48a8e](https://github.com/christophehurpeau/pob/commit/5b48a8e03b14a414d2e758dbe348be67afc15710))
|
|
12
|
+
* **deps:** update dependency eslint to v8.37.0 ([#1589](https://github.com/christophehurpeau/pob/issues/1589)) ([e9be11e](https://github.com/christophehurpeau/pob/commit/e9be11eefc8f15e591327f7bf12397f30a4f6a4e))
|
|
13
|
+
* **pob:** add supportedArchitectures in .yarnrc.yml ([21c48f5](https://github.com/christophehurpeau/pob/commit/21c48f50ae3867d9ce69e190b1f6a4437a05970a))
|
|
14
|
+
* update tsconfig moduleResolution to bundler with ts 5 ([9f08112](https://github.com/christophehurpeau/pob/commit/9f08112a50c68fc38d119a5ac44cae94f264227f))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **deps:** update @pob/eslint-config to v50.0.4 ([#1576](https://github.com/christophehurpeau/pob/issues/1576)) ([570f4fb](https://github.com/christophehurpeau/pob/commit/570f4fb25410db55d11b29453eecef23950d19ef))
|
|
20
|
+
* **deps:** update dependency prettier to v2.8.5 ([#1578](https://github.com/christophehurpeau/pob/issues/1578)) ([07d8197](https://github.com/christophehurpeau/pob/commit/07d81974a850e43792811622845182d8b36ec4ce))
|
|
21
|
+
* **deps:** update dependency prettier to v2.8.6 ([#1580](https://github.com/christophehurpeau/pob/issues/1580)) ([d351ea0](https://github.com/christophehurpeau/pob/commit/d351ea01238a4899eb69cb4c54274ace45249aed))
|
|
22
|
+
* **deps:** update dependency prettier to v2.8.7 ([#1585](https://github.com/christophehurpeau/pob/issues/1585)) ([742de64](https://github.com/christophehurpeau/pob/commit/742de64a8ccaeb94cea5f2edf9c6003158844934))
|
|
23
|
+
* disable baseUrl for expo for now ([fbbe531](https://github.com/christophehurpeau/pob/commit/fbbe531ee6d2d51c4f4cf43a4142122e02dca7ff))
|
|
24
|
+
* prevent removing eslint-config dev deps ([dec1360](https://github.com/christophehurpeau/pob/commit/dec1360e4814a216b0db50e1bcbe7dbd4c677c26))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [11.8.1](https://github.com/christophehurpeau/pob/compare/pob@11.8.0...pob@11.8.1) (2023-03-19)
|
|
7
29
|
|
|
8
30
|
|
|
@@ -5,7 +5,7 @@ import inLerna from '../../utils/inLerna.js';
|
|
|
5
5
|
import * as packageUtils from '../../utils/package.js';
|
|
6
6
|
import { appIgnorePaths } from './ignorePaths.js';
|
|
7
7
|
|
|
8
|
-
const appsWithTypescript = ['alp', 'next.js', 'remix', 'pobpack'];
|
|
8
|
+
const appsWithTypescript = ['alp', 'next.js', 'remix', 'pobpack', 'expo'];
|
|
9
9
|
const appsWithBrowser = ['alp', 'next.js', 'remix'];
|
|
10
10
|
|
|
11
11
|
export default class PobAppGenerator extends Generator {
|
|
@@ -75,6 +75,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
75
75
|
'node',
|
|
76
76
|
'node-library', // monorepo library for app. Not a real library
|
|
77
77
|
'alp-node',
|
|
78
|
+
'expo',
|
|
78
79
|
'other',
|
|
79
80
|
],
|
|
80
81
|
},
|
|
@@ -151,7 +152,9 @@ export default class PobAppGenerator extends Generator {
|
|
|
151
152
|
|
|
152
153
|
this.composeWith('pob:common:typescript', {
|
|
153
154
|
enable: babel,
|
|
154
|
-
// nextjs now supports src
|
|
155
|
+
// nextjs now supports src
|
|
156
|
+
rootDir: this.appConfig.type === 'expo' ? '.' : 'src',
|
|
157
|
+
srcDir: 'src',
|
|
155
158
|
builddefs: false,
|
|
156
159
|
dom: browser,
|
|
157
160
|
jsx,
|
|
@@ -169,7 +172,9 @@ export default class PobAppGenerator extends Generator {
|
|
|
169
172
|
) {
|
|
170
173
|
return './src';
|
|
171
174
|
}
|
|
172
|
-
if (this.appConfig.type === 'remix')
|
|
175
|
+
if (this.appConfig.type === 'remix') {
|
|
176
|
+
return '.';
|
|
177
|
+
}
|
|
173
178
|
return '';
|
|
174
179
|
})(),
|
|
175
180
|
});
|
|
@@ -185,6 +190,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
185
190
|
enableReleasePlease,
|
|
186
191
|
testing: this.appConfig.testing,
|
|
187
192
|
typescript: babel,
|
|
193
|
+
build: babel && this.appConfig.type !== 'expo',
|
|
188
194
|
documentation: false,
|
|
189
195
|
codecov: this.appConfig.codecov,
|
|
190
196
|
ci: this.appConfig.ci,
|
|
@@ -206,7 +212,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
206
212
|
packageManager: this.options.packageManager,
|
|
207
213
|
yarnNodeLinker: this.options.yarnNodeLinker,
|
|
208
214
|
ignorePaths: ignorePaths.join('\n'),
|
|
209
|
-
buildDirectory: 'build',
|
|
215
|
+
buildDirectory: this.appConfig.type === 'expo' ? '.expo' : 'build',
|
|
210
216
|
});
|
|
211
217
|
|
|
212
218
|
this.composeWith('pob:common:release', {
|
|
@@ -13,4 +13,17 @@ export const appIgnorePaths = {
|
|
|
13
13
|
'node-library': (config) => ['/build'],
|
|
14
14
|
'alp-node': (config) => ['/build'],
|
|
15
15
|
other: (config) => [],
|
|
16
|
+
expo: (config) => [
|
|
17
|
+
'/.expo/',
|
|
18
|
+
'*.jks',
|
|
19
|
+
'*.p8',
|
|
20
|
+
'*.p12',
|
|
21
|
+
'*.key',
|
|
22
|
+
'*.mobileprovision',
|
|
23
|
+
'*.orig.*',
|
|
24
|
+
'/web-build/',
|
|
25
|
+
|
|
26
|
+
'# Temporary files created by Metro to check the health of the file watcher',
|
|
27
|
+
'.metro-health-check*',
|
|
28
|
+
],
|
|
16
29
|
};
|
|
@@ -185,7 +185,6 @@ export default class CommonLintGenerator extends Generator {
|
|
|
185
185
|
'@pob/eslint-config-typescript-node',
|
|
186
186
|
'babel-eslint',
|
|
187
187
|
'eslint-config-pob',
|
|
188
|
-
'eslint-config-prettier',
|
|
189
188
|
'typescript-eslint-parser',
|
|
190
189
|
'standard',
|
|
191
190
|
'eslint-import-resolver-node',
|
|
@@ -196,6 +195,7 @@ export default class CommonLintGenerator extends Generator {
|
|
|
196
195
|
'eslint-plugin-jsx-a11y',
|
|
197
196
|
'eslint-config-airbnb',
|
|
198
197
|
'eslint-config-airbnb-base',
|
|
198
|
+
'eslint-config-prettier',
|
|
199
199
|
'eslint-plugin-babel',
|
|
200
200
|
'eslint-plugin-flowtype',
|
|
201
201
|
'eslint-plugin-prefer-class-properties',
|
|
@@ -222,23 +222,25 @@ export default class CommonLintGenerator extends Generator {
|
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
if (globalEslint && !((inLerna && inLerna.root) || this.options.monorepo)) {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
225
|
+
if (!pkg.name.startsWith('@pob/eslint-config')) {
|
|
226
|
+
packageUtils.removeDevDependencies(
|
|
227
|
+
pkg,
|
|
228
|
+
[
|
|
229
|
+
'eslint',
|
|
230
|
+
'prettier',
|
|
231
|
+
'@pob/eslint-config',
|
|
232
|
+
'@pob/eslint-config-typescript',
|
|
233
|
+
'@pob/eslint-config-typescript-react',
|
|
234
|
+
'@pob/eslint-config-react',
|
|
235
|
+
'@typescript-eslint/eslint-plugin',
|
|
236
|
+
'@typescript-eslint/parser',
|
|
237
|
+
'eslint-plugin-node',
|
|
238
|
+
'eslint-plugin-unicorn',
|
|
239
|
+
'eslint-plugin-import',
|
|
240
|
+
],
|
|
241
|
+
true,
|
|
242
|
+
);
|
|
243
|
+
}
|
|
242
244
|
} else {
|
|
243
245
|
if (pkg.name !== 'pob-monorepo') {
|
|
244
246
|
packageUtils.removeDevDependencies(pkg, ['prettier']);
|
|
@@ -419,7 +421,13 @@ export default class CommonLintGenerator extends Generator {
|
|
|
419
421
|
}
|
|
420
422
|
|
|
421
423
|
if ((!inLerna || !inLerna.root) && useBabel) {
|
|
422
|
-
|
|
424
|
+
const buildPath = `/${this.options.buildDirectory}`;
|
|
425
|
+
if (
|
|
426
|
+
!this.options.ignorePaths ||
|
|
427
|
+
!this.options.ignorePaths.includes(buildPath)
|
|
428
|
+
) {
|
|
429
|
+
ignorePatterns.add(buildPath);
|
|
430
|
+
}
|
|
423
431
|
}
|
|
424
432
|
if (inLerna && inLerna.root && this.options.typescript) {
|
|
425
433
|
ignorePatterns.add('/rollup.config.mjs');
|
|
@@ -428,7 +436,7 @@ export default class CommonLintGenerator extends Generator {
|
|
|
428
436
|
if (this.options.ignorePaths) {
|
|
429
437
|
this.options.ignorePaths
|
|
430
438
|
.split('\n')
|
|
431
|
-
.filter(
|
|
439
|
+
.filter(Boolean)
|
|
432
440
|
.forEach((ignorePath) => {
|
|
433
441
|
if (ignorePath.startsWith('#')) return;
|
|
434
442
|
ignorePatterns.add(ignorePath);
|
|
@@ -38,6 +38,12 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
38
38
|
desc: 'typescript',
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
+
this.option('build', {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
required: true,
|
|
44
|
+
desc: 'build (with babel or typescript)',
|
|
45
|
+
});
|
|
46
|
+
|
|
41
47
|
this.option('codecov', {
|
|
42
48
|
type: Boolean,
|
|
43
49
|
required: true,
|
|
@@ -81,7 +87,7 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
81
87
|
enable: this.options.ci,
|
|
82
88
|
enableReleasePlease: this.options.enableReleasePlease,
|
|
83
89
|
testing: this.options.enable,
|
|
84
|
-
build: this.options.
|
|
90
|
+
build: this.options.build,
|
|
85
91
|
typescript: this.options.typescript,
|
|
86
92
|
documentation: this.options.documentation,
|
|
87
93
|
codecov: this.options.codecov,
|
|
@@ -20,6 +20,12 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
20
20
|
desc: 'customize rootDir',
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
+
this.option('srcDir', {
|
|
24
|
+
type: String,
|
|
25
|
+
defaults: 'src',
|
|
26
|
+
desc: 'customize srcDir, if different than rootDir',
|
|
27
|
+
});
|
|
28
|
+
|
|
23
29
|
this.option('jsx', {
|
|
24
30
|
type: Boolean,
|
|
25
31
|
defaults: true,
|
|
@@ -186,6 +192,7 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
186
192
|
monorepoPackageSrcPaths,
|
|
187
193
|
monorepoPackageReferences,
|
|
188
194
|
rootDir: this.options.rootDir,
|
|
195
|
+
srcDir: this.options.srcDir || this.options.rootDir,
|
|
189
196
|
jsx,
|
|
190
197
|
jsxPreserve: this.options.jsxPreserve,
|
|
191
198
|
composite,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"include": [
|
|
3
|
-
"<%=
|
|
4
|
-
"<%=
|
|
3
|
+
"<%= srcDir %>/**/*.ts"<% if (jsx) { -%>,
|
|
4
|
+
"<%= srcDir %>/**/*.tsx"<% } %><% if (srcDir !== rootDir) { -%>,
|
|
5
|
+
"<%= rootDir %>/*.ts"<% } %>
|
|
5
6
|
],
|
|
6
|
-
<% if(
|
|
7
|
+
<% if(srcDir === '.' || forceExcludeNodeModules) { -%>
|
|
7
8
|
"exclude": [
|
|
8
9
|
"node_modules"
|
|
9
10
|
],
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"forceConsistentCasingInFileNames": true,
|
|
60
61
|
|
|
61
62
|
/* Module Resolution Options */
|
|
62
|
-
"moduleResolution": "
|
|
63
|
+
"moduleResolution": "bundler" /* Specify module resolution strategy. */,
|
|
63
64
|
<% if (resolveJsonModule) { -%>
|
|
64
65
|
"resolveJsonModule": <%= resolveJsonModule %>,
|
|
65
66
|
<% } -%>
|
|
@@ -102,6 +102,12 @@ export default class CoreYarnGenerator extends Generator {
|
|
|
102
102
|
config.defaultSemverRangePrefix = this.options.type === 'app' ? '' : '^';
|
|
103
103
|
config.enableMessageNames = false;
|
|
104
104
|
config.nodeLinker = this.options.yarnNodeLinker;
|
|
105
|
+
// https://yarnpkg.dev/releases/3-1/
|
|
106
|
+
// make sure all supported architectures are in yarn cache
|
|
107
|
+
config.supportedArchitectures = {
|
|
108
|
+
os: ['linux', 'darwin'],
|
|
109
|
+
cpu: ['x64', 'arm64'],
|
|
110
|
+
};
|
|
105
111
|
writeAndFormat(this.fs, '.yarnrc.yml', yml.dump(config, {}));
|
|
106
112
|
} else {
|
|
107
113
|
this.fs.delete('.yarn');
|
|
@@ -248,6 +248,7 @@ export default class PobLibGenerator extends Generator {
|
|
|
248
248
|
enable: this.pobjson.testing,
|
|
249
249
|
enableReleasePlease,
|
|
250
250
|
testing: this.pobjson.testing,
|
|
251
|
+
build: withBabel,
|
|
251
252
|
typescript: withBabel,
|
|
252
253
|
documentation: !!this.pobjson.documentation,
|
|
253
254
|
codecov: this.pobjson.testing && this.pobjson.testing.codecov,
|
|
@@ -219,6 +219,7 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
219
219
|
enable: this.pobLernaConfig.testing,
|
|
220
220
|
enableReleasePlease: isReleasePleaseEnabled,
|
|
221
221
|
testing: this.pobLernaConfig.testing,
|
|
222
|
+
build: this.pobLernaConfig.typescript,
|
|
222
223
|
typescript: this.pobLernaConfig.typescript,
|
|
223
224
|
documentation: !!this.pobLernaConfig.documentation,
|
|
224
225
|
codecov: this.pobLernaConfig.testing && this.pobLernaConfig.codecov,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.9.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@lerna/package-graph": "5.5.4",
|
|
40
40
|
"@lerna/project": "5.5.4",
|
|
41
|
-
"@pob/eslint-config": "50.0.
|
|
42
|
-
"@pob/eslint-config-typescript": "50.0.
|
|
43
|
-
"@pob/eslint-config-typescript-react": "50.0.
|
|
41
|
+
"@pob/eslint-config": "50.0.4",
|
|
42
|
+
"@pob/eslint-config-typescript": "50.0.4",
|
|
43
|
+
"@pob/eslint-config-typescript-react": "50.0.4",
|
|
44
44
|
"@pob/sort-eslint-config": "4.1.1",
|
|
45
45
|
"@pob/sort-object": "5.1.1",
|
|
46
46
|
"@pob/sort-pkg": "5.2.0",
|
|
47
|
-
"eslint": "8.
|
|
47
|
+
"eslint": "8.37.0",
|
|
48
48
|
"findup-sync": "^5.0.0",
|
|
49
49
|
"git-remote-url": "^1.0.1",
|
|
50
50
|
"github-username": "^6.0.0",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"minimist": "1.2.8",
|
|
59
59
|
"node-fetch": "3.3.1",
|
|
60
60
|
"parse-author": "2.0.0",
|
|
61
|
-
"pob-dependencies": "7.
|
|
62
|
-
"prettier": "2.8.
|
|
61
|
+
"pob-dependencies": "7.7.0",
|
|
62
|
+
"prettier": "2.8.7",
|
|
63
63
|
"semver": "7.3.8",
|
|
64
64
|
"yeoman-environment": "3.15.1",
|
|
65
65
|
"yeoman-generator": "5.8.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@pob/root": "7.
|
|
68
|
+
"@pob/root": "7.7.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "512ed98cfd994cae7ceb9717f70caa1f87012449"
|
|
71
71
|
}
|