-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix lerna packages #1635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix lerna packages #1635
Conversation
bin/update-typescript-refs.js
Outdated
}); | ||
const tsconfig = require(tsconfigFile); | ||
const refs = []; | ||
for (const d of p.localDependencies.keys()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing localDependencies
doesn't include packages from npm
?
bin/update-typescript-refs.js
Outdated
} | ||
|
||
const rootTsconfigFile = path.join(project.rootPath, 'tsconfig.json'); | ||
const rootTsconfig = require(path.join(project.rootPath, 'tsconfig.json')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be simplified to:
const rootTsConfig = require(rootTsConfigFile);
bin/update-typescript-refs.js
Outdated
const rootTsconfigJson = JSON.stringify(rootTsconfig, null, 2); | ||
if (process.argv[2] === '-f') { | ||
// Using `-f` to overwrite tsconfig.build.json | ||
fs.writeFileSync(rootTsconfigFile, rootTsconfigJson + '\n', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to not use await writeFileAsync()
... a promisified version of this api?
@@ -24,6 +24,12 @@ function run(argv, options) { | |||
const glob = require('glob'); | |||
const fse = require('fs-extra'); | |||
|
|||
if (options === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we even allow options to be set as a boolean
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this PR have contained the updated tsconfig
files with the project references?
d69f841
to
46e0772
Compare
46e0772
to
651f73e
Compare
Fix how to use lerna to collect packages.
Checklist
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated