Make WordPress Core

Opened 2 months ago

Closed 2 months ago

#51749 closed task (blessed) (fixed)

Update engines in package.json to match new LTS

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


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:

Attachments (1)

51749.diff (361 bytes) - added by mkaz 2 months ago.

Download all attachments as: .zip

Change History (6)

2 months ago

#1 @desrosj
2 months 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
2 months 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
2 months 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
2 months 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
2 months 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.

Note: See TracTickets for help on using tickets.