-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[core] Standardize npm scripts #16248
Conversation
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.
Thank you for working on this! I am very excited to get these scripts standardized (and perhaps have some tooling to keep them in sync.)
@@ -35,29 +35,29 @@ | |||
], | |||
"scripts": { | |||
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", | |||
"build:samples": "echo skipped", | |||
"build:samples": "echo Obsolete", | |||
"build:test": "tsc -p . && rollup -c rollup.test.config.js 2>&1", |
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 think it's out of scope for this PR, but I'd love us to consider getting rid of this step. Having separate build steps for the lib and for tests causes a bunch of unnecessary churn in CI since usually we end up running tsc twice
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.
Perhaps CI should run rushx build && rushx unit-test
. cc @praveenkuttappan
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.
One last remark, but I think I'm good with trying this change out.
Fixes #15679.
This PR standardizes the list of npm scripts across core packages and the template package. It also standardizes the content of the scripts as possible.
To do this, this PR also does the following:
core-amqp
is a notable exception, it needs some special rollup handling but I believe there is room for improvement there. @witemple-msft perhaps you might be interested in looking at it.chai
instead ofassert
because the shared rollup config only understandschai
and there is no reason to use two assertion libraries AFAICT.I wrote a small script to do the comparison between the template package and any other package which could be helpful if we want to do enforcement in CI: