Skip to content

Commit

Permalink
feat($deps): add version for bundle deps
Browse files Browse the repository at this point in the history
  • Loading branch information
iq9891 committed Mar 20, 2022
1 parent 8b7272a commit c0abbb4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/biu/compiled/commander/package.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"commander","author":"TJ Holowaychuk <tj@vision-media.ca>","license":"MIT","types":"typings/index.d.ts"}
{"name":"commander","version":"9.1.0","author":"TJ Holowaychuk <tj@vision-media.ca>","license":"MIT","types":"typings/index.d.ts"}
2 changes: 1 addition & 1 deletion packages/utils/compiled/chalk/package.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"chalk","license":"MIT","types":"./source/index.d.ts"}
{"name":"chalk","version":"5.0.1","license":"MIT","types":"./source/index.d.ts"}
2 changes: 1 addition & 1 deletion packages/utils/compiled/yargs-parser/package.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"yargs-parser","author":"Ben Coe <ben@npmjs.com>","license":"ISC"}
{"name":"yargs-parser","version":"21.0.1","author":"Ben Coe <ben@npmjs.com>","license":"ISC"}
8 changes: 5 additions & 3 deletions scripts/bundle-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,14 @@ Object.keys(exported).forEach(function (key) {
'utf-8',
);
}
const { name, author, license, types, typing, typings } = JSON.parse(
fs.readFileSync(path.join(pkgRoot, 'package.json'), 'utf-8'),
);
const { name, author, license, types, version, typing, typings } =
JSON.parse(
fs.readFileSync(path.join(pkgRoot, 'package.json'), 'utf-8'),
);
fs.writeJSONSync(path.join(target, 'package.json'), {
...{},
...{ name },
...(version ? { version } : undefined),
...(author ? { author } : undefined),
...(license ? { license } : undefined),
...(types ? { types } : undefined),
Expand Down

0 comments on commit c0abbb4

Please sign in to comment.