WordPress.org

Make WordPress Core

Opened 19 months ago

Closed 9 months ago

#43075 closed defect (bug) (fixed)

Use tabs for indentation in `package.json`

Reported by: netweb Owned by: dd32
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch commit
Focuses: Cc:

Description

Tabbed indentation is now supported by npm 5.x for package.json, package-lock.json and npm-shrinkwrap.json files via: http://blog.npmjs.org/post/161081169345/v500 - npm v5.0.0

Indentation is now detected and preserved for package.json, package-lock.json, and npm-shrinkwrap.json. If the package lock is missing, it will default to package.json’s current indentation.

As part of #35105 (updated patch pending) for WP 5.0 the npm and Node.js versions will be bumped to npm 5.x and Node.js 8.x LTS respectively as the official supported versions for WordPress' build tools.

This change to the indentation of npm files further simplifies WordPress' codebase to use tabs for indentation in files where possible.

Attachments (1)

43075.diff (3.0 KB) - added by netweb 19 months ago.

Download all attachments as: .zip

Change History (6)

@netweb
19 months ago

#1 @netweb
19 months ago

  • Keywords has-patch commit added

#2 @dd32
18 months ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 42460:

Build: Switch package.json to using tabs for indents.

Props netweb.
Fixes #43075.

#3 @jorbin
10 months ago

  • Milestone changed from 5.0 to 5.1

#4 @netweb
9 months ago

  • Milestone changed from 5.1 to 5.0
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening to backport this change to the 5.0 branch. Primarily to remove any ambiguity of Core's JSON coding standards., currently, Gutenberg uses tabs for indentation but the 5.0 branch of core does not.


Replying to swissspidy: ticket:45088#comment:4

When running npm install on my Mac, I see lots of changes of http URLs to https in package-lock.json. Is that happening for anyone else?

This patch can also update instances of http://registry.npmjs.org to https://registry.npmjs.orgthat currently exist in the 5.0 branch of the package-lock.json file.

#5 @pento
9 months ago

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

In 43782:

Build: Switch package.json to using tabs for indents.

Merges [42460] to the 5.0 branch.

Props netweb.
Fixes #43075.

Note: See TracTickets for help on using tickets.