npm / statusboard

Public monitor/status/health board for @npm/cli-team's maintained projects
https://npm.github.io/statusboard
Other
152 stars 53 forks source link

npm cli breaking changes #488

Open darcyclarke opened 2 years ago

darcyclarke commented 2 years ago

This is the issue where we file our future breaking changes for the npm cli.

Breaking Changes:

  1. [ ] Remove legacy lifecycle scripts support (ie. pre/post scripts)
wraithgar commented 1 year ago

Copied from v10 initiative

v11 and beyond

These are still future looking breaking changes that we want to keep in consideration going forward

### Breaking Changes:
- [ ] stop reading process.env.NODE in config for nodeBin
- [ ] remove man pages
- [ ] Remove install scripts support
- [ ] Support for reading `stdin` across **all** commands (ie. https://github.com/npm/rfcs/blob/3d5b2130504139bdc8a3b599923aa07d2ff79c96/accepted/0000-dependency-selector-syntax.md#commands-could-read-from-stdin)
- [ ] Support Package Distributions by default
- [ ] Consider changing strict-ssl default based on environment variables https://github.com/npm/make-fetch-happen/pull/257
- [ ] https://github.com/npm/npm-packlist/pull/168
- [ ] Revert all of the hacks around "globstar" in packlist.  Just use node-glob's patterns.

Features (v10 or v11 or beyond):

- [ ] New `npm link` experience
- [ ] Add new "lifecycle events" API - differentiate between scripts & events - user/project & dependency defined usecases)
- [ ] First-class `import-maps` Support
- [ ] Warn/error on unecessary config items in publishConfig
ljharb commented 1 year ago

Let's figure out the "store the range i asked for" change for v11 too?

wraithgar commented 6 months ago

I just lost an hour of my day to this "clever" helpful line. We should drop support for this.

https://github.com/npm/cli/blob/1114a12f2b4691d403d0863d4dca44f25580f57d/lib/cli-entry.js#L9-L12

  // if npm is called as "npmg" or "npm_g", then run in global mode.
  if (process.argv[1][process.argv[1].length - 1] === 'g') {
    process.argv.splice(1, 1, 'npm', '-g')
  }
$ node /Users/wraithgar/Development/npm/cli/branches/gar_semver-debug pkg set description='test'
npm ERR! code EPKGGLOBAL
npm ERR! There's no package.json file to manage on global mode
wraithgar commented 5 months ago

This is just a bug factory at this point.

lukekarrys commented 5 months ago

A few things I've found in the issue tracker lately that can't be fixed due to how they would likely break things:

wraithgar commented 4 months ago

https://github.com/npm/rfcs/pull/776

wraithgar commented 4 months ago

We should remove the npm audit fallback to the old endpoint. I don't think it works with lockfile v3 anyways.

wraithgar commented 2 months ago

Now that hooks is deprecated, and I don't think any other registries support it, it should be removed in npm 11

karenjli commented 2 months ago

Now that hooks is deprecated, and I don't think any other registries support it, it should be removed in npm 11

We will also need to update documentation regarding hooks

wraithgar commented 2 weeks ago

Repurposed this issue as the bucket for all breaking changes. Actual v11 roadmap is at https://github.com/npm/statusboard/issues/898