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

Add the string '@generated' to the lockfile #6890

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa

[#6878](https://github.com/yarnpkg/yarn/pull/6878) - [**Maël Nison**](https://twitter.com/arcanis)

- Add '@generated' string to the lockfile to prevent linters from inspecting it

[#6890](https://github.com/yarnpkg/yarn/pull/6890) - [**Matthew Gamble**](https://github.com/mwgamble)

## 1.13.0

- Implements a new `package.json` field: `peerDependenciesMeta`
Expand Down
1 change: 1 addition & 0 deletions __tests__/fixtures/add/integrity-pure-lockfile/yarn.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


"package-a@file:./package-a":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


commander@^2.9.0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


commander@^2.9.0:
Expand Down
1 change: 1 addition & 0 deletions __tests__/fixtures/import/deep/yarn.lock.import
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


commander@^2.9.0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


"file-dep-a@file:deps/a":
Expand Down
1 change: 1 addition & 0 deletions __tests__/fixtures/import/file/yarn.lock.import
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


"file-dep-a@file:deps/a":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


beeper@sindresorhus/beeper:
Expand Down
1 change: 1 addition & 0 deletions __tests__/fixtures/import/github/yarn.lock.import
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


beeper@sindresorhus/beeper:
Expand Down
1 change: 1 addition & 0 deletions __tests__/fixtures/import/locked/yarn.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


dep-a@^1.0.0:
Expand Down
1 change: 1 addition & 0 deletions __tests__/fixtures/import/missing-dev/yarn.lock.import
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


commander@^2.9.0:
Expand Down
1 change: 1 addition & 0 deletions __tests__/fixtures/import/missing-opt/yarn.lock.import
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


commander@^2.9.0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


"file-dep-a@file:deps/a":
Expand Down
1 change: 1 addition & 0 deletions __tests__/fixtures/import/overlapping/yarn.lock.import
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


"file-dep-a@file:deps/a":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


commander@^2.9.0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


commander@^2.9.0:
Expand Down
1 change: 1 addition & 0 deletions __tests__/fixtures/import/shallow-dev/yarn.lock.import
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


commander@^2.9.0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


commander@^2.9.0:
Expand Down
1 change: 1 addition & 0 deletions __tests__/fixtures/import/shallow/yarn.lock.import
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated


commander@^2.9.0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated
# yarn vxx.xx.xx
# node vxx.xx.xx

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# @generated
# yarn vxx.xx.xx
# node vxx.xx.xx

Expand Down
1 change: 1 addition & 0 deletions src/lockfile/stringify.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export default function stringify(obj: Object, noHeader?: boolean, enableVersion
const lines = [];
lines.push('# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.');
lines.push(`# yarn lockfile v${LOCKFILE_VERSION}`);
lines.push('# @generated');
if (enableVersions) {
lines.push(`# yarn v${YARN_VERSION}`);
lines.push(`# node ${NODE_VERSION}`);
Expand Down