diff options
author | Nathan Fritz <fritzy@github.com> | 2021-12-16 21:01:56 +0300 |
---|---|---|
committer | Nathan Fritz <fritzy@github.com> | 2021-12-16 21:05:19 +0300 |
commit | d7265045730555c03b3142c004c7438e9577028c (patch) | |
tree | 035d81b3124bdaa09c21854934bf2b2b50e52e44 /workspaces/libnpmdiff | |
parent | d8aac8448e983692cacb427e03f4688cd1b62e30 (diff) |
Bring in all libnpm modules + arborist as workspaces (#4166)
Added libnpm workspaces and arborist
Diffstat (limited to 'workspaces/libnpmdiff')
-rw-r--r-- | workspaces/libnpmdiff/.eslintrc.js | 14 | ||||
-rw-r--r-- | workspaces/libnpmdiff/.eslintrc.json | 3 | ||||
-rw-r--r-- | workspaces/libnpmdiff/.gitignore | 122 | ||||
-rw-r--r-- | workspaces/libnpmdiff/.npmrc | 3 | ||||
-rw-r--r-- | workspaces/libnpmdiff/SECURITY.md | 3 | ||||
-rw-r--r-- | workspaces/libnpmdiff/lib/index.js (renamed from workspaces/libnpmdiff/index.js) | 6 | ||||
-rw-r--r-- | workspaces/libnpmdiff/package.json | 24 | ||||
-rw-r--r-- | workspaces/libnpmdiff/test/index.js | 2 |
8 files changed, 59 insertions, 118 deletions
diff --git a/workspaces/libnpmdiff/.eslintrc.js b/workspaces/libnpmdiff/.eslintrc.js new file mode 100644 index 000000000..022767bc3 --- /dev/null +++ b/workspaces/libnpmdiff/.eslintrc.js @@ -0,0 +1,14 @@ +// This file is automatically added by @npmcli/template-oss. Do not edit. + +const { readdirSync: readdir } = require('fs') + +const localConfigs = readdir(__dirname) + .filter((file) => file.startsWith('.eslintrc.local.')) + .map((file) => `./${file}`) + +module.exports = { + extends: [ + '@npmcli', + ...localConfigs, + ], +} diff --git a/workspaces/libnpmdiff/.eslintrc.json b/workspaces/libnpmdiff/.eslintrc.json deleted file mode 100644 index b39431d2c..000000000 --- a/workspaces/libnpmdiff/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@npmcli"] -} diff --git a/workspaces/libnpmdiff/.gitignore b/workspaces/libnpmdiff/.gitignore index 0aba557bf..6ed44c72b 100644 --- a/workspaces/libnpmdiff/.gitignore +++ b/workspaces/libnpmdiff/.gitignore @@ -1,99 +1,23 @@ -# Logs -logs -*.log -npm-debug.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# next.js build output -.next - -# nuxt.js build output -.nuxt - -# gatsby files -.cache/ -public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# Editors -Session.vim +# This file is automatically added by @npmcli/template-oss. Do not edit. + +# ignore everything in the root +/* + +# keep these +!/.commitlintrc.js +!/.npmrc +!/.eslintrc* +!/.github +!**/.gitignore +!/package.json +!/docs +!/bin +!/lib +!/map.js +!/tap-snapshots +!/test +!/scripts +!/README* +!/LICENSE* +!/SECURITY* +!/CHANGELOG* diff --git a/workspaces/libnpmdiff/.npmrc b/workspaces/libnpmdiff/.npmrc new file mode 100644 index 000000000..878b7ddef --- /dev/null +++ b/workspaces/libnpmdiff/.npmrc @@ -0,0 +1,3 @@ +;This file is automatically added by @npmcli/template-oss. Do not edit. + +package-lock=false diff --git a/workspaces/libnpmdiff/SECURITY.md b/workspaces/libnpmdiff/SECURITY.md new file mode 100644 index 000000000..a93106d0c --- /dev/null +++ b/workspaces/libnpmdiff/SECURITY.md @@ -0,0 +1,3 @@ +<!-- This file is automatically added by @npmcli/template-oss. Do not edit. --> + +Please send vulnerability reports through [hackerone](https://hackerone.com/github). diff --git a/workspaces/libnpmdiff/index.js b/workspaces/libnpmdiff/lib/index.js index 6e68e6c4c..10532c199 100644 --- a/workspaces/libnpmdiff/index.js +++ b/workspaces/libnpmdiff/lib/index.js @@ -1,8 +1,8 @@ const pacote = require('pacote') -const formatDiff = require('./lib/format-diff.js') -const getTarball = require('./lib/tarball.js') -const untar = require('./lib/untar.js') +const formatDiff = require('./format-diff.js') +const getTarball = require('./tarball.js') +const untar = require('./untar.js') // TODO: we test this condition in the diff command // so this error probably doesnt need to be here. Or diff --git a/workspaces/libnpmdiff/package.json b/workspaces/libnpmdiff/package.json index 129d9b90c..b79bb6c3b 100644 --- a/workspaces/libnpmdiff/package.json +++ b/workspaces/libnpmdiff/package.json @@ -1,14 +1,15 @@ { "name": "libnpmdiff", - "version": "2.0.4", + "version": "3.0.0", "description": "The registry diff", "repository": "https://github.com/npm/libnpmdiff", + "main": "lib/index.js", "files": [ - "index.js", + "bin", "lib" ], "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16" }, "keywords": [ "npm", @@ -28,23 +29,19 @@ "license": "ISC", "scripts": { "eslint": "eslint", - "lint": "npm run eslint -- index.js \"lib/**/*.js\" \"test/*.js\"", + "lint": "eslint '**/*.js'", "lintfix": "npm run lint -- --fix", - "test": "tap test/*.js", + "test": "tap", "posttest": "npm run lint", - "snap": "tap test/*.js", + "snap": "tap", "preversion": "npm test", "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" + "prepublishOnly": "git push origin --follow-tags", + "postlint": "npm-template-check" }, "tap": { "check-coverage": true }, - "standard": { - "ignore": [ - "/tap-snapshots/" - ] - }, "devDependencies": { "eslint": "^8.1.0", "tap": "^15.0.9" @@ -58,5 +55,8 @@ "npm-package-arg": "^8.1.4", "pacote": "^12.0.0", "tar": "^6.1.0" + }, + "templateOSS": { + "version": "2.4.1" } } diff --git a/workspaces/libnpmdiff/test/index.js b/workspaces/libnpmdiff/test/index.js index 80b3daaa6..6f6e481f5 100644 --- a/workspaces/libnpmdiff/test/index.js +++ b/workspaces/libnpmdiff/test/index.js @@ -2,7 +2,7 @@ const { resolve } = require('path') const t = require('tap') -const diff = require('../index.js') +const diff = require('../lib/index.js') const normalizePath = p => p .replace(/\\+/g, '/') |