Skip to content
Permalink
Browse files
chore: refactor smoke-tests
  • Loading branch information
lukekarrys authored and fritzy committed Apr 13, 2022
1 parent 3f7fe17 commit 672fce84b25ecbe58d311acfae6c43e5ca2d778d
Showing 19 changed files with 344 additions and 443 deletions.
@@ -10,7 +10,6 @@
"overrides": [{
"files": [
"scripts/**",
"smoke-tests/**",
"bin/**",
"test/**"
],
@@ -351,6 +351,7 @@ readme*
/side-channel
/simple-concat
/simple-get
/smoke-tests
/source-map
/source-map-support
/space-separated-tokens
@@ -84,6 +84,7 @@
"license": "Artistic-2.0",
"workspaces": [
"docs",
"smoke-tests",
"workspaces/*"
],
"dependencies": {
@@ -5795,7 +5796,8 @@
},
"node_modules/promise-all-reject-late": {
"version": "1.0.1",
"license": "ISC",
"resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz",
"integrity": "sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw==",
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
@@ -6282,8 +6284,9 @@
},
"node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"inBundle": true,
"license": "ISC",
"dependencies": {
"glob": "^7.1.3"
},
@@ -6447,6 +6450,10 @@
"npm": ">= 3.0.0"
}
},
"node_modules/smoke-tests": {
"resolved": "smoke-tests",
"link": true
},
"node_modules/socks": {
"version": "2.6.2",
"inBundle": true,
@@ -9737,6 +9744,22 @@
"url": "https://github.com/sponsors/wooorm"
}
},
"smoke-tests": {
"version": "1.0.0",
"license": "ISC",
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/promise-spawn": "^3.0.0",
"@npmcli/template-oss": "3.3.2",
"minify-registry-metadata": "^2.2.0",
"rimraf": "^3.0.2",
"tap": "^16.0.1",
"which": "^2.0.2"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"workspaces/arborist": {
"name": "@npmcli/arborist",
"version": "5.0.5",
@@ -13792,7 +13815,9 @@
}
},
"promise-all-reject-late": {
"version": "1.0.1"
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz",
"integrity": "sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw=="
},
"promise-call-limit": {
"version": "1.0.1"
@@ -14117,6 +14142,8 @@
},
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"requires": {
"glob": "^7.1.3"
}
@@ -14192,6 +14219,18 @@
"smart-buffer": {
"version": "4.2.0"
},
"smoke-tests": {
"version": "file:smoke-tests",
"requires": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/promise-spawn": "^3.0.0",
"@npmcli/template-oss": "3.3.2",
"minify-registry-metadata": "^2.2.0",
"rimraf": "^3.0.2",
"tap": "^16.0.1",
"which": "^2.0.2"
}
},
"socks": {
"version": "2.6.2",
"requires": {
@@ -4,6 +4,7 @@
"description": "a package manager for JavaScript",
"workspaces": [
"docs",
"smoke-tests",
"workspaces/*"
],
"files": [
@@ -225,8 +226,7 @@
"lintfix": "npm run lint -- --fix",
"lint-all": "npm run lint --if-present --workspaces --include-workspace-root",
"prelint": "rimraf test/npm_cache*",
"resetdeps": "bash scripts/resetdeps.sh",
"smoke-tests": "tap smoke-tests/index.js --no-coverage"
"resetdeps": "bash scripts/resetdeps.sh"
},
"tap": {
"test-env": [
@@ -3,6 +3,7 @@ set -e
set -x
rm -rf node_modules
rm -rf docs/node_modules
rm -rf smoke-tests/node_modules
rm -rf "workspaces/*/node_modules"
git checkout node_modules
node . i --ignore-scripts --no-audit --no-fund
@@ -0,0 +1,15 @@
/* 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 = {
root: true,
extends: [
'@npmcli',
...localConfigs,
],
}
@@ -0,0 +1,21 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

# ignore everything in the root
/*

# keep these
!/.eslintrc.local.*
!**/.gitignore
!/docs/
!/tap-snapshots/
!/test/
!/map.js
!/scripts/
!/README*
!/LICENSE*
!/CHANGELOG*
!/.eslintrc.js
!/.gitignore
!/bin/
!/lib/
!/package.json
@@ -0,0 +1,49 @@
{
"name": "smoke-tests",
"description": "The npm cli smoke tests",
"version": "1.0.0",
"private": true,
"scripts": {
"lint": "eslint \"**/*.js\"",
"postlint": "template-oss-check",
"template-oss-apply": "template-oss-apply --force",
"lintfix": "npm run lint -- --fix",
"preversion": "npm test",
"postversion": "git push origin --follow-tags",
"snap": "tap",
"test": "tap",
"posttest": "npm run lint"
},
"repository": {
"type": "git",
"url": "https://github.com/npm/cli.git",
"directory": "smoke-tests"
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/promise-spawn": "^3.0.0",
"@npmcli/template-oss": "3.3.2",
"minify-registry-metadata": "^2.2.0",
"rimraf": "^3.0.2",
"tap": "^16.0.1",
"which": "^2.0.2"
},
"author": "GitHub Inc.",
"license": "ISC",
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "3.3.2",
"workspaceRepo": false
},
"tap": {
"no-coverage": true,
"files": "test/index.js"
},
"files": [
"bin/",
"lib/"
],
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
}

0 comments on commit 672fce8

Please sign in to comment.