mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-10-26 21:29:49 +00:00
chore(papi): keep the upstream sources in upstream-src/
The pezkuwi-dev build treats any package with a src/ directory as its own: it requires our license header on every file and builds it. These are upstream files that must stay byte-identical to the source embedded in dist/, so they live in upstream-src/ instead, which neither the build nor the root tsconfig picks up.
This commit is contained in:
1 parent
ea8cb96cea
commit
a9d1026736
65 files changed
+15
-18
No files matched your search
@@ -1,9 +1,9 @@
|
||||
# @pezkuwi/bizinikiwi-bindings
|
||||
|
||||
**Source:** `src/` is [`@polkadot-api/substrate-bindings`](https://www.npmjs.com/package/@polkadot-api/substrate-bindings/v/0.16.6) 0.16.6 from
|
||||
**Source:** `upstream-src/` is [`@polkadot-api/substrate-bindings`](https://www.npmjs.com/package/@polkadot-api/substrate-bindings/v/0.16.6) 0.16.6 from
|
||||
[polkadot-api](https://github.com/polkadot-api/polkadot-api) (MIT), with imports of
|
||||
`@polkadot-api/*` renamed to `@pezkuwi/*` (`substrate-bindings` → `bizinikiwi-bindings`). `dist/` is its build;
|
||||
`scripts/check-papi-sources.mjs` fails CI unless the source embedded in `dist/` equals `src/`.
|
||||
`scripts/check-papi-sources.mjs` fails CI unless the source embedded in `dist/` equals `upstream-src/`.
|
||||
|
||||
The upstream README follows.
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,9 +1,9 @@
|
||||
# @pezkuwi/merkleize-metadata
|
||||
|
||||
**Source:** `src/` is [`@polkadot-api/merkleize-metadata`](https://www.npmjs.com/package/@polkadot-api/merkleize-metadata/v/1.1.22) 1.1.22 from
|
||||
**Source:** `upstream-src/` is [`@polkadot-api/merkleize-metadata`](https://www.npmjs.com/package/@polkadot-api/merkleize-metadata/v/1.1.22) 1.1.22 from
|
||||
[polkadot-api](https://github.com/polkadot-api/polkadot-api) (MIT), with imports of
|
||||
`@polkadot-api/*` renamed to `@pezkuwi/*` (`substrate-bindings` → `bizinikiwi-bindings`). `dist/` is its build;
|
||||
`scripts/check-papi-sources.mjs` fails CI unless the source embedded in `dist/` equals `src/`.
|
||||
`scripts/check-papi-sources.mjs` fails CI unless the source embedded in `dist/` equals `upstream-src/`.
|
||||
|
||||
The upstream README follows.
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,9 +1,9 @@
|
||||
# @pezkuwi/metadata-builders
|
||||
|
||||
**Source:** `src/` is [`@polkadot-api/metadata-builders`](https://www.npmjs.com/package/@polkadot-api/metadata-builders/v/0.13.2) 0.13.2 from
|
||||
**Source:** `upstream-src/` is [`@polkadot-api/metadata-builders`](https://www.npmjs.com/package/@polkadot-api/metadata-builders/v/0.13.2) 0.13.2 from
|
||||
[polkadot-api](https://github.com/polkadot-api/polkadot-api) (MIT), with imports of
|
||||
`@polkadot-api/*` renamed to `@pezkuwi/*` (`substrate-bindings` → `bizinikiwi-bindings`). `dist/` is its build;
|
||||
`scripts/check-papi-sources.mjs` fails CI unless the source embedded in `dist/` equals `src/`.
|
||||
`scripts/check-papi-sources.mjs` fails CI unless the source embedded in `dist/` equals `upstream-src/`.
|
||||
|
||||
The upstream README follows.
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,9 +1,9 @@
|
||||
# @pezkuwi/papi-utils
|
||||
|
||||
**Source:** `src/` is [`@polkadot-api/utils`](https://www.npmjs.com/package/@polkadot-api/utils/v/0.2.0) 0.2.0 from
|
||||
**Source:** `upstream-src/` is [`@polkadot-api/utils`](https://www.npmjs.com/package/@polkadot-api/utils/v/0.2.0) 0.2.0 from
|
||||
[polkadot-api](https://github.com/polkadot-api/polkadot-api) (MIT), with imports of
|
||||
`@polkadot-api/*` renamed to `@pezkuwi/*`. `dist/` is its build;
|
||||
`scripts/check-papi-sources.mjs` fails CI unless the source embedded in `dist/` equals `src/`.
|
||||
`scripts/check-papi-sources.mjs` fails CI unless the source embedded in `dist/` equals `upstream-src/`.
|
||||
|
||||
The upstream README follows.
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -4,8 +4,10 @@
|
||||
// papi-utils, bizinikiwi-bindings, metadata-builders and merkleize-metadata
|
||||
// ship committed dist/ builds of upstream polkadot-api packages. Every source
|
||||
// map in dist/ embeds the TypeScript it was compiled from; this check fails
|
||||
// unless that embedded source is exactly the src/ committed beside it, so a
|
||||
// published dist/ can only come from source held in this repository.
|
||||
// unless that embedded source is exactly the upstream-src/ committed beside it,
|
||||
// so a published dist/ can only come from source held in this repository.
|
||||
// (Not src/: the pezkuwi-dev build treats any package with src/ as its own and
|
||||
// requires our license header on every file.)
|
||||
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
@@ -23,7 +25,7 @@ function walk (dir) {
|
||||
|
||||
for (const name of PACKAGES) {
|
||||
const pkg = path.join('packages', name);
|
||||
const srcDir = path.join(pkg, 'src');
|
||||
const srcDir = path.join(pkg, 'upstream-src');
|
||||
const embedded = new Map();
|
||||
|
||||
for (const map of walk(path.join(pkg, 'dist')).filter((f) => f.endsWith('.map'))) {
|
||||
@@ -31,7 +33,7 @@ for (const name of PACKAGES) {
|
||||
|
||||
sources.forEach((source, i) => {
|
||||
const resolved = path.normalize(path.join(path.dirname(map), source));
|
||||
const rel = resolved.slice(resolved.indexOf(`${path.sep}src${path.sep}`) + 1);
|
||||
const rel = path.join('upstream-src', resolved.slice(resolved.indexOf(`${path.sep}src${path.sep}`) + 5));
|
||||
const content = sourcesContent[i];
|
||||
|
||||
if (content == null) {
|
||||
|
||||
+1
-6
@@ -16,11 +16,6 @@
|
||||
// these include the different-chain augmentations, which then overrides
|
||||
// the bizinikiwi base. TS only allow single augmentations, so exclude here
|
||||
"packages/api-augment/src/zagros/*.ts",
|
||||
"packages/api-augment/src/pezkuwi/*.ts",
|
||||
// upstream polkadot-api sources behind committed dist/ builds; checked by scripts/check-papi-sources.mjs
|
||||
"packages/bizinikiwi-bindings/src/**/*",
|
||||
"packages/merkleize-metadata/src/**/*",
|
||||
"packages/metadata-builders/src/**/*",
|
||||
"packages/papi-utils/src/**/*"
|
||||
"packages/api-augment/src/pezkuwi/*.ts"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user