Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/updatees/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
const getSemverPrefix = _.pipe(s => s && s.match(/^(\D*)\d+/), _.at(1));

const updatePackageEngines = async (node, npm, pkg, {exact = false, loose = true}) => {
// TODO: maybe support forcing the choice of prefix (example, to restore loose range like >=)

Check warning on line 28 in src/updatees/package.js

View workflow job for this annotation

GitHub Actions / build (22.x)

Unexpected 'todo' comment: 'TODO: maybe support forcing the choice...'

Check warning on line 28 in src/updatees/package.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Unexpected 'todo' comment: 'TODO: maybe support forcing the choice...'

Check warning on line 28 in src/updatees/package.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Unexpected 'todo' comment: 'TODO: maybe support forcing the choice...'

Check warning on line 28 in src/updatees/package.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Unexpected 'todo' comment: 'TODO: maybe support forcing the choice...'

Check warning on line 28 in src/updatees/package.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Unexpected 'todo' comment: 'TODO: maybe support forcing the choice...'

Check warning on line 28 in src/updatees/package.js

View workflow job for this annotation

GitHub Actions / build (22.x)

Unexpected 'todo' comment: 'TODO: maybe support forcing the choice...'
if (_.isArray(pkg)) return pMap(pkg, p => updatePackageEngines(node, npm, p, {exact, loose}));

if (!pkg) return;
Expand All @@ -37,7 +37,9 @@
node ? `${prefix ? prefix : getSemverPrefix(existingVersion)}${node}` : existingVersion
),
_.update('engines.npm', existingVersion =>
npm ? `${prefix ? prefix : getSemverPrefix(existingVersion)}${npm}` : existingVersion
existingVersion && npm
? `${prefix ? prefix : getSemverPrefix(existingVersion)}${npm}`
: existingVersion
)
)(await readPackage(pkg));

Expand Down
Loading