Skip to content

Commit

Permalink
Fix NPM + Publint scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
MacFJA committed Aug 4, 2024
1 parent 58dadaa commit b8aa692
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/updateNpm.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ writeFileSync('src/lib/data/npm.json', JSON.stringify(output));

/** @param {import('zod').infer<typeof packagesSchema>[0]} pkg */
async function processPackage(pkg) {
if (!('npm' in pkg)) {
return {};
}
const { stdout } = await execAsync(`npm view ${pkg.npm} --json`);
const data = JSON.parse(stdout.toString());
const version = data.version;
Expand Down
3 changes: 3 additions & 0 deletions scripts/updatePublint.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import { chunk } from './chunk.js';
const injectVersions = (input) => {
const output = [];
for (const item of input) {
if (!('npm' in item)) {
continue;
}
/** @type {string} */
const version = npm[item.npm]?.version;
if (version) {
Expand Down

0 comments on commit b8aa692

Please sign in to comment.