Don't work around packaging issues, remove usage of them (#9243)

* Don't work around packaging issues, remove usage of them

* Rebuild with exclusions

* Fix tests
This commit is contained in:
Jaco 2023-03-29 08:25:57 +03:00 committed by GitHub
parent d4a9c742ab
commit 59fa304cd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 1045 deletions

View File

@ -28,14 +28,13 @@
"scripts": {
"analyze": "yarn clean && BUILD_ANALYZE=1 yarn run build:code && yarn source-map-explorer packages/apps/build/app.*.js",
"build": "yarn run build:i18n && yarn run build:code",
"build:before": "yarn build:fixup && yarn build:images && yarn build:typesBundle",
"build:before": "yarn build:images && yarn build:typesBundle",
"build:code": "NODE_ENV=production yarn polkadot-dev-build-ts",
"build:devElectronMain": "cd packages/apps-electron && yarn polkadot-exec-webpack --config webpack.main.cjs",
"build:devElectronRenderer": "cd packages/apps-electron && yarn polkadot-exec-webpack --config webpack.renderer.cjs",
"build:electron": "yarn clean:electronBuild && yarn build:electronMain && yarn build:electronRenderer",
"build:electronMain": "cd packages/apps-electron && NODE_ENV=production yarn polkadot-exec-webpack --config webpack.main.cjs",
"build:electronRenderer": "cd packages/apps-electron && NODE_ENV=production yarn polkadot-exec-webpack --config webpack.renderer.cjs",
"build:fixup": "node ./scripts/fixupModules.cjs",
"build:i18n": "i18next-scanner --config i18next-scanner.config.cjs && node ./scripts/i18nSort.cjs",
"build:images": "node scripts/imgConvert.mjs",
"build:release:electron": "yarn build && yarn build:electron && yarn postinstall:electron",
@ -52,7 +51,7 @@
"clean:electronRelease": "cd packages/apps-electron && rm -rf release",
"clean:i18n": "rm -rf packages/apps/public/locales/en && mkdir -p packages/apps/public/locales/en",
"docs": "echo \"skipping docs\"",
"lint": "yarn build:fixup && polkadot-dev-run-lint",
"lint": "polkadot-dev-run-lint",
"packElectron": "yarn build:release:electron && yarn clean:electronRelease && electron-builder build -mwl",
"packElectron:linux": "yarn build:release:electron && electron-builder build --linux",
"packElectron:mac": "yarn build:release:electron && electron-builder build --mac",
@ -62,7 +61,7 @@
"postinstall:electron": "electron-builder install-app-deps",
"start": "yarn clean && cd packages/apps && yarn polkadot-exec-webpack serve --config webpack.serve.cjs --port 3000",
"start:electron": "yarn clean:electronBuild && concurrently 'yarn build:devElectronMain && cd packages/apps-electron && electron ./build/electron.js' 'yarn build:devElectronRenderer'",
"test": "polkadot-dev-run-test --env browser --require ./scripts/fixupModules.cjs --experimental-specifier-resolution=node ^typesBundle ^chainEndpoints ^chainTypes ^page- ^react- ^apps-electron",
"test": "polkadot-dev-run-test --env browser --experimental-specifier-resolution=node ^typesBundle ^chainEndpoints ^chainTypes ^page- ^react- ^apps-electron",
"test:all": "polkadot-dev-run-test --env browser ^chainEndpoints ^chainTypes",
"test:one": "polkadot-dev-run-test --env browser",
"test:skipped": "echo 'tests skipped'"

View File

@ -1,6 +1,8 @@
// Copyright 2017-2023 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Not used/included in index.ts as of https://github.com/polkadot-js/apps/pull/9243
import type { OverrideBundleDefinition } from '@polkadot/types/types';
import { options } from '@fragnova/api-augment';

View File

@ -1,6 +1,8 @@
// Copyright 2017-2023 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Not used/included in index.ts as of https://github.com/polkadot-js/apps/pull/9243
import type { OverrideBundleDefinition } from '@polkadot/types/types';
import { rpc, runtime, signedExtensions, types } from '@frequency-chain/api-augment';

View File

@ -45,8 +45,10 @@ import encointerNodeTeeproxy from './encointer-node-teeproxy.js';
import encointerPara from './encointer-para.js';
import equilibrium from './equilibrium.js';
import fantour from './fantour.js';
import fragnova from './fragnova.js';
import frequency from './frequency.js';
// See https://github.com/polkadot-js/apps/pull/9243
// import fragnova from './fragnova.js';
// See https://github.com/polkadot-js/apps/pull/9243
// import frequency from './frequency.js';
import galital from './galital.js';
import galitalParachain from './galital-parachain.js';
import galois from './galois.js';
@ -191,10 +193,12 @@ const spec: Record<string, OverrideBundleDefinition> = {
'encointer-node-teeproxy': encointerNodeTeeproxy,
'encointer-parachain': encointerPara,
fantour,
fragnova,
'fragnova-testnet': fragnova,
frequency,
'frequency-rococo': frequency,
// See https://github.com/polkadot-js/apps/pull/9243
// fragnova,
// 'fragnova-testnet': fragnova,
// See https://github.com/polkadot-js/apps/pull/9243
// frequency,
// 'frequency-rococo': frequency,
galital,
'galital-collator': galitalParachain,
gamepower,

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +0,0 @@
// Copyright 2017-2023 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
const fs = require('node:fs');
const path = require('node:path');
const process = require('node:process');
// incorrect packages without type specifier
[
// See https://github.com/fragcolor-xyz/fragnova/issues/286
'@fragnova/api-augment',
// See https://github.com/LibertyDSNP/frequency/issues/1116
'@frequency-chain/api-augment'
].forEach((f) => {
const full = path.join(process.cwd(), `node_modules/${f}/package.json`);
const json = JSON.parse(fs.readFileSync(full, 'utf8'));
if (!json.type) {
json.type = 'module';
fs.writeFileSync(full, JSON.stringify(json, null, 2));
console.log('Fixed package type::', f);
}
});