Skip to content

Commit

Permalink
deps: bump builtins from 1.0.3 to 5.0.0 (#41)
Browse files Browse the repository at this point in the history
* deps: bump builtins from 1.0.3 to 5.0.0

Bumps [builtins](https://github.com/juliangruber/builtins) from 1.0.3 to 5.0.0.
- [Release notes](https://github.com/juliangruber/builtins/releases)
- [Commits](juliangruber/builtins@v1.0.3...v5.0.0)

---
updated-dependencies:
- dependency-name: builtins
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: new syntax for builtins

Credit: @rzhade3 and @brettz9

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gar <[email protected]>
  • Loading branch information
dependabot[bot] and wraithgar authored Mar 29, 2022
1 parent 3c65535 commit 2c6129e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
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

0 comments on commit 2c6129e

Please sign in to comment.