pob 35.3.0 → 35.4.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/lib/generators/app/PobAppGenerator.js +17 -5
- package/lib/generators/app/ignorePaths.js +1 -0
- package/lib/generators/app/vite/AppViteGenerator.js +26 -6
- package/lib/generators/common/release/templates/workflow-release.yml.ejs +1 -1
- package/lib/generators/common/testing/CommonTestingGenerator.js +1 -1
- package/lib/generators/common/transpiler/CommonTranspilerGenerator.js +7 -0
- package/lib/generators/core/bun/templates/bunfig.toml.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-push-workflow-split.yml.ejs +7 -7
- package/lib/generators/core/ci/templates/github-action-push-workflow.yml.ejs +2 -2
- package/lib/generators/core/npm/CoreNpmGenerator.js +4 -0
- package/lib/generators/core/yarn/CoreYarnGenerator.js +2 -0
- package/package.json +8 -8
|
@@ -5,11 +5,19 @@ import inMonorepo from "../../utils/inMonorepo.js";
|
|
|
5
5
|
import * as packageUtils from "../../utils/package.js";
|
|
6
6
|
import { appIgnorePaths } from "./ignorePaths.js";
|
|
7
7
|
|
|
8
|
-
const appsWithTypescript = [
|
|
9
|
-
|
|
8
|
+
const appsWithTypescript = [
|
|
9
|
+
"alp",
|
|
10
|
+
"next.js",
|
|
11
|
+
"vite",
|
|
12
|
+
"vite-with-server",
|
|
13
|
+
"expo",
|
|
14
|
+
"yarn-plugin",
|
|
15
|
+
];
|
|
16
|
+
const appsWithBrowser = ["alp", "next.js", "vite", "vite-with-server"];
|
|
10
17
|
const shouldEnableHashSlash = (appType) =>
|
|
11
18
|
appType === "alp" ||
|
|
12
19
|
appType === "vite" ||
|
|
20
|
+
appType === "vite-with-server" ||
|
|
13
21
|
appType === "alp-node" ||
|
|
14
22
|
appType === "next.js" ||
|
|
15
23
|
appType === "expo";
|
|
@@ -100,6 +108,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
100
108
|
choices: [
|
|
101
109
|
"alp",
|
|
102
110
|
"vite",
|
|
111
|
+
"vite-with-server",
|
|
103
112
|
"next.js",
|
|
104
113
|
"node",
|
|
105
114
|
"node-library", // monorepo library for app. Not a real library
|
|
@@ -359,14 +368,17 @@ export default class PobAppGenerator extends Generator {
|
|
|
359
368
|
switch (this.appConfig.type) {
|
|
360
369
|
case "next.js":
|
|
361
370
|
throw new Error(
|
|
362
|
-
"nextjs has been removed. Please migrate to 'vite' or 'expo'.",
|
|
371
|
+
"nextjs has been removed. Please migrate to 'vite', 'vite-with-server' or 'expo'.",
|
|
363
372
|
);
|
|
364
373
|
case "remix":
|
|
365
374
|
throw new Error(
|
|
366
|
-
"remix has been removed. Please migrate to 'vite' or 'expo'.",
|
|
375
|
+
"remix has been removed. Please migrate to 'vite', 'vite-with-server' or 'expo'.",
|
|
367
376
|
);
|
|
368
377
|
case "vite":
|
|
369
|
-
|
|
378
|
+
case "vite-with-server":
|
|
379
|
+
this.composeWith("pob:app:vite", {
|
|
380
|
+
enableServer: this.appConfig.type === "vite-with-server",
|
|
381
|
+
});
|
|
370
382
|
break;
|
|
371
383
|
// no default
|
|
372
384
|
}
|
|
@@ -11,6 +11,7 @@ export const appIgnorePaths = {
|
|
|
11
11
|
pkg?.dependencies?.tamagui ? "/.tamagui" : undefined,
|
|
12
12
|
].filter(Boolean),
|
|
13
13
|
vite: (config) => ["/dist"],
|
|
14
|
+
"vite-with-server": (config) => ["/dist"],
|
|
14
15
|
node: (config) => (config.distribute ? [] : ["/build"]),
|
|
15
16
|
"node-library": (config) => ["/build"],
|
|
16
17
|
"untranspiled-library": (config) => [],
|
|
@@ -2,15 +2,35 @@ import Generator from "yeoman-generator";
|
|
|
2
2
|
import * as packageUtils from "../../../utils/package.js";
|
|
3
3
|
|
|
4
4
|
export default class AppViteGenerator extends Generator {
|
|
5
|
+
constructor(args, opts) {
|
|
6
|
+
super(args, opts);
|
|
7
|
+
this.option("enableServer", {
|
|
8
|
+
type: Boolean,
|
|
9
|
+
default: false,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
5
13
|
writing() {
|
|
6
14
|
const pkg = this.fs.readJSON(this.destinationPath("package.json"));
|
|
7
15
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
if (this.options.enableServer) {
|
|
17
|
+
packageUtils.addScripts(pkg, {
|
|
18
|
+
build: "yarn run build:client && yarn run build:server",
|
|
19
|
+
"build:client": "vite build --outDir dist/client",
|
|
20
|
+
"build:server":
|
|
21
|
+
"vite build --ssr src/entry-server.tsx --outDir dist/server",
|
|
22
|
+
preview: "yarn run build && yarn run start:prod",
|
|
23
|
+
start: "node server.js",
|
|
24
|
+
"start:prod": "NODE_ENV=production node server.js",
|
|
25
|
+
});
|
|
26
|
+
} else {
|
|
27
|
+
packageUtils.addScripts(pkg, {
|
|
28
|
+
"build:analyze": "ENABLE_ANALYZER=true vite build",
|
|
29
|
+
build: "vite build",
|
|
30
|
+
start: "vite",
|
|
31
|
+
serve: "vite preview",
|
|
32
|
+
});
|
|
33
|
+
}
|
|
14
34
|
|
|
15
35
|
this.fs.writeJSON(this.destinationPath("package.json"), pkg);
|
|
16
36
|
}
|
|
@@ -317,7 +317,7 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
317
317
|
packageUtils.addDevDependencies(pkg, ["vite"]);
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
packageUtils.removeScripts(["generate:test-coverage"]);
|
|
320
|
+
packageUtils.removeScripts(pkg, ["generate:test-coverage"]);
|
|
321
321
|
|
|
322
322
|
if (!this.options.enable) {
|
|
323
323
|
// if (inMonorepo) {
|
|
@@ -521,6 +521,13 @@ export default class CommonTranspilerGenerator extends Generator {
|
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
const calcExport = () => {
|
|
524
|
+
if (extraEntryConfig.name.endsWith(".css")) {
|
|
525
|
+
return {
|
|
526
|
+
style: `./${extraEntryConfig.name}`,
|
|
527
|
+
default: `./${extraEntryConfig.name}`,
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
|
|
524
531
|
if (pkg.type === "module") {
|
|
525
532
|
return extraEntryConfig.name.endsWith(".cjs") ||
|
|
526
533
|
extraEntryConfig.name.endsWith(".d.ts")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[install]
|
|
2
2
|
# Only install package versions published at least 3 days ago
|
|
3
3
|
minimumReleaseAge = 259200 # seconds - in #23162 it'll allow "3d" too
|
|
4
|
-
minimumReleaseAgeExcludes = ["@pob/root", "@pob/esbuild", "@pob/rollup", "@pob/rollup-esbuild", "@pob/rollup-typescript", "@pob/sort-object", "@pob/sort-pkg", "@pob/version", "pob-dependencies", "pob-dependencies", "alouette", "alouette-icons", "nightingale", "nightingale-logger"]
|
|
4
|
+
minimumReleaseAgeExcludes = ["@pob/root", "@pob/esbuild", "@pob/rollup", "@pob/rollup-esbuild", "@pob/rollup-typescript", "@pob/sort-object", "@pob/sort-pkg", "@pob/version", "pob-dependencies", "pob-dependencies", "alouette", "alouette-icons", "nightingale", "nightingale-logger", "nightingale-levels", "nightingale-types"]
|
|
@@ -9,7 +9,7 @@ jobs:
|
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
|
|
11
11
|
steps:
|
|
12
|
-
- uses: actions/checkout@
|
|
12
|
+
- uses: actions/checkout@v7
|
|
13
13
|
|
|
14
14
|
<% if (packageManager === 'yarn') { -%>
|
|
15
15
|
- name: Enable Corepack
|
|
@@ -54,7 +54,7 @@ jobs:
|
|
|
54
54
|
runs-on: ubuntu-latest
|
|
55
55
|
|
|
56
56
|
steps:
|
|
57
|
-
- uses: actions/checkout@
|
|
57
|
+
- uses: actions/checkout@v7
|
|
58
58
|
|
|
59
59
|
<% if (packageManager === 'yarn') { -%>
|
|
60
60
|
- name: Enable Corepack
|
|
@@ -101,7 +101,7 @@ jobs:
|
|
|
101
101
|
runs-on: ubuntu-latest
|
|
102
102
|
|
|
103
103
|
steps:
|
|
104
|
-
- uses: actions/checkout@
|
|
104
|
+
- uses: actions/checkout@v7
|
|
105
105
|
|
|
106
106
|
<% if (packageManager === 'yarn') { -%>
|
|
107
107
|
- name: Enable Corepack
|
|
@@ -159,7 +159,7 @@ jobs:
|
|
|
159
159
|
node-version: [<% if (!onlyLatestLTS && nodeMaintenanceMajorVersion !== nodeLatestMajorVersion) { -%><%= nodeMaintenanceMajorVersion %>, <% } -%><%= nodeLatestMajorVersion %>]
|
|
160
160
|
|
|
161
161
|
steps:
|
|
162
|
-
- uses: actions/checkout@
|
|
162
|
+
- uses: actions/checkout@v7
|
|
163
163
|
|
|
164
164
|
<% if (packageManager === 'yarn') { -%>
|
|
165
165
|
- name: Enable Corepack
|
|
@@ -209,7 +209,7 @@ jobs:
|
|
|
209
209
|
CI: true
|
|
210
210
|
|
|
211
211
|
- name: Send results to codecov
|
|
212
|
-
uses: codecov/codecov-action@
|
|
212
|
+
uses: codecov/codecov-action@v7
|
|
213
213
|
if: matrix.node-version == <%= nodeLatestMajorVersion %> && github.actor != 'dependabot[bot]'
|
|
214
214
|
with:
|
|
215
215
|
fail_ci_if_error: true
|
|
@@ -230,7 +230,7 @@ jobs:
|
|
|
230
230
|
node-version: [<%= nodeLatestMajorVersion %>]
|
|
231
231
|
|
|
232
232
|
steps:
|
|
233
|
-
- uses: actions/checkout@
|
|
233
|
+
- uses: actions/checkout@v7
|
|
234
234
|
|
|
235
235
|
<% if (packageManager === 'yarn') { -%>
|
|
236
236
|
- name: Enable Corepack
|
|
@@ -278,7 +278,7 @@ jobs:
|
|
|
278
278
|
needs: [<%= checks ? '"checks", ' : '' -%><%= build ? '"build", ' : '' -%>"lint"<%= testing ? ', "test"' : '' -%>]
|
|
279
279
|
|
|
280
280
|
steps:
|
|
281
|
-
- uses: actions/checkout@
|
|
281
|
+
- uses: actions/checkout@v7
|
|
282
282
|
|
|
283
283
|
- uses: actions/setup-node@v6
|
|
284
284
|
with:
|
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
node-version: [<% if (!onlyLatestLTS && nodeMaintenanceMajorVersion !== nodeLatestMajorVersion) { -%><%= nodeMaintenanceMajorVersion %>.x, <% } -%><%= nodeLatestMajorVersion %>.x]
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v7
|
|
16
16
|
|
|
17
17
|
<% if (packageManager === 'yarn') { -%>
|
|
18
18
|
- name: Enable Corepack
|
|
@@ -95,7 +95,7 @@ jobs:
|
|
|
95
95
|
CI: true
|
|
96
96
|
|
|
97
97
|
- name: Send results to codecov
|
|
98
|
-
uses: codecov/codecov-action@
|
|
98
|
+
uses: codecov/codecov-action@v7
|
|
99
99
|
with:
|
|
100
100
|
fail_ci_if_error: true
|
|
101
101
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -51,6 +51,10 @@ export default class CoreNpmGenerator extends Generator {
|
|
|
51
51
|
files.add("bin");
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
if (this.fs.exists(this.destinationPath("skills"))) {
|
|
55
|
+
files.add("skills");
|
|
56
|
+
}
|
|
57
|
+
|
|
54
58
|
if (pkg.exports) {
|
|
55
59
|
Object.values(pkg.exports).forEach((value) => {
|
|
56
60
|
if (typeof value === "string" && value.startsWith("./tsconfigs/")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "35.
|
|
3
|
+
"version": "35.4.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"./package.json": "./package.json"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@pob/eslint-config": "65.
|
|
32
|
-
"@pob/eslint-config-typescript-react": "65.
|
|
31
|
+
"@pob/eslint-config": "65.5.0",
|
|
32
|
+
"@pob/eslint-config-typescript-react": "65.5.0",
|
|
33
33
|
"@types/inquirer": "9.0.9",
|
|
34
34
|
"@yeoman/adapter": "4.0.2",
|
|
35
35
|
"@yeoman/types": "1.11.1",
|
|
@@ -44,20 +44,20 @@
|
|
|
44
44
|
"mem-fs": "4.1.4",
|
|
45
45
|
"mem-fs-editor": "12.0.4",
|
|
46
46
|
"minimist": "1.2.8",
|
|
47
|
-
"oxfmt": "0.
|
|
47
|
+
"oxfmt": "0.54.0",
|
|
48
48
|
"parse-author": "2.0.0",
|
|
49
|
-
"semver": "7.8.
|
|
49
|
+
"semver": "7.8.5",
|
|
50
50
|
"typescript": "6.0.3",
|
|
51
51
|
"validate-npm-package-name": "^8.0.0",
|
|
52
52
|
"yeoman-environment": "6.1.0",
|
|
53
53
|
"yeoman-generator": "8.2.2",
|
|
54
54
|
"@pob/sort-object": "11.1.1",
|
|
55
|
-
"pob-
|
|
56
|
-
"
|
|
55
|
+
"@pob/sort-pkg": "13.1.1",
|
|
56
|
+
"pob-dependencies": "24.2.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "24.12.4",
|
|
60
|
-
"@pob/root": "24.
|
|
60
|
+
"@pob/root": "24.4.0"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=22.18.0"
|