Skip to content

Commit

Permalink
Fix "engines" field missing in published package
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Apr 24, 2021
1 parent bce10d3 commit af3403b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/giant-lies-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'wmr': patch
---

Fix pre-rendering not supported in older node <12.22.0 versions
3 changes: 2 additions & 1 deletion packages/wmr/src/lib/~publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const copy = dry ? (f, t) => console.info(`copy ${f} to ${t}`) : copyFileSync;

const pkg = JSON.parse(read('package.json'));
copy('package.json', '.package.json');
const { name, version, bin, author, contributors, repository, dependencies, types, files } = pkg;
const { name, version, bin, author, contributors, repository, dependencies, types, files, engines } = pkg;
const normalized = {
name,
version,
Expand All @@ -16,6 +16,7 @@ const normalized = {
contributors,
repository,
dependencies,
engines,
scripts: {
postpack: 'mv -f .package.json package.json'
},
Expand Down

0 comments on commit af3403b

Please sign in to comment.