Skip to content
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

Fixes 2 warnings from npm #190

Merged
merged 2 commits into from
Jan 22, 2021
Merged

Fixes 2 warnings from npm #190

merged 2 commits into from
Jan 22, 2021

Conversation

akash1810
Copy link
Member

What does this change?

Recently ran ./script/setup and saw a few warnings (see below). This fixes the prepublish deprecation warning and the missing repository field warning. There's a third warning about a missing license field, but I'm not sure what license we need.

I vaguely remember us having issues with prepare in the past, however I think that when we were installing directly from GitHub rather than NPM, so this should be ok.

Original terminal output
./script/setup
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

> @guardian/[email protected] prepublish /Users/akash_askoolum/code/cdk
> tsc

npm WARN @guardian/[email protected] No repository field.
npm WARN @guardian/[email protected] No license field.

added 61 packages from 29 contributors, removed 17 packages, updated 26 packages and audited 1159 packages in 12.345s

98 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Does this change require changes to existing projects or CDK CLI?

No.

How to test

n/a

How can we measure success?

Fewer warnings from NPM.

Have we considered potential risks?

Prepare might run at a different lifecycle point, however the docs suggests prepublish is:

prepublish (DEPRECATED)
Same as prepare

🤞🏽

Use `prepare` for build steps and `prepublishOnly` for upload-only.
See the deprecation note in `npm help scripts` for more information.
@akash1810 akash1810 requested a review from a team January 21, 2021 18:22
@akash1810 akash1810 added the needs-new-release Identifying significant changes to the library label Jan 22, 2021
@jamie-lynch
Copy link
Contributor

This gives a bit more context into the name change: https://docs.npmjs.com/cli/v6/using-npm/scripts#prepare-and-prepublish

@akash1810 akash1810 merged commit ab405a4 into main Jan 22, 2021
@akash1810 akash1810 deleted the aa-deprecation branch January 22, 2021 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-new-release Identifying significant changes to the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants