Skip to content

Commit 199d2dd

Browse files
committed
chore: use external gc-utils dep for Angular-Slickgrid workspace script
1 parent 38384e6 commit 199d2dd

4 files changed

Lines changed: 13 additions & 62 deletions

File tree

frameworks/angular-slickgrid/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"@faker-js/faker": "catalog:",
9191
"@fnando/sparkline": "catalog:",
9292
"@formkit/tempo": "catalog:",
93+
"@gc-utils/fs-extra": "^0.2.1",
9394
"@ng-select/ng-select": "^14.7.0",
9495
"@ngx-translate/http-loader": "^16.0.1",
9596
"@nx/angular": "^21.0.3",

frameworks/angular-slickgrid/scripts/fs-utils.mjs

Lines changed: 0 additions & 58 deletions
This file was deleted.

frameworks/angular-slickgrid/scripts/replace-workspace.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { dirname as pDirname, join as pJoin, resolve as pResolve } from 'node:path';
22
import { fileURLToPath } from 'node:url';
33

4-
import { readJSONSync, writeJsonSync } from './fs-utils.mjs';
4+
import { readJsonSync, writeJsonSync } from '@gc-utils/fs-extra';
55

66
const __filename = fileURLToPath(import.meta.url);
77
const __dirname = pDirname(__filename);
@@ -12,8 +12,8 @@ const projectRootPath = pJoin(__dirname, '../');
1212
* with current version from "package.json" root into "dist/package.json"
1313
*/
1414
(async function main() {
15-
const mainPkg = readJSONSync(pJoin(projectRootPath, 'package.json'));
16-
const distPkg = readJSONSync(pJoin(projectRootPath, 'dist', 'package.json'));
15+
const mainPkg = readJsonSync(pJoin(projectRootPath, 'package.json'));
16+
const distPkg = readJsonSync(pJoin(projectRootPath, 'dist', 'package.json'));
1717

1818
// replace all workspace protocol with current version from "package.json" root into "dist/package.json"
1919
console.log('-------------------------------------------------------------------------------------');
@@ -26,7 +26,7 @@ const projectRootPath = pJoin(__dirname, '../');
2626
if (depName.startsWith('@slickgrid-universal/') || depVersion.startsWith('workspace:')) {
2727
// we need to get each package version
2828
const depPkgName = depName.replace('@slickgrid-universal', '');
29-
const depPkg = readJSONSync(pJoin(projectRootPath, '../../packages/', depPkgName, 'package.json'));
29+
const depPkg = readJsonSync(pJoin(projectRootPath, '../../packages/', depPkgName, 'package.json'));
3030
console.log(`update dependency { "${depName}": "${depPkg.version}" }`);
3131
distPkg.dependencies[depName] = depPkg.version;
3232
}

pnpm-lock.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)