Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#51749 closed task (blessed) (fixed)

Update engines in package.json to match new LTS

Reported by: mkaz's profile mkaz Owned by: desrosj's profile desrosj
Milestone: 5.6 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: javascript Cc:

Description

The engine field in package.json specifies a specific version 12.16.0 and 6.14.0, this should probably be set to greater-than-or-equal-to and not exact.

Since the .npmrc file does not specify that engine-strict=true, as it does in the Gutenberg repository, this field is advisory only.

The advice in documentation is to using the current LTS version, this also matches the .nvmrc file which is set to lts/*

So this ticket updates the package.json to >=14.15.0 and >=6.14.8 for node and npm, respectively.

See engines documenation:
https://docs.npmjs.com/cli/v6/configuring-npm/package-json#engines

Attachments (1)

51749.diff (361 bytes) - added by mkaz 4 years ago.

Download all attachments as: .zip

Change History (8)

@mkaz
4 years ago

#1 @desrosj
4 years ago

  • Component changed from General to Build/Test Tools
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 5.6
  • Type changed from defect (bug) to task (blessed)

I just reached out to the systems team to confirm 14.x was available on the build server. It was not, but it has been added, so this can now be considered.

I'm also going to convert this to a task since it is a build tool related ticket.

#2 @desrosj
4 years ago

I think this should be OK to make today before RC1, but I am leaning towards defining a specific version (14.15.0) instead of a range. It looks like this has been the practice in the past branches.

@jorbin do you happen to know any details from past releases around defining this?

#3 @jorbin
4 years ago

@desrosj This is something that generally has been coordinated with systems to ensure that the build server has the correct version. This had at one time been specific versions of node, hence not having a range. No idea what the case is now.

#4 @desrosj
4 years ago

  • Owner set to desrosj
  • Status changed from new to assigned

Got it. Let's run with defining the exact version for now. I plan to take a larger look at our NodeJS practices in general with regards to LTS, build server, etc. post 5.6.

#5 @desrosj
4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 49636:

Build/Test Tools: Update the package.json engines to point to the new LTS versions of Node/NPM.

Props mkaz, jorbin.
Fixes #51749.

#6 @desrosj
4 years ago

In 50185:

Build/Test Tools: Specify a version range within engines for node and npm.

This makes it more clear what versions of node and npm will successfully build WordPress.

Props dd32, mkaz.
Fixes #52455. See #51749.

#7 @desrosj
4 years ago

In 50186:

Build/Test Tools: Specify a version range within engines for node and npm.

This makes it more clear what versions of node and npm will successfully build WordPress.

Props dd32, mkaz.
Merges [50185] to the 5.6 branch.
Fixes #52455. See #51749.

Note: See TracTickets for help on using tickets.