@pezkuwi/dev 0.84.3 → 0.85.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/.skip-deno +0 -0
- package/README.md +547 -0
- package/config/eslint.rules.js +2 -2
- package/config/prettier.cjs +1 -1
- package/config/rollup.js +2 -2
- package/config/tsconfig.json +2 -2
- package/config/typedoc.cjs +2 -2
- package/package.json +43 -265
- package/scripts/{polkadot-ci-ghact-build.mjs → pezkuwi-ci-ghact-build.mjs} +15 -11
- package/scripts/{polkadot-ci-ghact-docs.mjs → pezkuwi-ci-ghact-docs.mjs} +2 -2
- package/scripts/{polkadot-ci-ghpages-force.mjs → pezkuwi-ci-ghpages-force.mjs} +1 -1
- package/scripts/{polkadot-dev-build-docs.mjs → pezkuwi-dev-build-docs.mjs} +1 -1
- package/scripts/{polkadot-dev-build-ts.mjs → pezkuwi-dev-build-ts.mjs} +6 -6
- package/scripts/{polkadot-dev-circular.mjs → pezkuwi-dev-circular.mjs} +1 -1
- package/scripts/{polkadot-dev-clean-build.mjs → pezkuwi-dev-clean-build.mjs} +1 -1
- package/scripts/{polkadot-dev-contrib.mjs → pezkuwi-dev-contrib.mjs} +1 -1
- package/scripts/{polkadot-dev-copy-dir.mjs → pezkuwi-dev-copy-dir.mjs} +1 -1
- package/scripts/{polkadot-dev-copy-to.mjs → pezkuwi-dev-copy-to.mjs} +1 -1
- package/scripts/{polkadot-dev-deno-map.mjs → pezkuwi-dev-deno-map.mjs} +1 -1
- package/scripts/{polkadot-dev-run-lint.mjs → pezkuwi-dev-run-lint.mjs} +3 -3
- package/scripts/{polkadot-dev-run-node-ts.mjs → pezkuwi-dev-run-node-ts.mjs} +1 -1
- package/scripts/{polkadot-dev-run-test.mjs → pezkuwi-dev-run-test.mjs} +2 -2
- package/scripts/{polkadot-dev-version.mjs → pezkuwi-dev-version.mjs} +1 -1
- package/scripts/util.mjs +2 -2
- package/tsconfig.build.json +18 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/tsconfig.config.json +14 -0
- package/tsconfig.config.tsbuildinfo +1 -0
- package/tsconfig.scripts.json +14 -0
- package/tsconfig.scripts.tsbuildinfo +1 -0
- package/tsconfig.spec.json +18 -0
- package/tsconfig.spec.tsbuildinfo +1 -0
- package/LICENSE +0 -201
- package/cjs/detectOther.d.ts +0 -2
- package/cjs/detectOther.js +0 -3
- package/cjs/index.d.ts +0 -1
- package/cjs/index.js +0 -3
- package/cjs/package.json +0 -3
- package/cjs/packageInfo.d.ts +0 -6
- package/cjs/packageInfo.js +0 -4
- package/cjs/root.d.ts +0 -2
- package/cjs/root.js +0 -6
- package/cjs/rootJs/Clazz.d.ts +0 -18
- package/cjs/rootJs/Clazz.js +0 -36
- package/cjs/rootJs/Jsx.d.ts +0 -5
- package/cjs/rootJs/Jsx.js +0 -16
- package/cjs/rootJs/JsxChild.d.ts +0 -9
- package/cjs/rootJs/JsxChild.js +0 -9
- package/cjs/rootJs/augmented.d.ts +0 -8
- package/cjs/rootJs/augmented.js +0 -3
- package/cjs/rootJs/index.d.ts +0 -19
- package/cjs/rootJs/index.js +0 -51
- package/cjs/rootTests.d.ts +0 -2
- package/cjs/rootTests.js +0 -44
- package/cjs/sample.d.ts +0 -1
- package/cjs/sample.js +0 -4
- package/cjs/types.d.ts +0 -2
- package/cjs/types.js +0 -2
- package/detectOther.d.ts +0 -2
- package/detectOther.js +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -2
- package/package.json.new +0 -315
- package/packageInfo.d.ts +0 -6
- package/packageInfo.js +0 -1
- package/root.d.ts +0 -2
- package/root.js +0 -2
- package/rootJs/Clazz.d.ts +0 -18
- package/rootJs/Clazz.js +0 -32
- package/rootJs/Jsx.d.ts +0 -5
- package/rootJs/Jsx.js +0 -13
- package/rootJs/JsxChild.d.ts +0 -9
- package/rootJs/JsxChild.js +0 -6
- package/rootJs/augmented.d.ts +0 -8
- package/rootJs/augmented.js +0 -2
- package/rootJs/dynamic.d.mts +0 -8
- package/rootJs/dynamic.mjs +0 -13
- package/rootJs/index.d.ts +0 -19
- package/rootJs/index.js +0 -39
- package/rootJs/testJson.json +0 -5
- package/rootStatic/kusama.svg +0 -1
- package/rootTests.d.ts +0 -2
- package/rootTests.js +0 -41
- package/types.d.ts +0 -2
- package/types.js +0 -1
- /package/scripts/{polkadot-dev-yarn-only.mjs → pezkuwi-dev-yarn-only.mjs} +0 -0
- /package/scripts/{polkadot-exec-eslint.mjs → pezkuwi-exec-eslint.mjs} +0 -0
- /package/scripts/{polkadot-exec-ghpages.mjs → pezkuwi-exec-ghpages.mjs} +0 -0
- /package/scripts/{polkadot-exec-ghrelease.mjs → pezkuwi-exec-ghrelease.mjs} +0 -0
- /package/scripts/{polkadot-exec-node-test.mjs → pezkuwi-exec-node-test.mjs} +0 -0
- /package/scripts/{polkadot-exec-rollup.mjs → pezkuwi-exec-rollup.mjs} +0 -0
- /package/scripts/{polkadot-exec-tsc.mjs → pezkuwi-exec-tsc.mjs} +0 -0
- /package/scripts/{polkadot-exec-webpack.mjs → pezkuwi-exec-webpack.mjs} +0 -0
package/rootJs/Jsx.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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);
|
package/rootJs/JsxChild.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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;
|
package/rootJs/JsxChild.js
DELETED
package/rootJs/augmented.d.ts
DELETED
package/rootJs/augmented.js
DELETED
package/rootJs/dynamic.d.mts
DELETED
package/rootJs/dynamic.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
}
|
package/rootJs/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
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 };
|
package/rootJs/testJson.json
DELETED
package/rootStatic/kusama.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
package/rootTests.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
}
|
package/types.d.ts
DELETED
package/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|