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

deps: bump builtins from 1.0.3 to 5.0.0 #41

Merged
merged 2 commits into from
Mar 29, 2022
Merged
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
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var validate = module.exports = function (name) {
// Generate warnings for stuff that used to be allowed

// core module names like http, events, util, etc
builtins.forEach(function (builtin) {
builtins({ version: '*' }).forEach(function (builtin) {
if (name.toLowerCase() === builtin) {
warnings.push(builtin + ' is a core module name')
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "test"
},
"dependencies": {
"builtins": "^1.0.3"
"builtins": "^5.0.0"
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
Expand Down
5 changes: 5 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ test('validate-npm-package-name', function (t) {
validForOldPackages: true,
warnings: ['http is a core module name'] })

t.deepEqual(validate('process'), {
validForNewPackages: false,
validForOldPackages: true,
warnings: ['process is a core module name'] })

// Long Package Names

/* eslint-disable-next-line max-len */
Expand Down