mirror of
https://github.com/hanzoai/uuid.git
synced 2026-09-24 17:04:02 +00:00
fix: add TS unit test, pin to [email protected] (#860)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"scripts": {
|
||||
"build": "true",
|
||||
"start": "npm run build && npx http-server . -o",
|
||||
"pretest": "HUSKY=0 npm install --no-package-lock",
|
||||
"pretest": "rm -fr node_modules && npm install --no-package-lock",
|
||||
"test": "node node.js"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "npm install --no-package-lock && rm -rf dist && rollup -c",
|
||||
"build": "rm -fr node_modules && npm install --no-package-lock && rm -rf dist && rollup -c",
|
||||
"start": "npm run build && npx http-server . -o"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "npm install --no-package-lock && rm -rf dist && webpack",
|
||||
"build": "rm -fr node_modules && npm install --no-package-lock && rm -rf dist && webpack",
|
||||
"start": "npm run build && npx http-server . -o"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"pretest": "npm install --no-package-lock",
|
||||
"pretest": "rm -fr node_modules && npm install --no-package-lock",
|
||||
"test": "node example.js"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"scripts": {
|
||||
"test:package": "( node --version | grep -vq 'v16' ) || ( node --experimental-json-modules package.mjs )",
|
||||
"test:example": "node example.mjs",
|
||||
"pretest": "npm install --no-package-lock",
|
||||
"pretest": "rm -fr node_modules && npm install --no-package-lock",
|
||||
"test": "npm-run-all test:*"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"pretest": "npm install --no-package-lock",
|
||||
"pretest": "rm -fr node_modules && npm install --no-package-lock",
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "rm -rf dist && webpack",
|
||||
"pretest": "npm install --no-package-lock",
|
||||
"pretest": "rm -fr node_modules && npm install --no-package-lock",
|
||||
"test": "npm run build && node dist/v1.js && node dist/v4.js && node dist/v7.js && node dist/all.js"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# uuid test for typescript support (not really an example)
|
||||
|
||||
```
|
||||
npm install
|
||||
npm test
|
||||
```
|
||||
|
||||
This runs `tsc` using the oldest version of TypeScript supported by this project
|
||||
@@ -0,0 +1,3 @@
|
||||
import * as uuid from 'uuid';
|
||||
|
||||
console.log(uuid);
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"uuid": "file:../../.build/uuid.tgz"
|
||||
},
|
||||
"scripts": {
|
||||
"pretest": "rm -fr node_modules && npm install --no-package-lock",
|
||||
"test": "npx -y [email protected] -- tsc --noEmit"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
Generated
+8
-8
@@ -36,7 +36,7 @@
|
||||
"release-please": "16.15.0",
|
||||
"runmd": "1.4.1",
|
||||
"standard-version": "9.5.0",
|
||||
"typescript": "5.7.2",
|
||||
"typescript": "5.0.4",
|
||||
"typescript-eslint": "8.18.2"
|
||||
}
|
||||
},
|
||||
@@ -13534,9 +13534,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.7.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
|
||||
"integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
|
||||
"integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
@@ -13544,7 +13544,7 @@
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
"node": ">=12.20"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript-eslint": {
|
||||
@@ -23186,9 +23186,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"typescript": {
|
||||
"version": "5.7.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
|
||||
"integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
|
||||
"integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
|
||||
"dev": true
|
||||
},
|
||||
"typescript-eslint": {
|
||||
|
||||
+4
-3
@@ -68,7 +68,7 @@
|
||||
"release-please": "16.15.0",
|
||||
"runmd": "1.4.1",
|
||||
"standard-version": "9.5.0",
|
||||
"typescript": "5.7.2",
|
||||
"typescript": "5.0.4",
|
||||
"typescript-eslint": "8.18.2"
|
||||
},
|
||||
"optionalDevDependencies": {
|
||||
@@ -92,13 +92,14 @@
|
||||
"examples:node:commonjs:test": "cd examples/node-commonjs && npm test",
|
||||
"examples:node:esmodules:test": "cd examples/node-esmodules && npm test",
|
||||
"examples:node:jest:test": "cd examples/node-jest && npm test",
|
||||
"examples:node:typescript:test": "cd examples/typescript && npm test",
|
||||
"lint": "npm run eslint:check && npm run prettier:check",
|
||||
"md": "runmd --watch --output=README.md README_js.md",
|
||||
"prepack": "npm run build -- --no-pack",
|
||||
"prepare": "husky",
|
||||
"prepublishOnly": "npm run build",
|
||||
"pretest:benchmark": "npm run build",
|
||||
"pretest:browser": "./scripts/iodd && npm run build && npm-run-all examples:browser:**",
|
||||
"pretest:browser": "./scripts/iodd && npm run build && npm-run-all --parallel examples:browser:**",
|
||||
"pretest:node": "npm run build",
|
||||
"pretest": "npm run build",
|
||||
"prettier:check": "prettier --check .",
|
||||
@@ -106,7 +107,7 @@
|
||||
"release": "standard-version --no-verify",
|
||||
"test:benchmark": "cd examples/benchmark && npm test",
|
||||
"test:browser": "wdio run ./wdio.conf.js",
|
||||
"test:node": "npm-run-all examples:node:**",
|
||||
"test:node": "npm-run-all --parallel examples:node:**",
|
||||
"test:watch": "node --test --enable-source-maps --watch dist/esm/test/*.js",
|
||||
"test": "node --test --enable-source-maps dist/esm/test/*.js"
|
||||
},
|
||||
|
||||
+1
-1
@@ -63,8 +63,8 @@ done
|
||||
if [ "${1-}" != "--no-pack" ]; then
|
||||
# Prep tarball dir
|
||||
BUILD_DIR="$ROOT/.build"
|
||||
rm -rf "$BUILD_DIR"
|
||||
mkdir -p "$BUILD_DIR"
|
||||
rm -rf "$BUILD_DIR/uuid-*.tgz"
|
||||
|
||||
# Create tarball for local installation (in tests and examples)
|
||||
echo "Packing tarball"
|
||||
|
||||
+2
-1
@@ -5,5 +5,6 @@
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"target": "ES2022"
|
||||
}
|
||||
},
|
||||
"exclude": ["dist", "examples"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user