@pezkuwi/dev 0.85.11 → 0.85.12
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/cjs/packageInfo.js +1 -1
- package/config/eslint.js +0 -2
- package/config/tsconfig.json +8 -0
- package/package.json +40 -40
- package/packageInfo.js +1 -1
- package/rootJs/index.js +1 -1
- package/scripts/pezkuwi-dev-build-ts.mjs +41 -16
- package/.skip-deno +0 -0
- package/build-deno/README.md +0 -547
- package/build-deno/detectOther.ts +0 -2
- package/build-deno/index.ts +0 -4
- package/build-deno/mod.ts +0 -10
- package/build-deno/packageInfo.ts +0 -3
- package/build-deno/root.ts +0 -4
- package/build-deno/rootJs/Clazz.ts +0 -43
- package/build-deno/rootJs/Jsx.tsx +0 -42
- package/build-deno/rootJs/JsxChild.tsx +0 -18
- package/build-deno/rootJs/augmented.ts +0 -12
- package/build-deno/rootJs/dynamic.d.mts +0 -4
- package/build-deno/rootJs/dynamic.mjs +0 -13
- package/build-deno/rootJs/index.ts +0 -51
- package/build-deno/rootJs/testJson.json +0 -5
- package/build-deno/rootStatic/zagros.svg +0 -1
- package/build-deno/rootTests.ts +0 -57
- package/build-deno/types.ts +0 -4
- package/build-tsc/detectOther.d.ts +0 -2
- package/build-tsc/index.d.ts +0 -1
- package/build-tsc/packageInfo.d.ts +0 -6
- package/build-tsc/root.d.ts +0 -2
- package/build-tsc/rootJs/Clazz.d.ts +0 -18
- package/build-tsc/rootJs/Jsx.d.ts +0 -5
- package/build-tsc/rootJs/JsxChild.d.ts +0 -9
- package/build-tsc/rootJs/augmented.d.ts +0 -8
- package/build-tsc/rootJs/index.d.ts +0 -19
- package/build-tsc/rootTests.d.ts +0 -2
- package/build-tsc/types.d.ts +0 -2
- package/build-tsc-cjs/detectOther.js +0 -3
- package/build-tsc-cjs/index.js +0 -3
- package/build-tsc-cjs/packageInfo.js +0 -4
- package/build-tsc-cjs/root.js +0 -6
- package/build-tsc-cjs/rootJs/Clazz.js +0 -36
- package/build-tsc-cjs/rootJs/Jsx.js +0 -16
- package/build-tsc-cjs/rootJs/JsxChild.js +0 -9
- package/build-tsc-cjs/rootJs/augmented.js +0 -3
- package/build-tsc-cjs/rootJs/index.js +0 -51
- package/build-tsc-cjs/rootTests.js +0 -44
- package/build-tsc-cjs/types.js +0 -2
- package/build-tsc-esm/detectOther.js +0 -1
- package/build-tsc-esm/index.js +0 -2
- package/build-tsc-esm/packageInfo.js +0 -1
- package/build-tsc-esm/root.js +0 -2
- package/build-tsc-esm/rootJs/Clazz.js +0 -32
- package/build-tsc-esm/rootJs/Jsx.js +0 -13
- package/build-tsc-esm/rootJs/JsxChild.js +0 -6
- package/build-tsc-esm/rootJs/augmented.js +0 -2
- package/build-tsc-esm/rootJs/index.js +0 -39
- package/build-tsc-esm/rootTests.js +0 -41
- package/build-tsc-esm/types.js +0 -1
- package/tsconfig.build.json +0 -18
- package/tsconfig.build.tsbuildinfo +0 -1
- package/tsconfig.config.json +0 -14
- package/tsconfig.scripts.json +0 -14
- package/tsconfig.spec.json +0 -18
- package/tsconfig.spec.tsbuildinfo +0 -1
package/cjs/packageInfo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.packageInfo = void 0;
|
|
4
|
-
exports.packageInfo = { name: '@pezkuwi/dev', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.85.
|
|
4
|
+
exports.packageInfo = { name: '@pezkuwi/dev', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.85.12' };
|
package/config/eslint.js
CHANGED
|
@@ -10,7 +10,6 @@ import standardConfig from 'eslint-config-standard';
|
|
|
10
10
|
import deprecationPlugin from 'eslint-plugin-deprecation';
|
|
11
11
|
// @ts-expect-error No definition for this one
|
|
12
12
|
import headerPlugin from 'eslint-plugin-header';
|
|
13
|
-
// @ts-expect-error No definition for this one
|
|
14
13
|
import importPlugin from 'eslint-plugin-import';
|
|
15
14
|
// @ts-expect-error No definition for this one
|
|
16
15
|
import importNewlinesPlugin from 'eslint-plugin-import-newlines';
|
|
@@ -20,7 +19,6 @@ import jestPlugin from 'eslint-plugin-jest';
|
|
|
20
19
|
import nPlugin from 'eslint-plugin-n';
|
|
21
20
|
// @ts-expect-error No definition for this one
|
|
22
21
|
import promisePlugin from 'eslint-plugin-promise';
|
|
23
|
-
// @ts-expect-error No definition for this one
|
|
24
22
|
import reactPlugin from 'eslint-plugin-react';
|
|
25
23
|
// @ts-expect-error No definition for this one
|
|
26
24
|
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
package/config/tsconfig.json
CHANGED
|
@@ -5,6 +5,14 @@
|
|
|
5
5
|
*/
|
|
6
6
|
"extends": "@tsconfig/strictest/tsconfig.json",
|
|
7
7
|
"compilerOptions": {
|
|
8
|
+
/**
|
|
9
|
+
* JavaScript sources are type-checked like the rest. The base set this
|
|
10
|
+
* until @tsconfig/strictest 2.0.8 dropped checkJs, which left every .js and
|
|
11
|
+
* .mjs file outside the program: lint could not parse them with type info.
|
|
12
|
+
*/
|
|
13
|
+
"allowJs": true,
|
|
14
|
+
"checkJs": true,
|
|
15
|
+
|
|
8
16
|
/**
|
|
9
17
|
* Aligns with packages/dev/scripts/pezkuwi-dev-build-ts & packages/dev-ts/src/loader
|
|
10
18
|
* (target here is specifically tied to the minimum supported Node version)
|
package/package.json
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Pezkuwi Team <team@pezkuwichain.app>",
|
|
3
|
-
"bugs": "https://
|
|
3
|
+
"bugs": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev/issues",
|
|
4
4
|
"description": "A collection of shared CI scripts and development environment used by @pezkuwi projects",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18"
|
|
7
7
|
},
|
|
8
|
-
"homepage": "https://
|
|
8
|
+
"homepage": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev/tree/master/packages/dev#readme",
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"name": "@pezkuwi/dev",
|
|
11
11
|
"repository": {
|
|
12
12
|
"directory": "packages/dev",
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://
|
|
14
|
+
"url": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev.git"
|
|
15
15
|
},
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"type": "module",
|
|
18
|
-
"
|
|
19
|
-
"version": "0.85.11",
|
|
20
|
-
"main": "./cjs/index.js",
|
|
21
|
-
"module": "./index.js",
|
|
18
|
+
"version": "0.85.12",
|
|
22
19
|
"bin": {
|
|
23
20
|
"pezkuwi-ci-ghact-build": "./scripts/pezkuwi-ci-ghact-build.mjs",
|
|
24
21
|
"pezkuwi-ci-ghact-docs": "./scripts/pezkuwi-ci-ghact-docs.mjs",
|
|
@@ -44,7 +41,12 @@
|
|
|
44
41
|
"pezkuwi-exec-tsc": "./scripts/pezkuwi-exec-tsc.mjs",
|
|
45
42
|
"pezkuwi-exec-webpack": "./scripts/pezkuwi-exec-webpack.mjs"
|
|
46
43
|
},
|
|
44
|
+
"main": "./cjs/index.js",
|
|
45
|
+
"module": "./index.js",
|
|
46
|
+
"types": "./index.d.ts",
|
|
47
47
|
"exports": {
|
|
48
|
+
"./cjs/package.json": "./cjs/package.json",
|
|
49
|
+
"./cjs/*": "./cjs/*.js",
|
|
48
50
|
".": {
|
|
49
51
|
"module": {
|
|
50
52
|
"types": "./index.d.ts",
|
|
@@ -59,16 +61,14 @@
|
|
|
59
61
|
"default": "./index.js"
|
|
60
62
|
}
|
|
61
63
|
},
|
|
62
|
-
"./cjs/*": "./cjs/*.js",
|
|
63
|
-
"./cjs/package.json": "./cjs/package.json",
|
|
64
64
|
"./config/eslint": "./config/eslint.js",
|
|
65
65
|
"./config/eslint.rules": "./config/eslint.rules.js",
|
|
66
|
-
"./config/prettier": "./config/prettier.cjs",
|
|
67
66
|
"./config/prettier.cjs": "./config/prettier.cjs",
|
|
67
|
+
"./config/prettier": "./config/prettier.cjs",
|
|
68
68
|
"./config/rollup": "./config/rollup.js",
|
|
69
69
|
"./config/tsconfig.json": "./config/tsconfig.json",
|
|
70
|
-
"./config/typedoc": "./config/typedoc.cjs",
|
|
71
70
|
"./config/typedoc.cjs": "./config/typedoc.cjs",
|
|
71
|
+
"./config/typedoc": "./config/typedoc.cjs",
|
|
72
72
|
"./detectOther": {
|
|
73
73
|
"module": {
|
|
74
74
|
"types": "./detectOther.d.ts",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"require": "./cjs/package.json",
|
|
88
88
|
"default": "./package.json"
|
|
89
89
|
},
|
|
90
|
-
"./packageInfo": {
|
|
90
|
+
"./packageInfo.js": {
|
|
91
91
|
"module": {
|
|
92
92
|
"types": "./packageInfo.d.ts",
|
|
93
93
|
"default": "./packageInfo.js"
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"default": "./packageInfo.js"
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
|
-
"./packageInfo
|
|
104
|
+
"./packageInfo": {
|
|
105
105
|
"module": {
|
|
106
106
|
"types": "./packageInfo.d.ts",
|
|
107
107
|
"default": "./packageInfo.js"
|
|
@@ -171,9 +171,9 @@
|
|
|
171
171
|
"default": "./rootJs/Clazz.js"
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
|
-
"./rootJs/dynamic": "./rootJs/dynamic.mjs",
|
|
175
174
|
"./rootJs/dynamic.d.mts": "./rootJs/dynamic.d.mts",
|
|
176
175
|
"./rootJs/dynamic.mjs": "./rootJs/dynamic.mjs",
|
|
176
|
+
"./rootJs/dynamic": "./rootJs/dynamic.mjs",
|
|
177
177
|
"./rootJs/Jsx": {
|
|
178
178
|
"module": {
|
|
179
179
|
"types": "./rootJs/Jsx.d.ts",
|
|
@@ -218,54 +218,54 @@
|
|
|
218
218
|
"default": "./rootTests.js"
|
|
219
219
|
}
|
|
220
220
|
},
|
|
221
|
-
"./scripts/pezkuwi-ci-ghact-build": "./scripts/pezkuwi-ci-ghact-build.mjs",
|
|
222
221
|
"./scripts/pezkuwi-ci-ghact-build.mjs": "./scripts/pezkuwi-ci-ghact-build.mjs",
|
|
223
|
-
"./scripts/pezkuwi-ci-ghact-
|
|
222
|
+
"./scripts/pezkuwi-ci-ghact-build": "./scripts/pezkuwi-ci-ghact-build.mjs",
|
|
224
223
|
"./scripts/pezkuwi-ci-ghact-docs.mjs": "./scripts/pezkuwi-ci-ghact-docs.mjs",
|
|
225
|
-
"./scripts/pezkuwi-ci-
|
|
224
|
+
"./scripts/pezkuwi-ci-ghact-docs": "./scripts/pezkuwi-ci-ghact-docs.mjs",
|
|
226
225
|
"./scripts/pezkuwi-ci-ghpages-force.mjs": "./scripts/pezkuwi-ci-ghpages-force.mjs",
|
|
227
|
-
"./scripts/pezkuwi-
|
|
226
|
+
"./scripts/pezkuwi-ci-ghpages-force": "./scripts/pezkuwi-ci-ghpages-force.mjs",
|
|
228
227
|
"./scripts/pezkuwi-dev-build-docs.mjs": "./scripts/pezkuwi-dev-build-docs.mjs",
|
|
229
|
-
"./scripts/pezkuwi-dev-build-
|
|
228
|
+
"./scripts/pezkuwi-dev-build-docs": "./scripts/pezkuwi-dev-build-docs.mjs",
|
|
230
229
|
"./scripts/pezkuwi-dev-build-ts.mjs": "./scripts/pezkuwi-dev-build-ts.mjs",
|
|
231
|
-
"./scripts/pezkuwi-dev-
|
|
230
|
+
"./scripts/pezkuwi-dev-build-ts": "./scripts/pezkuwi-dev-build-ts.mjs",
|
|
232
231
|
"./scripts/pezkuwi-dev-circular.mjs": "./scripts/pezkuwi-dev-circular.mjs",
|
|
233
|
-
"./scripts/pezkuwi-dev-
|
|
232
|
+
"./scripts/pezkuwi-dev-circular": "./scripts/pezkuwi-dev-circular.mjs",
|
|
234
233
|
"./scripts/pezkuwi-dev-clean-build.mjs": "./scripts/pezkuwi-dev-clean-build.mjs",
|
|
235
|
-
"./scripts/pezkuwi-dev-
|
|
234
|
+
"./scripts/pezkuwi-dev-clean-build": "./scripts/pezkuwi-dev-clean-build.mjs",
|
|
236
235
|
"./scripts/pezkuwi-dev-contrib.mjs": "./scripts/pezkuwi-dev-contrib.mjs",
|
|
237
|
-
"./scripts/pezkuwi-dev-
|
|
236
|
+
"./scripts/pezkuwi-dev-contrib": "./scripts/pezkuwi-dev-contrib.mjs",
|
|
238
237
|
"./scripts/pezkuwi-dev-copy-dir.mjs": "./scripts/pezkuwi-dev-copy-dir.mjs",
|
|
239
|
-
"./scripts/pezkuwi-dev-copy-
|
|
238
|
+
"./scripts/pezkuwi-dev-copy-dir": "./scripts/pezkuwi-dev-copy-dir.mjs",
|
|
240
239
|
"./scripts/pezkuwi-dev-copy-to.mjs": "./scripts/pezkuwi-dev-copy-to.mjs",
|
|
241
|
-
"./scripts/pezkuwi-dev-
|
|
240
|
+
"./scripts/pezkuwi-dev-copy-to": "./scripts/pezkuwi-dev-copy-to.mjs",
|
|
242
241
|
"./scripts/pezkuwi-dev-deno-map.mjs": "./scripts/pezkuwi-dev-deno-map.mjs",
|
|
243
|
-
"./scripts/pezkuwi-dev-
|
|
242
|
+
"./scripts/pezkuwi-dev-deno-map": "./scripts/pezkuwi-dev-deno-map.mjs",
|
|
244
243
|
"./scripts/pezkuwi-dev-run-lint.mjs": "./scripts/pezkuwi-dev-run-lint.mjs",
|
|
245
|
-
"./scripts/pezkuwi-dev-run-
|
|
244
|
+
"./scripts/pezkuwi-dev-run-lint": "./scripts/pezkuwi-dev-run-lint.mjs",
|
|
246
245
|
"./scripts/pezkuwi-dev-run-node-ts.mjs": "./scripts/pezkuwi-dev-run-node-ts.mjs",
|
|
247
|
-
"./scripts/pezkuwi-dev-run-
|
|
246
|
+
"./scripts/pezkuwi-dev-run-node-ts": "./scripts/pezkuwi-dev-run-node-ts.mjs",
|
|
248
247
|
"./scripts/pezkuwi-dev-run-test.mjs": "./scripts/pezkuwi-dev-run-test.mjs",
|
|
249
|
-
"./scripts/pezkuwi-dev-
|
|
248
|
+
"./scripts/pezkuwi-dev-run-test": "./scripts/pezkuwi-dev-run-test.mjs",
|
|
250
249
|
"./scripts/pezkuwi-dev-version.mjs": "./scripts/pezkuwi-dev-version.mjs",
|
|
251
|
-
"./scripts/pezkuwi-dev-
|
|
250
|
+
"./scripts/pezkuwi-dev-version": "./scripts/pezkuwi-dev-version.mjs",
|
|
252
251
|
"./scripts/pezkuwi-dev-yarn-only.mjs": "./scripts/pezkuwi-dev-yarn-only.mjs",
|
|
253
|
-
"./scripts/pezkuwi-
|
|
252
|
+
"./scripts/pezkuwi-dev-yarn-only": "./scripts/pezkuwi-dev-yarn-only.mjs",
|
|
254
253
|
"./scripts/pezkuwi-exec-eslint.mjs": "./scripts/pezkuwi-exec-eslint.mjs",
|
|
255
|
-
"./scripts/pezkuwi-exec-
|
|
254
|
+
"./scripts/pezkuwi-exec-eslint": "./scripts/pezkuwi-exec-eslint.mjs",
|
|
256
255
|
"./scripts/pezkuwi-exec-ghpages.mjs": "./scripts/pezkuwi-exec-ghpages.mjs",
|
|
257
|
-
"./scripts/pezkuwi-exec-
|
|
256
|
+
"./scripts/pezkuwi-exec-ghpages": "./scripts/pezkuwi-exec-ghpages.mjs",
|
|
258
257
|
"./scripts/pezkuwi-exec-ghrelease.mjs": "./scripts/pezkuwi-exec-ghrelease.mjs",
|
|
259
|
-
"./scripts/pezkuwi-exec-
|
|
258
|
+
"./scripts/pezkuwi-exec-ghrelease": "./scripts/pezkuwi-exec-ghrelease.mjs",
|
|
260
259
|
"./scripts/pezkuwi-exec-node-test.mjs": "./scripts/pezkuwi-exec-node-test.mjs",
|
|
261
|
-
"./scripts/pezkuwi-exec-
|
|
260
|
+
"./scripts/pezkuwi-exec-node-test": "./scripts/pezkuwi-exec-node-test.mjs",
|
|
262
261
|
"./scripts/pezkuwi-exec-rollup.mjs": "./scripts/pezkuwi-exec-rollup.mjs",
|
|
263
|
-
"./scripts/pezkuwi-exec-
|
|
262
|
+
"./scripts/pezkuwi-exec-rollup": "./scripts/pezkuwi-exec-rollup.mjs",
|
|
264
263
|
"./scripts/pezkuwi-exec-tsc.mjs": "./scripts/pezkuwi-exec-tsc.mjs",
|
|
265
|
-
"./scripts/pezkuwi-exec-
|
|
264
|
+
"./scripts/pezkuwi-exec-tsc": "./scripts/pezkuwi-exec-tsc.mjs",
|
|
266
265
|
"./scripts/pezkuwi-exec-webpack.mjs": "./scripts/pezkuwi-exec-webpack.mjs",
|
|
267
|
-
"./scripts/
|
|
266
|
+
"./scripts/pezkuwi-exec-webpack": "./scripts/pezkuwi-exec-webpack.mjs",
|
|
268
267
|
"./scripts/util.mjs": "./scripts/util.mjs",
|
|
268
|
+
"./scripts/util": "./scripts/util.mjs",
|
|
269
269
|
"./types": {
|
|
270
270
|
"module": {
|
|
271
271
|
"types": "./types.d.ts",
|
|
@@ -283,8 +283,8 @@
|
|
|
283
283
|
},
|
|
284
284
|
"dependencies": {
|
|
285
285
|
"@eslint/js": "^8.56.0",
|
|
286
|
-
"@pezkuwi/dev-test": "^0.85.
|
|
287
|
-
"@pezkuwi/dev-ts": "^0.85.
|
|
286
|
+
"@pezkuwi/dev-test": "^0.85.12",
|
|
287
|
+
"@pezkuwi/dev-ts": "^0.85.12",
|
|
288
288
|
"@rollup/plugin-alias": "^5.1.1",
|
|
289
289
|
"@rollup/plugin-commonjs": "^25.0.8",
|
|
290
290
|
"@rollup/plugin-dynamic-import-vars": "^2.1.5",
|
package/packageInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageInfo = { name: '@pezkuwi/dev', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.85.
|
|
1
|
+
export const packageInfo = { name: '@pezkuwi/dev', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.85.12' };
|
package/rootJs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** This should appear as-is in the output with: 1. extension added, 2. augmented.d.ts correct */
|
|
2
2
|
import './augmented.js';
|
|
3
3
|
/** This import should appear as-in in the ouput (cjs without asserts) */
|
|
4
|
-
import testJson from '@pezkuwi/dev/rootJs/testJson.json'
|
|
4
|
+
import testJson from '@pezkuwi/dev/rootJs/testJson.json' with { type: 'json' };
|
|
5
5
|
/** Double double work, i.e. re-exports */
|
|
6
6
|
export { Clazz } from './Clazz.js';
|
|
7
7
|
/** Function to ensure that BigInt does not have the Babel Math.pow() transform */
|
|
@@ -73,7 +73,12 @@ async function compileJs (compileType, type) {
|
|
|
73
73
|
|
|
74
74
|
const source = fs.readFileSync(filename, 'utf-8');
|
|
75
75
|
|
|
76
|
-
// compile with the options aligning with our tsconfig
|
|
76
|
+
// compile with the options aligning with our tsconfig. CJS is emitted
|
|
77
|
+
// under Node's own rules (NodeNext; a lone file is taken as CommonJS):
|
|
78
|
+
// CommonJS with NodeNext resolution kept `import()` of an ES module on
|
|
79
|
+
// TypeScript 5.5 and turned it into require() from 5.6 on, which an ES
|
|
80
|
+
// module cannot answer on Node before 22 (rootEsm.spec "contains
|
|
81
|
+
// import(...) in cjs").
|
|
77
82
|
const { outputText } = ts.transpileModule(source, {
|
|
78
83
|
compilerOptions: {
|
|
79
84
|
esModuleInterop: true,
|
|
@@ -82,11 +87,12 @@ async function compileJs (compileType, type) {
|
|
|
82
87
|
? ts.JsxEmit.ReactJSX
|
|
83
88
|
: undefined,
|
|
84
89
|
module: type === 'cjs'
|
|
85
|
-
? ts.ModuleKind.
|
|
90
|
+
? ts.ModuleKind.NodeNext
|
|
86
91
|
: ts.ModuleKind.ESNext,
|
|
87
92
|
moduleResolution: ts.ModuleResolutionKind.NodeNext,
|
|
88
93
|
target: TARGET_TSES
|
|
89
|
-
}
|
|
94
|
+
},
|
|
95
|
+
fileName: filename
|
|
90
96
|
});
|
|
91
97
|
|
|
92
98
|
mkdirpSync(path.dirname(outFile));
|
|
@@ -448,6 +454,7 @@ function relativePath (value) {
|
|
|
448
454
|
if (!value || typeof value !== 'string') {
|
|
449
455
|
return '';
|
|
450
456
|
}
|
|
457
|
+
|
|
451
458
|
return value.startsWith('.') ? value : `./${value}`;
|
|
452
459
|
}
|
|
453
460
|
|
|
@@ -938,13 +945,33 @@ function getEnginesVer (currVer) {
|
|
|
938
945
|
}
|
|
939
946
|
|
|
940
947
|
/**
|
|
941
|
-
*
|
|
948
|
+
* The repository's web address, taken from the root package.json as declared.
|
|
949
|
+
*
|
|
950
|
+
* This used to split on 'https://github.com/', which threw on any other host and,
|
|
951
|
+
* where it did not throw, rewrote every published package back to GitHub. The
|
|
952
|
+
* declared host is the authority; this only normalises its spelling.
|
|
953
|
+
*
|
|
954
|
+
* @param {string} url
|
|
955
|
+
* @returns {string} e.g. https://git.example.org/owner/repo (no trailing .git)
|
|
956
|
+
*/
|
|
957
|
+
function repoBaseFromUrl (url) {
|
|
958
|
+
if (!url) {
|
|
959
|
+
throw new Error('package.json has no repository.url');
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
const parsed = new URL(url.replace(/^git\+/, ''));
|
|
963
|
+
|
|
964
|
+
return `${parsed.protocol}//${parsed.host}${parsed.pathname.replace(/\.git$/, '').replace(/\/$/, '')}`;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* @param {string} repoBase
|
|
942
969
|
* @param {string | null} dir
|
|
943
970
|
* @param {PkgJson} json
|
|
944
971
|
*/
|
|
945
|
-
function orderPackageJson (
|
|
946
|
-
json.bugs =
|
|
947
|
-
json.homepage =
|
|
972
|
+
function orderPackageJson (repoBase, dir, json) {
|
|
973
|
+
json.bugs = `${repoBase}/issues`;
|
|
974
|
+
json.homepage = `${repoBase}${dir ? `/tree/master/packages/${dir}` : ''}#readme`;
|
|
948
975
|
json.license = !json.license || json.license === 'Apache-2'
|
|
949
976
|
? 'Apache-2.0'
|
|
950
977
|
: json.license;
|
|
@@ -954,7 +981,7 @@ function orderPackageJson (repoPath, dir, json) {
|
|
|
954
981
|
: {}
|
|
955
982
|
),
|
|
956
983
|
type: 'git',
|
|
957
|
-
url:
|
|
984
|
+
url: `${repoBase}.git`
|
|
958
985
|
};
|
|
959
986
|
json.sideEffects = json.sideEffects || false;
|
|
960
987
|
json.engines = {
|
|
@@ -1284,12 +1311,12 @@ function extractPackageInfoImports (filepath, withDetectImport) {
|
|
|
1284
1311
|
|
|
1285
1312
|
/**
|
|
1286
1313
|
* @param {CompileType} compileType
|
|
1287
|
-
* @param {string}
|
|
1314
|
+
* @param {string} repoBase
|
|
1288
1315
|
* @param {string} dir
|
|
1289
1316
|
* @param {[string, string][]} locals
|
|
1290
1317
|
* @returns {Promise<void>}
|
|
1291
1318
|
*/
|
|
1292
|
-
async function buildJs (compileType,
|
|
1319
|
+
async function buildJs (compileType, repoBase, dir, locals) {
|
|
1293
1320
|
const pkgJson = JSON.parse(fs.readFileSync(path.join(process.cwd(), './package.json'), 'utf-8'));
|
|
1294
1321
|
const { name, version } = pkgJson;
|
|
1295
1322
|
|
|
@@ -1301,7 +1328,7 @@ async function buildJs (compileType, repoPath, dir, locals) {
|
|
|
1301
1328
|
|
|
1302
1329
|
console.log(`*** ${name} ${version}`);
|
|
1303
1330
|
|
|
1304
|
-
orderPackageJson(
|
|
1331
|
+
orderPackageJson(repoBase, dir, pkgJson);
|
|
1305
1332
|
|
|
1306
1333
|
// move the tsc-generated *.d.ts build files to build-tsc
|
|
1307
1334
|
if (fs.existsSync('build')) {
|
|
@@ -1471,11 +1498,9 @@ async function main () {
|
|
|
1471
1498
|
}
|
|
1472
1499
|
}
|
|
1473
1500
|
|
|
1474
|
-
const
|
|
1475
|
-
.split('https://github.com/')[1]
|
|
1476
|
-
.split('.git')[0];
|
|
1501
|
+
const repoBase = repoBaseFromUrl(pkg.repository?.url);
|
|
1477
1502
|
|
|
1478
|
-
orderPackageJson(
|
|
1503
|
+
orderPackageJson(repoBase, null, pkg);
|
|
1479
1504
|
execPm('pezkuwi-exec-tsc --build tsconfig.build.json');
|
|
1480
1505
|
|
|
1481
1506
|
process.chdir('packages');
|
|
@@ -1503,7 +1528,7 @@ async function main () {
|
|
|
1503
1528
|
for (const dir of dirs) {
|
|
1504
1529
|
process.chdir(dir);
|
|
1505
1530
|
|
|
1506
|
-
await buildJs(compileType,
|
|
1531
|
+
await buildJs(compileType, repoBase, dir, locals);
|
|
1507
1532
|
|
|
1508
1533
|
process.chdir('..');
|
|
1509
1534
|
}
|
package/.skip-deno
DELETED
|
File without changes
|