From bedf7257b35b577f9e3b0f5f30823e67bdf868df Mon Sep 17 00:00:00 2001 From: Ely De La Cruz <603428+elycruz@users.noreply.github.com> Date: Sat, 30 Dec 2023 10:55:55 -0500 Subject: [PATCH] repo - Updated 'link-packages' script to use 'pnpm'. --- node_scripts/tasks/link-packages.js | 12 ++++++------ package.json | 7 ++++++- pnpm-lock.yaml | 10 ++++++++++ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/node_scripts/tasks/link-packages.js b/node_scripts/tasks/link-packages.js index 10108628..faca33ad 100644 --- a/node_scripts/tasks/link-packages.js +++ b/node_scripts/tasks/link-packages.js @@ -4,7 +4,7 @@ const {log, error} = console, - {ioSpawn, npmCmd} = require('../utils'), + {ioSpawn} = require('../utils'), repoRoot = path.join(__dirname, '../../'), @@ -16,7 +16,7 @@ const * @return {Promise} */ (async () => Promise.resolve() - .then(() => !process.env.NODE_ENV || process.env.NODE_ENV === 'development' ? ioSpawn(npmCmd, ['i'], {cwd: repoRoot}) : void 0) + .then(() => !process.env.NODE_ENV || process.env.NODE_ENV === 'development' ? ioSpawn('pnpm', ['i'], {cwd: repoRoot}) : void 0) .then(() => log('Linking packages\n')) .then(() => [ ['fjl'], @@ -32,17 +32,17 @@ const // log(`Linking subpackages: ${packagesToLink.join(', ')}`); // return Promise.all( // packagesToLink.map(subPackageName => - // ioSpawn(npmCmd, ['link', subPackageName], {cwd}) + // ioSpawn('pnpm', ['link', subPackageName], {cwd}) // )); // } // }) return p.then(() => { log(`${taskGroupSeparator}Linking ${packageName} ...`); - return ioSpawn(npmCmd, ['link'], {cwd}); + return ioSpawn('pnpm', ['link', '.'], {cwd}); }) .then(() => { log(`${taskGroupSeparator}Linking ${packageName} to main project ...`); - return ioSpawn(npmCmd, ['link', packageName], {cwd: repoRoot}); + return ioSpawn('pnpm', ['link', packageName], {cwd: repoRoot}); }) .catch(error); }, @@ -51,5 +51,5 @@ const .then(() => log(taskGroupSeparator + 'Script completed successfully.\n')) ) .then(() => log('Building packages\n')) - .then(() => ioSpawn(npmCmd, ['run', 'build'], {cwd: repoRoot})) + .then(() => ioSpawn('pnpm', ['run', 'build'], {cwd: repoRoot})) )(); diff --git a/package.json b/package.json index 369c5b45..5caa0d84 100644 --- a/package.json +++ b/package.json @@ -58,5 +58,10 @@ "pnpm": ">=8" }, "mockServerPort": 10087, - "mockServerCommand": "node ./packages/fjl-validator-recaptcha/tests/mock-server.js" + "mockServerCommand": "node ./packages/fjl-validator-recaptcha/tests/mock-server.js", + "dependencies": { + "fjl": "^2.0.0-alpha.5", + "fjl-inputfilter": "^1.3.0", + "fjl-validator": "^0.8.0" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b5771da..9272a99c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,16 @@ settings: importers: .: + optionalDependencies: + fjl: + specifier: ^2.0.0-alpha.5 + version: link:packages/fjl + fjl-inputfilter: + specifier: ^1.3.0 + version: link:packages/fjl-inputfilter + fjl-validator: + specifier: ^0.8.0 + version: link:packages/fjl-validator devDependencies: '@rollup/plugin-node-resolve': specifier: ^15.2.3