Skip to content

Commit

Permalink
Remove warning about depending on packages with the same name as Node…
Browse files Browse the repository at this point in the history
… built-ins (#1790)

The reason for this is that Yarn is useful in many JS environments such as browsers and React Native, which don't provide the Node built-ins. Depending on polyfills is the right thing to do in that scenario and the reality is that people intentionally publish these polyfills under the same name as the Node built-ins (e.g. url and buffer).
  • Loading branch information
James Ide authored and bestander committed Nov 16, 2016
1 parent 1180f0f commit 75b65ee
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/reporters/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const messages = {
manifestLicenseInvalid: 'License should be a valid SPDX license expression',
manifestLicenseNone: 'No license field',
manifestStringExpected: '$0 is not a string',
manifestDependencyBuiltin: 'Dependency $0 listed in $1 is the name of a built-in module',
manifestDependencyCollision: '$0 has dependency $1 with range $2 that collides with a dependency in $3 of the same name with version $4',

configSet: 'Set $0 to $1.',
Expand Down
11 changes: 0 additions & 11 deletions src/util/normalize-manifest/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,6 @@ export function cleanDependencies(info: Object, isRoot: boolean, reporter: Repor
depTypes.push([type, deps]);
}

// check root dependencies for builtin module names
if (isRoot) {
for (const [type, deps] of depTypes) {
for (const name in deps) {
if (isBuiltinModule(name)) {
warn(reporter.lang('manifestDependencyBuiltin', name, type));
}
}
}
}

// ensure that dependencies don't have ones that can collide
for (const [type, deps] of depTypes) {
for (const name in deps) {
Expand Down

0 comments on commit 75b65ee

Please sign in to comment.