@pezkuwi/dev 0.84.2
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.js +160 -0
- package/config/eslint.rules.js +214 -0
- package/config/prettier.cjs +22 -0
- package/config/rollup.js +113 -0
- package/config/tsconfig.json +32 -0
- package/config/typedoc.cjs +18 -0
- package/package.json +107 -0
- package/scripts/polkadot-ci-ghact-build.mjs +540 -0
- package/scripts/polkadot-ci-ghact-docs.mjs +14 -0
- package/scripts/polkadot-ci-ghpages-force.mjs +43 -0
- package/scripts/polkadot-dev-build-docs.mjs +19 -0
- package/scripts/polkadot-dev-build-ts.mjs +1518 -0
- package/scripts/polkadot-dev-circular.mjs +29 -0
- package/scripts/polkadot-dev-clean-build.mjs +61 -0
- package/scripts/polkadot-dev-contrib.mjs +74 -0
- package/scripts/polkadot-dev-copy-dir.mjs +44 -0
- package/scripts/polkadot-dev-copy-to.mjs +53 -0
- package/scripts/polkadot-dev-deno-map.mjs +35 -0
- package/scripts/polkadot-dev-run-lint.mjs +40 -0
- package/scripts/polkadot-dev-run-node-ts.mjs +9 -0
- package/scripts/polkadot-dev-run-test.mjs +163 -0
- package/scripts/polkadot-dev-version.mjs +143 -0
- package/scripts/polkadot-dev-yarn-only.mjs +11 -0
- package/scripts/polkadot-exec-eslint.mjs +7 -0
- package/scripts/polkadot-exec-ghpages.mjs +11 -0
- package/scripts/polkadot-exec-ghrelease.mjs +7 -0
- package/scripts/polkadot-exec-node-test.mjs +368 -0
- package/scripts/polkadot-exec-rollup.mjs +7 -0
- package/scripts/polkadot-exec-tsc.mjs +7 -0
- package/scripts/polkadot-exec-webpack.mjs +7 -0
- package/scripts/util.mjs +540 -0
- package/tsconfig.build.json +18 -0
- package/tsconfig.config.json +14 -0
- package/tsconfig.scripts.json +14 -0
- package/tsconfig.spec.json +18 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
// Copyright 2017-2025 @polkadot/dev authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import JSON5 from 'json5';
|
|
5
|
+
import fs from 'node:fs';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import process from 'node:process';
|
|
8
|
+
|
|
9
|
+
const FIXME = {
|
|
10
|
+
// This is in the new 6.0.0 and we should switch this on
|
|
11
|
+
// at some point. For a first iteration we keep as-is
|
|
12
|
+
'@typescript-eslint/prefer-nullish-coalescing': 'off'
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Returns a copyright header pattern (using tsconfig.base.json)
|
|
17
|
+
*
|
|
18
|
+
* @returns {string}
|
|
19
|
+
*/
|
|
20
|
+
function getHeaderPattern () {
|
|
21
|
+
const tsPath = path.join(process.cwd(), 'tsconfig.base.json');
|
|
22
|
+
|
|
23
|
+
if (!fs.existsSync(tsPath)) {
|
|
24
|
+
throw new Error(`Unable to load ${tsPath}`);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const tsConfig = JSON5.parse(fs.readFileSync(tsPath, 'utf-8'));
|
|
28
|
+
|
|
29
|
+
if (!tsConfig?.compilerOptions?.paths) {
|
|
30
|
+
throw new Error(`Unable to extract compilerOptions.paths structure from ${tsPath}`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const paths = Object.keys(tsConfig.compilerOptions.paths);
|
|
34
|
+
|
|
35
|
+
if (!paths.length) {
|
|
36
|
+
throw new Error(`No keys found in compilerOptions.paths from ${tsPath}`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const packages = paths.reduce((packages, k) => {
|
|
40
|
+
const [pd, pk] = k.split('/');
|
|
41
|
+
|
|
42
|
+
if (pd !== '@polkadot' || !pk) {
|
|
43
|
+
throw new Error(`Non @polkadot path in ${tsPath}`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return packages.length
|
|
47
|
+
? `${packages}|${pk}`
|
|
48
|
+
: pk;
|
|
49
|
+
}, '');
|
|
50
|
+
const fullyear = new Date().getFullYear();
|
|
51
|
+
const years = [];
|
|
52
|
+
|
|
53
|
+
for (let i = 17, last = fullyear - 2000; i < last; i++) {
|
|
54
|
+
years.push(`${i}`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return ` Copyright 20(${years.join('|')})(-${fullyear})? @polkadot/(${packages})`;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const overrideAll = {
|
|
61
|
+
...FIXME,
|
|
62
|
+
// the next 2 enforce isolatedModules & verbatimModuleSyntax
|
|
63
|
+
'@typescript-eslint/consistent-type-exports': 'error',
|
|
64
|
+
'@typescript-eslint/consistent-type-imports': 'error',
|
|
65
|
+
'@typescript-eslint/dot-notation': 'error',
|
|
66
|
+
'@typescript-eslint/indent': ['error', 2],
|
|
67
|
+
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
68
|
+
// ts itself checks and ignores those starting with _, align the linting
|
|
69
|
+
'@typescript-eslint/no-unused-vars': ['error', {
|
|
70
|
+
args: 'all',
|
|
71
|
+
argsIgnorePattern: '^_',
|
|
72
|
+
caughtErrors: 'all',
|
|
73
|
+
caughtErrorsIgnorePattern: '^_',
|
|
74
|
+
destructuredArrayIgnorePattern: '^_',
|
|
75
|
+
vars: 'all',
|
|
76
|
+
varsIgnorePattern: '^_'
|
|
77
|
+
}],
|
|
78
|
+
'@typescript-eslint/type-annotation-spacing': 'error',
|
|
79
|
+
'arrow-parens': ['error', 'always'],
|
|
80
|
+
'brace-style': ['error', '1tbs'],
|
|
81
|
+
curly: ['error', 'all'],
|
|
82
|
+
'default-param-last': 'off', // conflicts with TS version
|
|
83
|
+
'deprecation/deprecation': 'error',
|
|
84
|
+
'dot-notation': 'off', // conflicts with TS version
|
|
85
|
+
'func-style': ['error', 'declaration', {
|
|
86
|
+
allowArrowFunctions: true
|
|
87
|
+
}],
|
|
88
|
+
// this does help with declarations, but also
|
|
89
|
+
// applies to invocations, which is an issue...
|
|
90
|
+
// 'function-paren-newline': ['error', 'never'],
|
|
91
|
+
'function-call-argument-newline': ['error', 'consistent'],
|
|
92
|
+
'header/header': ['error', 'line', [
|
|
93
|
+
{ pattern: getHeaderPattern() },
|
|
94
|
+
' SPDX-License-Identifier: Apache-2.0'
|
|
95
|
+
], 2],
|
|
96
|
+
'import-newlines/enforce': ['error', {
|
|
97
|
+
forceSingleLine: true,
|
|
98
|
+
items: 2048
|
|
99
|
+
}],
|
|
100
|
+
'import/export': 'error',
|
|
101
|
+
'import/extensions': ['error', 'ignorePackages', {
|
|
102
|
+
cjs: 'always',
|
|
103
|
+
js: 'always',
|
|
104
|
+
json: 'always',
|
|
105
|
+
jsx: 'never',
|
|
106
|
+
mjs: 'always',
|
|
107
|
+
ts: 'never',
|
|
108
|
+
tsx: 'never'
|
|
109
|
+
}],
|
|
110
|
+
'import/first': 'error',
|
|
111
|
+
'import/newline-after-import': 'error',
|
|
112
|
+
'import/no-duplicates': 'error',
|
|
113
|
+
'import/order': 'off', // conflicts with simple-import-sort
|
|
114
|
+
indent: 'off', // required as 'off' since typescript-eslint has own versions
|
|
115
|
+
'no-extra-semi': 'error',
|
|
116
|
+
'no-unused-vars': 'off',
|
|
117
|
+
'no-use-before-define': 'off',
|
|
118
|
+
'object-curly-newline': ['error', {
|
|
119
|
+
ExportDeclaration: { minProperties: 2048 },
|
|
120
|
+
ImportDeclaration: { minProperties: 2048 },
|
|
121
|
+
ObjectPattern: { minProperties: 2048 }
|
|
122
|
+
}],
|
|
123
|
+
'padding-line-between-statements': [
|
|
124
|
+
'error',
|
|
125
|
+
{ blankLine: 'always', next: '*', prev: ['const', 'let', 'var'] },
|
|
126
|
+
{ blankLine: 'any', next: ['const', 'let', 'var'], prev: ['const', 'let', 'var'] },
|
|
127
|
+
{ blankLine: 'always', next: 'block-like', prev: '*' },
|
|
128
|
+
{ blankLine: 'always', next: '*', prev: 'block-like' },
|
|
129
|
+
{ blankLine: 'always', next: 'function', prev: '*' },
|
|
130
|
+
{ blankLine: 'always', next: '*', prev: 'function' },
|
|
131
|
+
{ blankLine: 'always', next: 'try', prev: '*' },
|
|
132
|
+
{ blankLine: 'always', next: '*', prev: 'try' },
|
|
133
|
+
{ blankLine: 'always', next: 'return', prev: '*' },
|
|
134
|
+
{ blankLine: 'always', next: 'import', prev: '*' },
|
|
135
|
+
{ blankLine: 'always', next: '*', prev: 'import' },
|
|
136
|
+
{ blankLine: 'any', next: 'import', prev: 'import' }
|
|
137
|
+
],
|
|
138
|
+
semi: ['error', 'always'],
|
|
139
|
+
'simple-import-sort/exports': 'error',
|
|
140
|
+
'simple-import-sort/imports': ['error', {
|
|
141
|
+
groups: [
|
|
142
|
+
['^\u0000'], // all side-effects (0 at start)
|
|
143
|
+
['\u0000$', '^@polkadot.*\u0000$', '^\\..*\u0000$'], // types (0 at end)
|
|
144
|
+
// ['^node:'], // node
|
|
145
|
+
['^[^/\\.]'], // non-polkadot
|
|
146
|
+
['^@polkadot'], // polkadot
|
|
147
|
+
['^\\.\\.(?!/?$)', '^\\.\\./?$', '^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'] // local (. last)
|
|
148
|
+
]
|
|
149
|
+
}],
|
|
150
|
+
'sort-destructure-keys/sort-destructure-keys': ['error', {
|
|
151
|
+
caseSensitive: true
|
|
152
|
+
}],
|
|
153
|
+
'sort-keys': 'error',
|
|
154
|
+
'spaced-comment': ['error', 'always', {
|
|
155
|
+
block: {
|
|
156
|
+
// pure export helpers
|
|
157
|
+
markers: ['#__PURE__']
|
|
158
|
+
},
|
|
159
|
+
line: {
|
|
160
|
+
// TS reference types
|
|
161
|
+
markers: ['/ <reference']
|
|
162
|
+
}
|
|
163
|
+
}]
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export const overrideJsx = {
|
|
167
|
+
'jsx-quotes': ['error', 'prefer-single'],
|
|
168
|
+
// swap from recommended warning to error
|
|
169
|
+
'react-hooks/exhaustive-deps': 'error',
|
|
170
|
+
'react/jsx-closing-bracket-location': ['warn', 'tag-aligned'],
|
|
171
|
+
'react/jsx-first-prop-new-line': ['warn', 'multiline-multiprop'],
|
|
172
|
+
'react/jsx-fragments': 'error',
|
|
173
|
+
'react/jsx-max-props-per-line': ['warn', {
|
|
174
|
+
maximum: 1,
|
|
175
|
+
when: 'always'
|
|
176
|
+
}],
|
|
177
|
+
'react/jsx-newline': ['error', {
|
|
178
|
+
prevent: true
|
|
179
|
+
}],
|
|
180
|
+
'react/jsx-no-bind': 'error',
|
|
181
|
+
'react/jsx-props-no-multi-spaces': 'error',
|
|
182
|
+
'react/jsx-sort-props': ['warn', {
|
|
183
|
+
noSortAlphabetically: false
|
|
184
|
+
}],
|
|
185
|
+
'react/jsx-tag-spacing': ['error', {
|
|
186
|
+
afterOpening: 'never',
|
|
187
|
+
beforeClosing: 'never',
|
|
188
|
+
beforeSelfClosing: 'always',
|
|
189
|
+
closingSlash: 'never'
|
|
190
|
+
}],
|
|
191
|
+
'react/prop-types': 'off' // this is a completely broken rule
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
export const overrideJs = {
|
|
195
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
196
|
+
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
197
|
+
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
198
|
+
'@typescript-eslint/no-unsafe-call': 'off',
|
|
199
|
+
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
200
|
+
'@typescript-eslint/no-unsafe-return': 'off',
|
|
201
|
+
'@typescript-eslint/no-var-requires': 'off',
|
|
202
|
+
'@typescript-eslint/restrict-plus-operands': 'off',
|
|
203
|
+
'@typescript-eslint/restrict-template-expressions': 'off'
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
export const overrideSpec = {
|
|
207
|
+
// in the specs we are a little less worried about
|
|
208
|
+
// specific correctness, i.e. we can have dangling bits
|
|
209
|
+
'@typescript-eslint/no-unsafe-call': 'off',
|
|
210
|
+
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
211
|
+
'jest/expect-expect': ['warn', {
|
|
212
|
+
assertFunctionNames: ['assert', 'expect']
|
|
213
|
+
}]
|
|
214
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright 2017-2025 @polkadot/dev authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
arrowParens: 'always',
|
|
6
|
+
bracketSpacing: true,
|
|
7
|
+
embeddedLanguageFormatting: 'off',
|
|
8
|
+
endOfLine: 'lf',
|
|
9
|
+
htmlWhitespaceSensitivity: 'ignore',
|
|
10
|
+
jsxBracketSameLine: false,
|
|
11
|
+
jsxSingleQuote: true,
|
|
12
|
+
parser: 'typescript',
|
|
13
|
+
printWidth: 2048,
|
|
14
|
+
proseWrap: 'preserve',
|
|
15
|
+
quoteProps: 'as-needed',
|
|
16
|
+
requirePragma: true, // only on those files explicitly asked for
|
|
17
|
+
semi: true,
|
|
18
|
+
singleQuote: true,
|
|
19
|
+
tabWidth: 2,
|
|
20
|
+
trailingComma: 'none',
|
|
21
|
+
useTabs: false
|
|
22
|
+
};
|
package/config/rollup.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// Copyright 2017-2025 @polkadot/dev authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import pluginAlias from '@rollup/plugin-alias';
|
|
5
|
+
import pluginCommonjs from '@rollup/plugin-commonjs';
|
|
6
|
+
import pluginDynamicImportVars from '@rollup/plugin-dynamic-import-vars';
|
|
7
|
+
import pluginInject from '@rollup/plugin-inject';
|
|
8
|
+
import pluginJson from '@rollup/plugin-json';
|
|
9
|
+
import { nodeResolve as pluginResolve } from '@rollup/plugin-node-resolve';
|
|
10
|
+
import fs from 'node:fs';
|
|
11
|
+
import path from 'node:path';
|
|
12
|
+
import pluginCleanup from 'rollup-plugin-cleanup';
|
|
13
|
+
|
|
14
|
+
/** @typedef {{ entries?: Record<string, string>; external: string[]; globals?: Record<string, string>; index?: string; inject?: Record<string, string>; pkg: string; }} BundleDef */
|
|
15
|
+
/** @typedef {{ file: string; format: 'umd'; generatedCode: Record<string, unknown>; globals: Record<string, string>; inlineDynamicImports: true; intro: string; name: string; }} BundleOutput */
|
|
16
|
+
/** @typedef {{ context: 'global'; external: string[]; input: string; output: BundleOutput; plugins: any[]; }} Bundle */
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @param {string} pkg
|
|
20
|
+
* @returns {string}
|
|
21
|
+
*/
|
|
22
|
+
function sanitizePkg (pkg) {
|
|
23
|
+
return pkg.replace('@polkadot/', '');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @param {string} input
|
|
28
|
+
* @returns {string}
|
|
29
|
+
*/
|
|
30
|
+
function createName (input) {
|
|
31
|
+
return `polkadot-${sanitizePkg(input)}`
|
|
32
|
+
.toLowerCase()
|
|
33
|
+
.replace(/[^a-zA-Z0-9]+(.)/g, (_, c) => c.toUpperCase());
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @param {string} pkg
|
|
38
|
+
* @param {string} [index]
|
|
39
|
+
* @returns {string}
|
|
40
|
+
*/
|
|
41
|
+
export function createInput (pkg, index) {
|
|
42
|
+
const partialPath = `packages/${sanitizePkg(pkg)}/build`;
|
|
43
|
+
|
|
44
|
+
return `${partialPath}/${
|
|
45
|
+
index ||
|
|
46
|
+
fs.existsSync(path.join(process.cwd(), partialPath, 'bundle.js'))
|
|
47
|
+
? 'bundle.js'
|
|
48
|
+
: (
|
|
49
|
+
JSON.parse(fs.readFileSync(path.join(process.cwd(), partialPath, 'package.json'), 'utf8')).browser ||
|
|
50
|
+
'index.js'
|
|
51
|
+
)
|
|
52
|
+
}`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @param {string} pkg
|
|
58
|
+
* @param {string[]} external
|
|
59
|
+
* @param {Record<string, string>} globals
|
|
60
|
+
* @returns {BundleOutput}
|
|
61
|
+
*/
|
|
62
|
+
export function createOutput (pkg, external, globals) {
|
|
63
|
+
const name = sanitizePkg(pkg);
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
file: `packages/${name}/build/bundle-polkadot-${name}.js`,
|
|
67
|
+
format: 'umd',
|
|
68
|
+
generatedCode: {
|
|
69
|
+
constBindings: true
|
|
70
|
+
},
|
|
71
|
+
globals: external.reduce((all, p) => ({
|
|
72
|
+
[p]: createName(p),
|
|
73
|
+
...all
|
|
74
|
+
}), { ...globals }),
|
|
75
|
+
// combine multi-chunk builds with dynamic imports
|
|
76
|
+
inlineDynamicImports: true,
|
|
77
|
+
// this is a mini x-global, determine where our context lies
|
|
78
|
+
intro: 'const global = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : window;',
|
|
79
|
+
name: createName(pkg)
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @param {BundleDef} param0
|
|
86
|
+
* @returns {Bundle}
|
|
87
|
+
*/
|
|
88
|
+
export function createBundle ({ entries = {}, external, globals = {}, index, inject = {}, pkg }) {
|
|
89
|
+
return {
|
|
90
|
+
// specify this (we define global in the output intro as globalThis || self || window)
|
|
91
|
+
context: 'global',
|
|
92
|
+
external,
|
|
93
|
+
input: createInput(pkg, index),
|
|
94
|
+
output: createOutput(pkg, external, globals),
|
|
95
|
+
// NOTE The expect-error directives are due to rollup plugins, see
|
|
96
|
+
// - https://github.com/rollup/plugins/issues/1488
|
|
97
|
+
// - https://github.com/rollup/plugins/issues/1329
|
|
98
|
+
plugins: [
|
|
99
|
+
// @ts-expect-error See the linked rollup issues above
|
|
100
|
+
pluginAlias({ entries }),
|
|
101
|
+
// @ts-expect-error See the linked rollup issues above
|
|
102
|
+
pluginJson(),
|
|
103
|
+
// @ts-expect-error See the linked rollup issues above
|
|
104
|
+
pluginCommonjs(),
|
|
105
|
+
// @ts-expect-error See the linked rollup issues above
|
|
106
|
+
pluginDynamicImportVars(),
|
|
107
|
+
// @ts-expect-error See the linked rollup issues above
|
|
108
|
+
pluginInject(inject),
|
|
109
|
+
pluginResolve({ browser: true }),
|
|
110
|
+
pluginCleanup()
|
|
111
|
+
]
|
|
112
|
+
};
|
|
113
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
/**
|
|
3
|
+
* There uses the strictest configs as the base
|
|
4
|
+
* https://github.com/tsconfig/bases/blob/f674fa6cbca17062ff02511b02872f8729a597ec/bases/strictest.json
|
|
5
|
+
*/
|
|
6
|
+
"extends": "@tsconfig/strictest/tsconfig.json",
|
|
7
|
+
"compilerOptions": {
|
|
8
|
+
/**
|
|
9
|
+
* Aligns with packages/dev/scripts/polkadot-dev-build-ts & packages/dev-ts/src/loader
|
|
10
|
+
* (target here is specifically tied to the minimum supported Node version)
|
|
11
|
+
*/
|
|
12
|
+
"module": "nodenext",
|
|
13
|
+
"moduleResolution": "nodenext",
|
|
14
|
+
"target": "es2022",
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Specific compilation configs for polkadot-js projects as it is used
|
|
18
|
+
* (we only compile *.d.ts via the tsc command-line)
|
|
19
|
+
*/
|
|
20
|
+
"declaration": true,
|
|
21
|
+
"emitDeclarationOnly": true,
|
|
22
|
+
"jsx": "preserve",
|
|
23
|
+
"verbatimModuleSyntax": true,
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* These appear in strictest, however we don't (yet) use them. For the most part it means
|
|
27
|
+
* that we actually do have a large number of these lurking (especially on index checks)
|
|
28
|
+
*/
|
|
29
|
+
"exactOptionalPropertyTypes": false,
|
|
30
|
+
"noUncheckedIndexedAccess": false,
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright 2017-2025 @polkadot/dev authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
exclude: '**/*+(index|e2e|spec|types).ts',
|
|
6
|
+
excludeExternals: true,
|
|
7
|
+
excludeNotExported: true,
|
|
8
|
+
excludePrivate: true,
|
|
9
|
+
excludeProtected: true,
|
|
10
|
+
hideGenerator: true,
|
|
11
|
+
includeDeclarations: false,
|
|
12
|
+
module: 'commonjs',
|
|
13
|
+
moduleResolution: 'node',
|
|
14
|
+
name: 'polkadot{.js}',
|
|
15
|
+
out: 'docs',
|
|
16
|
+
stripInternal: 'true',
|
|
17
|
+
theme: 'markdown'
|
|
18
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": "Jaco Greeff <jacogr@gmail.com>",
|
|
3
|
+
"bugs": "https://github.com/pezkuwi/dev/issues",
|
|
4
|
+
"description": "A collection of shared CI scripts and development environment used by @pezkuwi projects",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=18"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/pezkuwi/dev/tree/master/packages/dev#readme",
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"name": "@pezkuwi/dev",
|
|
11
|
+
"repository": {
|
|
12
|
+
"directory": "packages/dev",
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/pezkuwi/dev.git"
|
|
15
|
+
},
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"type": "module",
|
|
18
|
+
"version": "0.84.2",
|
|
19
|
+
"bin": {
|
|
20
|
+
"polkadot-ci-ghact-build": "./scripts/polkadot-ci-ghact-build.mjs",
|
|
21
|
+
"polkadot-ci-ghact-docs": "./scripts/polkadot-ci-ghact-docs.mjs",
|
|
22
|
+
"polkadot-ci-ghpages-force": "./scripts/polkadot-ci-ghpages-force.mjs",
|
|
23
|
+
"polkadot-dev-build-docs": "./scripts/polkadot-dev-build-docs.mjs",
|
|
24
|
+
"polkadot-dev-build-ts": "./scripts/polkadot-dev-build-ts.mjs",
|
|
25
|
+
"polkadot-dev-circular": "./scripts/polkadot-dev-circular.mjs",
|
|
26
|
+
"polkadot-dev-clean-build": "./scripts/polkadot-dev-clean-build.mjs",
|
|
27
|
+
"polkadot-dev-contrib": "./scripts/polkadot-dev-contrib.mjs",
|
|
28
|
+
"polkadot-dev-copy-dir": "./scripts/polkadot-dev-copy-dir.mjs",
|
|
29
|
+
"polkadot-dev-copy-to": "./scripts/polkadot-dev-copy-to.mjs",
|
|
30
|
+
"polkadot-dev-deno-map": "./scripts/polkadot-dev-deno-map.mjs",
|
|
31
|
+
"polkadot-dev-run-lint": "./scripts/polkadot-dev-run-lint.mjs",
|
|
32
|
+
"polkadot-dev-run-node-ts": "./scripts/polkadot-dev-run-node-ts.mjs",
|
|
33
|
+
"polkadot-dev-run-test": "./scripts/polkadot-dev-run-test.mjs",
|
|
34
|
+
"polkadot-dev-version": "./scripts/polkadot-dev-version.mjs",
|
|
35
|
+
"polkadot-dev-yarn-only": "./scripts/polkadot-dev-yarn-only.mjs",
|
|
36
|
+
"polkadot-exec-eslint": "./scripts/polkadot-exec-eslint.mjs",
|
|
37
|
+
"polkadot-exec-ghpages": "./scripts/polkadot-exec-ghpages.mjs",
|
|
38
|
+
"polkadot-exec-ghrelease": "./scripts/polkadot-exec-ghrelease.mjs",
|
|
39
|
+
"polkadot-exec-node-test": "./scripts/polkadot-exec-node-test.mjs",
|
|
40
|
+
"polkadot-exec-rollup": "./scripts/polkadot-exec-rollup.mjs",
|
|
41
|
+
"polkadot-exec-tsc": "./scripts/polkadot-exec-tsc.mjs",
|
|
42
|
+
"polkadot-exec-webpack": "./scripts/polkadot-exec-webpack.mjs"
|
|
43
|
+
},
|
|
44
|
+
"exports": {
|
|
45
|
+
"./config/eslint": "./config/eslint.js",
|
|
46
|
+
"./config/prettier.cjs": "./config/prettier.cjs",
|
|
47
|
+
"./config/tsconfig.json": "./config/tsconfig.json",
|
|
48
|
+
"./rootJs/dynamic.mjs": "./src/rootJs/dynamic.mjs",
|
|
49
|
+
"./rootJs/testJson.json": "./src/rootJs/testJson.json"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@eslint/js": "^8.56.0",
|
|
53
|
+
"@pezkuwi/dev-test": "^0.84.2",
|
|
54
|
+
"@pezkuwi/dev-ts": "^0.84.2",
|
|
55
|
+
"@rollup/plugin-alias": "^5.1.1",
|
|
56
|
+
"@rollup/plugin-commonjs": "^25.0.8",
|
|
57
|
+
"@rollup/plugin-dynamic-import-vars": "^2.1.5",
|
|
58
|
+
"@rollup/plugin-inject": "^5.0.5",
|
|
59
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
60
|
+
"@rollup/plugin-node-resolve": "^15.3.1",
|
|
61
|
+
"@tsconfig/strictest": "^2.0.2",
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^6.19.1",
|
|
63
|
+
"@typescript-eslint/parser": "^6.19.1",
|
|
64
|
+
"eslint": "^8.56.0",
|
|
65
|
+
"eslint-config-standard": "^17.1.0",
|
|
66
|
+
"eslint-import-resolver-node": "^0.3.9",
|
|
67
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
68
|
+
"eslint-plugin-deprecation": "^2.0.0",
|
|
69
|
+
"eslint-plugin-header": "^3.1.1",
|
|
70
|
+
"eslint-plugin-import": "^2.29.1",
|
|
71
|
+
"eslint-plugin-import-newlines": "^1.3.4",
|
|
72
|
+
"eslint-plugin-jest": "^27.6.3",
|
|
73
|
+
"eslint-plugin-n": "^16.6.2",
|
|
74
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
75
|
+
"eslint-plugin-react": "^7.33.2",
|
|
76
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
77
|
+
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
78
|
+
"eslint-plugin-sort-destructure-keys": "^1.5.0",
|
|
79
|
+
"espree": "^9.6.1",
|
|
80
|
+
"gh-pages": "^6.1.1",
|
|
81
|
+
"gh-release": "^7.0.2",
|
|
82
|
+
"globals": "^13.24.0",
|
|
83
|
+
"json5": "^2.2.3",
|
|
84
|
+
"madge": "^6.1.0",
|
|
85
|
+
"rollup": "^4.9.6",
|
|
86
|
+
"rollup-plugin-cleanup": "^3.2.1",
|
|
87
|
+
"tslib": "^2.7.0",
|
|
88
|
+
"typescript": "^5.5.4",
|
|
89
|
+
"webpack": "^5.89.0",
|
|
90
|
+
"webpack-cli": "^5.1.4",
|
|
91
|
+
"webpack-dev-server": "^4.15.1",
|
|
92
|
+
"webpack-merge": "^5.10.0",
|
|
93
|
+
"webpack-subresource-integrity": "^5.2.0-rc.1",
|
|
94
|
+
"yargs": "^17.7.2"
|
|
95
|
+
},
|
|
96
|
+
"devDependencies": {
|
|
97
|
+
"@testing-library/react": "^14.1.2",
|
|
98
|
+
"@types/node": "^20.11.5",
|
|
99
|
+
"@types/react": "^18.2.48",
|
|
100
|
+
"@types/react-dom": "^18.2.18",
|
|
101
|
+
"@types/yargs": "^17.0.32",
|
|
102
|
+
"react": "^18.2.0",
|
|
103
|
+
"react-dom": "^18.2.0",
|
|
104
|
+
"react-is": "^18.2.0",
|
|
105
|
+
"styled-components": "^6.1.8"
|
|
106
|
+
}
|
|
107
|
+
}
|