@pezkuwi/dev 0.84.2 → 0.84.3
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/LICENSE +201 -0
- package/cjs/detectOther.d.ts +2 -0
- package/cjs/detectOther.js +3 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +3 -0
- package/cjs/package.json +3 -0
- package/cjs/packageInfo.d.ts +6 -0
- package/cjs/packageInfo.js +4 -0
- package/cjs/root.d.ts +2 -0
- package/cjs/root.js +6 -0
- package/cjs/rootJs/Clazz.d.ts +18 -0
- package/cjs/rootJs/Clazz.js +36 -0
- package/cjs/rootJs/Jsx.d.ts +5 -0
- package/cjs/rootJs/Jsx.js +16 -0
- package/cjs/rootJs/JsxChild.d.ts +9 -0
- package/cjs/rootJs/JsxChild.js +9 -0
- package/cjs/rootJs/augmented.d.ts +8 -0
- package/cjs/rootJs/augmented.js +3 -0
- package/cjs/rootJs/index.d.ts +19 -0
- package/cjs/rootJs/index.js +51 -0
- package/cjs/rootTests.d.ts +2 -0
- package/cjs/rootTests.js +44 -0
- package/cjs/sample.d.ts +1 -0
- package/cjs/sample.js +4 -0
- package/cjs/types.d.ts +2 -0
- package/cjs/types.js +2 -0
- package/config/eslint.js +1 -1
- package/config/eslint.rules.js +6 -6
- package/config/rollup.js +2 -2
- package/detectOther.d.ts +2 -0
- package/detectOther.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +2 -0
- package/package.json +242 -20
- package/package.json.new +315 -0
- package/packageInfo.d.ts +6 -0
- package/packageInfo.js +1 -0
- package/root.d.ts +2 -0
- package/root.js +2 -0
- package/rootJs/Clazz.d.ts +18 -0
- package/rootJs/Clazz.js +32 -0
- package/rootJs/Jsx.d.ts +5 -0
- package/rootJs/Jsx.js +13 -0
- package/rootJs/JsxChild.d.ts +9 -0
- package/rootJs/JsxChild.js +6 -0
- package/rootJs/augmented.d.ts +8 -0
- package/rootJs/augmented.js +2 -0
- package/rootJs/dynamic.d.mts +8 -0
- package/rootJs/dynamic.mjs +13 -0
- package/rootJs/index.d.ts +19 -0
- package/rootJs/index.js +39 -0
- package/rootJs/testJson.json +5 -0
- package/rootStatic/kusama.svg +1 -0
- package/rootTests.d.ts +2 -0
- package/rootTests.js +41 -0
- package/scripts/polkadot-ci-ghact-build.mjs +1 -5
- package/scripts/polkadot-ci-ghact-docs.mjs +1 -1
- package/scripts/polkadot-ci-ghpages-force.mjs +1 -1
- package/scripts/polkadot-dev-build-docs.mjs +1 -1
- package/scripts/polkadot-dev-build-ts.mjs +16 -16
- package/scripts/polkadot-dev-circular.mjs +1 -1
- package/scripts/polkadot-dev-clean-build.mjs +1 -1
- package/scripts/polkadot-dev-contrib.mjs +1 -1
- package/scripts/polkadot-dev-copy-dir.mjs +1 -1
- package/scripts/polkadot-dev-copy-to.mjs +1 -1
- package/scripts/polkadot-dev-deno-map.mjs +2 -2
- package/scripts/polkadot-dev-run-lint.mjs +1 -1
- package/scripts/polkadot-dev-run-node-ts.mjs +1 -1
- package/scripts/polkadot-dev-run-test.mjs +5 -5
- package/scripts/polkadot-dev-version.mjs +1 -1
- package/scripts/polkadot-dev-yarn-only.mjs +1 -1
- package/scripts/polkadot-exec-eslint.mjs +1 -1
- package/scripts/polkadot-exec-ghpages.mjs +1 -1
- package/scripts/polkadot-exec-ghrelease.mjs +1 -1
- package/scripts/polkadot-exec-node-test.mjs +2 -2
- package/scripts/polkadot-exec-rollup.mjs +1 -1
- package/scripts/polkadot-exec-tsc.mjs +1 -1
- package/scripts/polkadot-exec-webpack.mjs +1 -1
- package/scripts/util.mjs +6 -6
- package/types.d.ts +2 -0
- package/types.js +1 -0
- package/.skip-deno +0 -0
- package/README.md +0 -547
- package/tsconfig.build.json +0 -18
- package/tsconfig.config.json +0 -14
- package/tsconfig.scripts.json +0 -14
- package/tsconfig.spec.json +0 -18
package/rootJs/Clazz.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export class Clazz {
|
|
2
|
+
#something = 123_456_789;
|
|
3
|
+
and;
|
|
4
|
+
static staticProperty = 'foobar';
|
|
5
|
+
static staticFunction = () => Clazz.staticProperty;
|
|
6
|
+
/**
|
|
7
|
+
* @param and the number we should and with
|
|
8
|
+
*/
|
|
9
|
+
constructor(and) {
|
|
10
|
+
this.and = and;
|
|
11
|
+
this.#something = this.#something & and;
|
|
12
|
+
}
|
|
13
|
+
get something() {
|
|
14
|
+
return this.#something;
|
|
15
|
+
}
|
|
16
|
+
async doAsync() {
|
|
17
|
+
const res = await new Promise((resolve) => resolve(true));
|
|
18
|
+
console.log(res);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @description Sets something to something
|
|
23
|
+
* @param something The addition
|
|
24
|
+
*/
|
|
25
|
+
setSomething = (something) => {
|
|
26
|
+
this.#something = (something ?? 123_456) & this.and;
|
|
27
|
+
return this.#something;
|
|
28
|
+
};
|
|
29
|
+
toString() {
|
|
30
|
+
return `something=${this.#something}`;
|
|
31
|
+
}
|
|
32
|
+
}
|
package/rootJs/Jsx.d.ts
ADDED
package/rootJs/Jsx.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useCallback, useState } from 'react';
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
|
+
import Child from './JsxChild.js';
|
|
5
|
+
function Hidden({ children, className }) {
|
|
6
|
+
const [isMessageVisible, setMessageVisibility] = useState(false);
|
|
7
|
+
const onShow = useCallback((e) => setMessageVisibility(e.target.checked), []);
|
|
8
|
+
return (_jsxs(StyledDiv, { className: className, children: [_jsx("label", { htmlFor: 'toggle', children: "Show Message" }), _jsx("input", { checked: isMessageVisible, id: 'toggle', onChange: onShow, type: 'checkbox' }), isMessageVisible && (_jsxs(_Fragment, { children: [children, _jsx(Child, { label: 'hello' })] }))] }));
|
|
9
|
+
}
|
|
10
|
+
const StyledDiv = styled.div `
|
|
11
|
+
background: red;
|
|
12
|
+
`;
|
|
13
|
+
export default React.memo(Hidden);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function Child({ children, className, label }: Props): React.ReactElement<Props>;
|
|
8
|
+
declare const _default: React.MemoExoticComponent<typeof Child>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright 2017-2025 @pezkuwi/dev authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Returns the sum of 2 numbers
|
|
6
|
+
*
|
|
7
|
+
* @param {number} a
|
|
8
|
+
* @param {number} b
|
|
9
|
+
* @returns {number}
|
|
10
|
+
*/
|
|
11
|
+
export function sum (a, b) {
|
|
12
|
+
return a + b;
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** This should appear as-is in the output with: 1. extension added, 2. augmented.d.ts correct */
|
|
2
|
+
import './augmented.js';
|
|
3
|
+
/** Double double work, i.e. re-exports */
|
|
4
|
+
export { Clazz } from './Clazz.js';
|
|
5
|
+
/** Function to ensure that BigInt does not have the Babel Math.pow() transform */
|
|
6
|
+
export declare function bigIntExp(): bigint;
|
|
7
|
+
/** Function to ensure that dynamic imports work */
|
|
8
|
+
export declare function dynamic(a: number, b: number): Promise<number>;
|
|
9
|
+
/** Function to ensure we have json correctly imported */
|
|
10
|
+
export declare function json(): string;
|
|
11
|
+
/** Check support for the ?? operator */
|
|
12
|
+
export declare function jsOpExp(a?: number): number;
|
|
13
|
+
/** This is an actual check to ensure PURE is all-happy */
|
|
14
|
+
export declare const pureOpExp: number;
|
|
15
|
+
declare const fooA = 1;
|
|
16
|
+
declare const fooB = 2;
|
|
17
|
+
declare const fooC = 3;
|
|
18
|
+
declare const fooD = 4;
|
|
19
|
+
export { fooA, fooB, fooC, fooD };
|
package/rootJs/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** This should appear as-is in the output with: 1. extension added, 2. augmented.d.ts correct */
|
|
2
|
+
import './augmented.js';
|
|
3
|
+
/** This import should appear as-in in the ouput (cjs without asserts) */
|
|
4
|
+
import testJson from '@pezkuwi/dev/rootJs/testJson.json' assert { type: 'json' };
|
|
5
|
+
/** Double double work, i.e. re-exports */
|
|
6
|
+
export { Clazz } from './Clazz.js';
|
|
7
|
+
/** Function to ensure that BigInt does not have the Babel Math.pow() transform */
|
|
8
|
+
export function bigIntExp() {
|
|
9
|
+
// 123_456n * 137_858_491_849n
|
|
10
|
+
return 123456789n * (13n ** 10n);
|
|
11
|
+
}
|
|
12
|
+
/** Function to ensure that dynamic imports work */
|
|
13
|
+
export async function dynamic(a, b) {
|
|
14
|
+
// NOTE we go via this path so it points to the same location in both ESM
|
|
15
|
+
// and CJS output (a './dynamic' import would be different otherwise)
|
|
16
|
+
const { sum } = await import('@pezkuwi/dev/rootJs/dynamic.mjs');
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
18
|
+
return sum(a, b);
|
|
19
|
+
}
|
|
20
|
+
/** Function to ensure we have json correctly imported */
|
|
21
|
+
export function json() {
|
|
22
|
+
return testJson.test.json;
|
|
23
|
+
}
|
|
24
|
+
/** Check support for the ?? operator */
|
|
25
|
+
export function jsOpExp(a) {
|
|
26
|
+
const defaults = {
|
|
27
|
+
a: 42,
|
|
28
|
+
b: 43,
|
|
29
|
+
c: 44
|
|
30
|
+
};
|
|
31
|
+
return a ?? defaults.a;
|
|
32
|
+
}
|
|
33
|
+
/** This is an actual check to ensure PURE is all-happy */
|
|
34
|
+
export const pureOpExp = /*#__PURE__*/ jsOpExp();
|
|
35
|
+
const fooA = 1;
|
|
36
|
+
const fooB = 2;
|
|
37
|
+
const fooC = 3;
|
|
38
|
+
const fooD = 4;
|
|
39
|
+
export { fooA, fooB, fooC, fooD };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 441 441"><defs><style>.cls-1{stroke:#000;stroke-miterlimit:10;}.cls-2{fill:#fff;}</style></defs><title>kusama-ksm-logo</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><rect class="cls-1" x="0.5" y="0.5" width="440" height="440"/><path class="cls-2" d="M373.6,127.4c-5.2-4.1-11.4-9.7-22.7-11.1-10.6-1.4-21.4,5.7-28.7,10.4s-21.1,18.5-26.8,22.7-20.3,8.1-43.8,22.2-115.7,73.3-115.7,73.3l24,.3-107,55.1H63.6L48.2,312s13.6,3.6,25-3.6v3.3s127.4-50.2,152-37.2l-15,4.4c1.3,0,25.5,1.6,25.5,1.6a34.34,34.34,0,0,0,15.4,24.8c14.6,9.6,14.9,14.9,14.9,14.9s-7.6,3.1-7.6,7c0,0,11.2-3.4,21.6-3.1a82.64,82.64,0,0,1,19.5,3.1s-.8-4.2-10.9-7-20.1-13.8-25-19.8a28,28,0,0,1-4.1-27.4c3.5-9.1,15.7-14.1,40.9-27.1,29.7-15.4,36.5-26.8,40.7-35.7s10.4-26.6,13.9-34.9c4.4-10.7,9.8-16.4,14.3-19.8s24.5-10.9,24.5-10.9S378.5,131.3,373.6,127.4Z"/></g></g></svg>
|
package/rootTests.d.ts
ADDED
package/rootTests.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export function runTests({ Clazz, TEST_PURE, bigIntExp, dynamic, jsOpExp, json }) {
|
|
2
|
+
describe('Clazz', () => {
|
|
3
|
+
it('has staticProperty', () => {
|
|
4
|
+
expect(Clazz.staticProperty).toBe('foobar');
|
|
5
|
+
});
|
|
6
|
+
it('creates an instance with get/set', () => {
|
|
7
|
+
const c = new Clazz(456);
|
|
8
|
+
expect(c.something).toBe(123_456_789 & 456);
|
|
9
|
+
c.setSomething(123);
|
|
10
|
+
expect(c.something).toBe(123 & 456);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
describe('TEST_PURE', () => {
|
|
14
|
+
it('should have the correct value', () => {
|
|
15
|
+
expect(TEST_PURE).toBe('testRoot');
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
describe('dynamic()', () => {
|
|
19
|
+
it('should allow dynamic import usage', async () => {
|
|
20
|
+
expect(await dynamic(5, 37)).toBe(42);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
describe('bigIntExp()', () => {
|
|
24
|
+
it('should return the correct value', () => {
|
|
25
|
+
expect(bigIntExp()).toBe(123456789n * 137858491849n);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
describe('jsOpExp', () => {
|
|
29
|
+
it('handles 0 ?? 42 correctly', () => {
|
|
30
|
+
expect(jsOpExp(0)).toBe(0);
|
|
31
|
+
});
|
|
32
|
+
it('handles undefined ?? 42 correctly', () => {
|
|
33
|
+
expect(jsOpExp()).toBe(42);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
describe('json()', () => {
|
|
37
|
+
it('should return the correct value', () => {
|
|
38
|
+
expect(json()).toBe('works');
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Copyright 2017-2025 @
|
|
2
|
+
// Copyright 2017-2025 @pezkuwi/dev authors & contributors
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
5
|
import fs from 'node:fs';
|
|
@@ -473,10 +473,6 @@ function gitPush () {
|
|
|
473
473
|
|
|
474
474
|
skip-checks: true"`);
|
|
475
475
|
|
|
476
|
-
// Make sure the release commit is on top of the latest master
|
|
477
|
-
execGit(`pull --rebase ${repo} master`);
|
|
478
|
-
|
|
479
|
-
// Now push normally
|
|
480
476
|
execGit(`push ${repo} HEAD:${process.env['GITHUB_REF']}`, true);
|
|
481
477
|
|
|
482
478
|
if (doGHRelease) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Copyright 2017-2025 @
|
|
2
|
+
// Copyright 2017-2025 @pezkuwi/dev authors & contributors
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
5
|
import { execPm, GITHUB_REPO, GITHUB_TOKEN_URL, gitSetup, logBin } from './util.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Copyright 2017-2025 @
|
|
2
|
+
// Copyright 2017-2025 @pezkuwi/dev authors & contributors
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
5
|
import JSON5 from 'json5';
|
|
@@ -143,7 +143,7 @@ function adjustJsPath (_pkgCwd, _pkgJson, dir, f, _isDeclare) {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
-
* Adjust all @
|
|
146
|
+
* Adjust all @pezkuwi imports to have .ts extensions (for Deno)
|
|
147
147
|
*
|
|
148
148
|
* @param {string} pkgCwd
|
|
149
149
|
* @param {PkgJson} pkgJson
|
|
@@ -153,11 +153,11 @@ function adjustJsPath (_pkgCwd, _pkgJson, dir, f, _isDeclare) {
|
|
|
153
153
|
* @returns {string | null}
|
|
154
154
|
*/
|
|
155
155
|
function adjustDenoPath (pkgCwd, pkgJson, dir, f, isDeclare) {
|
|
156
|
-
if (f.startsWith('@
|
|
156
|
+
if (f.startsWith('@pezkuwi')) {
|
|
157
157
|
const parts = f.split('/');
|
|
158
158
|
const thisPkg = parts.slice(0, 2).join('/');
|
|
159
159
|
const subPath = parts.slice(2).join('/');
|
|
160
|
-
const pjsPath = `${DENO_POL_PRE}/${thisPkg.replace('@
|
|
160
|
+
const pjsPath = `${DENO_POL_PRE}/${thisPkg.replace('@pezkuwi/', '')}`;
|
|
161
161
|
|
|
162
162
|
if (subPath.includes("' assert { type:")) {
|
|
163
163
|
// these are for type asserts, we keep the assert
|
|
@@ -671,12 +671,12 @@ function tweakCjsPaths () {
|
|
|
671
671
|
// actually should only care about packageInfo, so add this one explicitly. If we
|
|
672
672
|
// do use path-imports for others, rather adjust them at that specific point
|
|
673
673
|
// .replace(
|
|
674
|
-
// /require\("@
|
|
675
|
-
// 'require("@
|
|
674
|
+
// /require\("@pezkuwi\/([a-z-]*)\/(.*)"\)/g,
|
|
675
|
+
// 'require("@pezkuwi/$1/cjs/$2")'
|
|
676
676
|
// )
|
|
677
677
|
.replace(
|
|
678
|
-
/require\("@
|
|
679
|
-
'require("@
|
|
678
|
+
/require\("@pezkuwi\/([a-z-]*)\/packageInfo"\)/g,
|
|
679
|
+
'require("@pezkuwi/$1/cjs/packageInfo")'
|
|
680
680
|
)
|
|
681
681
|
);
|
|
682
682
|
});
|
|
@@ -1080,7 +1080,7 @@ function lintInput (dir) {
|
|
|
1080
1080
|
// This does have negative effects - proper forks that add their own source
|
|
1081
1081
|
// file will also be caught in the net, i.e. we expect all files to conform
|
|
1082
1082
|
if (n === 0 && (
|
|
1083
|
-
!/\/\/ Copyright .* @
|
|
1083
|
+
!/\/\/ Copyright .* @pezkuwi\//.test(l) &&
|
|
1084
1084
|
!/\/\/ Auto-generated via `/.test(l) &&
|
|
1085
1085
|
!/#!\/usr\/bin\/env node/.test(l)
|
|
1086
1086
|
)) {
|
|
@@ -1282,7 +1282,7 @@ async function buildJs (compileType, repoPath, dir, locals) {
|
|
|
1282
1282
|
const pkgJson = JSON.parse(fs.readFileSync(path.join(process.cwd(), './package.json'), 'utf-8'));
|
|
1283
1283
|
const { name, version } = pkgJson;
|
|
1284
1284
|
|
|
1285
|
-
if (!name.startsWith('@
|
|
1285
|
+
if (!name.startsWith('@pezkuwi/')) {
|
|
1286
1286
|
return;
|
|
1287
1287
|
}
|
|
1288
1288
|
|
|
@@ -1299,16 +1299,16 @@ async function buildJs (compileType, repoPath, dir, locals) {
|
|
|
1299
1299
|
|
|
1300
1300
|
if (!fs.existsSync(path.join(process.cwd(), '.skip-build'))) {
|
|
1301
1301
|
const srcHeader = `// Copyright 2017-${new Date().getFullYear()} ${name} authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n`;
|
|
1302
|
-
const genHeader = `${srcHeader}\n// Do not edit, auto-generated by @
|
|
1302
|
+
const genHeader = `${srcHeader}\n// Do not edit, auto-generated by @pezkuwi/dev\n`;
|
|
1303
1303
|
|
|
1304
1304
|
fs.writeFileSync(path.join(process.cwd(), 'src/packageInfo.ts'), `${genHeader}\nexport const packageInfo = { name: '${name}', path: 'auto', type: 'auto', version: '${version}' };\n`);
|
|
1305
1305
|
|
|
1306
|
-
if (!name.startsWith('@
|
|
1307
|
-
if (!name.startsWith('@
|
|
1306
|
+
if (!name.startsWith('@pezkuwi/x-')) {
|
|
1307
|
+
if (!name.startsWith('@pezkuwi/dev')) {
|
|
1308
1308
|
const detectOld = path.join(process.cwd(), 'src/detectPackage.ts');
|
|
1309
1309
|
const detectOther = path.join(process.cwd(), 'src/detectOther.ts');
|
|
1310
1310
|
const detectThis = path.join(process.cwd(), 'src/packageDetect.ts');
|
|
1311
|
-
const withDetectImport = name !== '@
|
|
1311
|
+
const withDetectImport = name !== '@pezkuwi/util';
|
|
1312
1312
|
|
|
1313
1313
|
/** @type {string[]} */
|
|
1314
1314
|
let otherImports = withDetectImport
|
|
@@ -1331,7 +1331,7 @@ async function buildJs (compileType, repoPath, dir, locals) {
|
|
|
1331
1331
|
}
|
|
1332
1332
|
|
|
1333
1333
|
if (withDetectImport) {
|
|
1334
|
-
// for @
|
|
1334
|
+
// for @pezkuwi/util this file contains the detection logic, keep it
|
|
1335
1335
|
fs.rmSync(detectOld, { force: true });
|
|
1336
1336
|
}
|
|
1337
1337
|
|
|
@@ -1483,7 +1483,7 @@ async function main () {
|
|
|
1483
1483
|
for (const dir of dirs) {
|
|
1484
1484
|
const { name } = JSON.parse(fs.readFileSync(path.join(process.cwd(), dir, './package.json'), 'utf-8'));
|
|
1485
1485
|
|
|
1486
|
-
if (name.startsWith('@
|
|
1486
|
+
if (name.startsWith('@pezkuwi/')) {
|
|
1487
1487
|
locals.push([dir, name]);
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Copyright 2017-2025 @
|
|
2
|
+
// Copyright 2017-2025 @pezkuwi/dev authors & contributors
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
5
|
import fs from 'node:fs';
|
|
@@ -18,7 +18,7 @@ const [e, i] = fs
|
|
|
18
18
|
}, [[], {}]);
|
|
19
19
|
|
|
20
20
|
if (!fs.existsSync('mod.ts')) {
|
|
21
|
-
fs.writeFileSync('mod.ts', `// Copyright 2017-${new Date().getFullYear()} @
|
|
21
|
+
fs.writeFileSync('mod.ts', `// Copyright 2017-${new Date().getFullYear()} @pezkuwi/dev authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// auto-generated via polkadot-dev-deno-map, do not edit\n\n// This is a Deno file, so we can allow .ts imports
|
|
22
22
|
/* eslint-disable import/extensions */\n\n${e.join('\n')}\n`);
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Copyright 2017-2025 @
|
|
2
|
+
// Copyright 2017-2025 @pezkuwi/dev authors & contributors
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
5
|
import process from 'node:process';
|
|
@@ -32,7 +32,7 @@ let isDev = false;
|
|
|
32
32
|
|
|
33
33
|
for (let i = 0; i < args.length; i++) {
|
|
34
34
|
switch (args[i]) {
|
|
35
|
-
// when running inside a dev environment, specifically @
|
|
35
|
+
// when running inside a dev environment, specifically @pezkuwi/dev
|
|
36
36
|
case '--dev-build':
|
|
37
37
|
isDev = true;
|
|
38
38
|
break;
|
|
@@ -148,16 +148,16 @@ if (files.length === 0) {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
try {
|
|
151
|
-
const allFlags = `${importPath('@
|
|
151
|
+
const allFlags = `${importPath('@pezkuwi/dev/scripts/polkadot-exec-node-test.mjs')} ${[...cmd, ...files].join(' ')}`;
|
|
152
152
|
|
|
153
153
|
nodeFlags.push('--require');
|
|
154
154
|
nodeFlags.push(
|
|
155
155
|
isDev
|
|
156
156
|
? `./packages/dev-test/build/cjs/${testEnv}.js`
|
|
157
|
-
: `@
|
|
157
|
+
: `@pezkuwi/dev-test/${testEnv}`
|
|
158
158
|
);
|
|
159
159
|
|
|
160
|
-
execNodeTs(allFlags, nodeFlags, false, isDev ? './packages/dev-ts/build/testCached.js' : '@
|
|
160
|
+
execNodeTs(allFlags, nodeFlags, false, isDev ? './packages/dev-ts/build/testCached.js' : '@pezkuwi/dev-ts/testCached');
|
|
161
161
|
} catch {
|
|
162
162
|
process.exit(1);
|
|
163
163
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Copyright 2017-2025 @
|
|
2
|
+
// Copyright 2017-2025 @pezkuwi/dev authors & contributors
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
5
|
// For Node 18, earliest usable is 18.14:
|
|
@@ -186,7 +186,7 @@ function complete () {
|
|
|
186
186
|
|
|
187
187
|
if (typeof r === 'string') {
|
|
188
188
|
console.log(r); // Node.js <= 18.14
|
|
189
|
-
} else if (r.file && r.file.includes('@
|
|
189
|
+
} else if (r.file && r.file.includes('@pezkuwi/dev/scripts')) {
|
|
190
190
|
// Ignore internal diagnostics
|
|
191
191
|
} else {
|
|
192
192
|
if (lastFilename !== r.file) {
|
package/scripts/util.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2017-2025 @
|
|
1
|
+
// Copyright 2017-2025 @pezkuwi/dev authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import cp from 'node:child_process';
|
|
@@ -100,7 +100,7 @@ export function copyDirSync (src, dest, include, exclude) {
|
|
|
100
100
|
export function denoCreateDir (name) {
|
|
101
101
|
// aligns with name above - since we have sub-paths, we only return
|
|
102
102
|
// the actual path inside packages/* (i.e. the last part of the name)
|
|
103
|
-
return name.replace('@
|
|
103
|
+
return name.replace('@pezkuwi/', '');
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
/**
|
|
@@ -172,7 +172,7 @@ export function execSync (cmd, noLog) {
|
|
|
172
172
|
* @param {boolean} [noLog]
|
|
173
173
|
* @param {string} [loaderPath]
|
|
174
174
|
**/
|
|
175
|
-
export function execNodeTs (cmd, nodeFlags = [], noLog, loaderPath = '@
|
|
175
|
+
export function execNodeTs (cmd, nodeFlags = [], noLog, loaderPath = '@pezkuwi/dev-ts/cached') {
|
|
176
176
|
const loadersGlo = [];
|
|
177
177
|
const loadersLoc = [];
|
|
178
178
|
const otherFlags = [];
|
|
@@ -399,7 +399,7 @@ export function exitFatalEngine () {
|
|
|
399
399
|
|
|
400
400
|
console.error(`
|
|
401
401
|
Technical explanation: For a development environment all projects in
|
|
402
|
-
the @
|
|
402
|
+
the @pezkuwi famility uses node:test in their operation. Currently the
|
|
403
403
|
minimum required version of Node is thus set at the first first version
|
|
404
404
|
with operational support, hence this limitation. Additionally only LTS
|
|
405
405
|
Node versions are supported.
|
|
@@ -421,7 +421,7 @@ export function exitFatalYarn () {
|
|
|
421
421
|
`${BLANK}\n FATAL: The use of yarn is required, install via npm is not supported.\n${BLANK}`
|
|
422
422
|
);
|
|
423
423
|
console.error(`
|
|
424
|
-
Technical explanation: All the projects in the @
|
|
424
|
+
Technical explanation: All the projects in the @pezkuwi' family use
|
|
425
425
|
yarn specific configs and assume yarn for build operations and locks.
|
|
426
426
|
|
|
427
427
|
If yarn is not available, you can get it from https://yarnpkg.com/
|
|
@@ -504,7 +504,7 @@ export function topoSort (dirs) {
|
|
|
504
504
|
const deps = JSON.parse(json).dependencies;
|
|
505
505
|
|
|
506
506
|
return dirs
|
|
507
|
-
.filter((d) => d !== dir && deps && Object.keys(deps).includes(`@
|
|
507
|
+
.filter((d) => d !== dir && deps && Object.keys(deps).includes(`@pezkuwi/${d}`))
|
|
508
508
|
.map((d) => [dir, d]);
|
|
509
509
|
}).flat();
|
|
510
510
|
|
package/types.d.ts
ADDED
package/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/.skip-deno
DELETED
|
File without changes
|