ghost-portal/scripts/fixupModules.cjs
Jaco 27098f34b8
Bump deps (#9040)
* Bump deps

* Bumps

* Adjust

* Adjust

* Adjust test imports

* Adjust

* Re-adjust

* Fix frequency package name

* Adjust build

* Adjust

* Fix before import

* Adjust

* require script

* Adjust checks

* Linting fixes

* Fix json alongside other tests

* Move fixup script

* Remove main type: "module"

* Adjust (some) tests

* Adjust chartjs imports

* Bump deps

* Adjust

* Bump deps

* Adjust styled imports

* Bump deps

* Adjust
2023-02-20 11:38:52 +02:00

23 lines
617 B
JavaScript

// Copyright 2017-2023 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
const fs = require('fs');
const path = require('path');
const process = require('process');
// incorrect packages without type specifier
const PKG_FIX = [
'@frequency-chain/api-augment'
];
PKG_FIX.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);
}
});