diff --git a/package.json b/package.json index 6d0dd1f..c042515 100644 --- a/package.json +++ b/package.json @@ -1,31 +1,19 @@ { "name": "@bomb.sh/args", - "publishConfig": { - "access": "public", - "provenance": true - }, - "type": "module", "version": "0.3.1", - "types": "./dist/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/bombshell-dev/args" - }, - "bugs": { - "url": "https://github.com/bombshell-dev/args/issues" - }, - "homepage": "https://github.com/bombshell-dev/args#README", - "scripts": { - "build": "node scripts/build.js && tsc -p .", - "bench": "node scripts/bench.js", - "dev": "vitest", - "fmt": "prettier --write \"**/*.{js,ts,md}\"", - "fmt:check": "prettier --list-different \"**/*.{js,ts,md}\"", - "test": "vitest run" + "type": "module", + "license": "MIT", + "author": { + "name": "Bombshell", + "email": "oss@bomb.sh", + "url": "https://bomb.sh" }, - "files": [ - "dist", - "CHANGELOG.md" + "homepage": "https://github.com/bombshell-dev/args", + "keywords": [ + "cli", + "args", + "yargs", + "minimist" ], "exports": { ".": { @@ -34,23 +22,15 @@ }, "./package.json": "./package.json" }, - "keywords": [ - "cli", - "args", - "yargs", - "minimist" - ], - "author": { - "name": "Nate Moore", - "email": "nate@natemoo.re", - "url": "https://natemoo.re" - }, - "license": "MIT", - "volta": { - "node": "22.14.0" + "scripts": { + "dev": "bsh dev", + "build": "bsh build", + "format": "bsh format", + "lint": "bsh lint", + "test": "vitest run" }, - "packageManager": "pnpm@10.7.0", "devDependencies": { + "@bomb.sh/tools": "^0.0.5", "@changesets/cli": "^2.18.1", "benchmark": "^2.1.4", "chalk": "^5.4.1", @@ -63,5 +43,29 @@ "typescript": "^4.7.4", "vitest": "^3.0.9", "yargs-parser": "^21.1.1" + }, + "publishConfig": { + "access": "public", + "provenance": true + }, + "repository": { + "type": "git", + "url": "https://github.com/bombshell-dev/args" + }, + "volta": { + "node": "22.14.0" + }, + "packageManager": "pnpm@10.7.0", + "devEngines": { + "runtime": { + "name": "node", + "version": "22.14.0", + "onFail": "error" + }, + "packageManager": { + "name": "pnpm", + "version": "10.7.0", + "onFail": "error" + } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8a5394..3c59847 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: devDependencies: + '@bomb.sh/tools': + specifier: ^0.0.5 + version: 0.0.5 '@changesets/cli': specifier: ^2.18.1 version: 2.27.11 @@ -51,6 +54,66 @@ packages: resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} + '@biomejs/biome@1.9.4': + resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} + engines: {node: '>=14.21.3'} + hasBin: true + + '@biomejs/cli-darwin-arm64@1.9.4': + resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + + '@biomejs/cli-darwin-x64@1.9.4': + resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + + '@biomejs/cli-linux-arm64-musl@1.9.4': + resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-arm64@1.9.4': + resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-x64-musl@1.9.4': + resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-linux-x64@1.9.4': + resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-win32-arm64@1.9.4': + resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + + '@biomejs/cli-win32-x64@1.9.4': + resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] + + '@bomb.sh/args@0.3.1': + resolution: {integrity: sha512-CwxKrfgcorUPP6KfYD59aRdBYWBTsfsxT+GmoLVnKo5Tmyoqbpo0UNcjngRMyU+6tiPbd18RuIYxhgAn44wU/Q==} + + '@bomb.sh/tools@0.0.5': + resolution: {integrity: sha512-1KTr9jAVUEbnaVhQLwi7KtYYnlZcymh7kkhY/Ti6/EOSFC7uuAq5/2vY9L+iRvUBkR6eKFgveRQKguyMOkMn4w==} + hasBin: true + '@changesets/apply-release-plan@7.0.7': resolution: {integrity: sha512-qnPOcmmmnD0MfMg9DjU1/onORFyRpDXkMMl2IJg9mECY6RnxL3wN0TCCc92b2sXt1jt8DgjAUUsZYGUGTdYIXA==} @@ -511,6 +574,10 @@ packages: engines: {node: '>=18'} hasBin: true + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} @@ -821,6 +888,9 @@ packages: tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + tinyexec@1.0.1: + resolution: {integrity: sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==} + tinypool@1.0.2: resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -946,6 +1016,51 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 + '@biomejs/biome@1.9.4': + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.9.4 + '@biomejs/cli-darwin-x64': 1.9.4 + '@biomejs/cli-linux-arm64': 1.9.4 + '@biomejs/cli-linux-arm64-musl': 1.9.4 + '@biomejs/cli-linux-x64': 1.9.4 + '@biomejs/cli-linux-x64-musl': 1.9.4 + '@biomejs/cli-win32-arm64': 1.9.4 + '@biomejs/cli-win32-x64': 1.9.4 + + '@biomejs/cli-darwin-arm64@1.9.4': + optional: true + + '@biomejs/cli-darwin-x64@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64@1.9.4': + optional: true + + '@biomejs/cli-linux-x64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-x64@1.9.4': + optional: true + + '@biomejs/cli-win32-arm64@1.9.4': + optional: true + + '@biomejs/cli-win32-x64@1.9.4': + optional: true + + '@bomb.sh/args@0.3.1': {} + + '@bomb.sh/tools@0.0.5': + dependencies: + '@biomejs/biome': 1.9.4 + '@bomb.sh/args': 0.3.1 + esbuild: 0.25.1 + escalade: 3.2.0 + tinyexec: 1.0.1 + '@changesets/apply-release-plan@7.0.7': dependencies: '@changesets/config': 3.0.5 @@ -1402,6 +1517,8 @@ snapshots: '@esbuild/win32-ia32': 0.25.1 '@esbuild/win32-x64': 0.25.1 + escalade@3.2.0: {} + esprima@4.0.1: {} estree-walker@3.0.3: @@ -1673,6 +1790,8 @@ snapshots: tinyexec@0.3.2: {} + tinyexec@1.0.1: {} + tinypool@1.0.2: {} tinyrainbow@2.0.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..efc037a --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +onlyBuiltDependencies: + - esbuild diff --git a/scripts/build.js b/scripts/build.js deleted file mode 100644 index b530c3c..0000000 --- a/scripts/build.js +++ /dev/null @@ -1,37 +0,0 @@ -import colors from 'chalk'; -import { build } from "esbuild"; -import { gzipSizeFromFileSync } from 'gzip-size'; -import bytes from 'pretty-bytes'; - -async function run() { - const files = ['src/index.ts']; - const output = {}; - const promises = []; - for (const file of files) { - promises.push( - build({ - metafile: true, - entryPoints: [file], - outfile: file.replace('src', 'dist').replace('.ts', '.js'), - external: ["../selector.js", "../index.js", "./index.js"], - bundle: true, - format: 'esm', - minify: true, - sourcemap: 'external', - target: 'node16', - platform: 'node', - }).then((metadata) => { - const file = Object.keys(metadata.metafile.outputs)[1] - const size = gzipSizeFromFileSync(file); - const b = bytes(size); - output[file] = b; - }) - ) - } - await Promise.all(promises); - for (const [file, size] of Object.entries(output).sort(([a], [b]) => a.localeCompare(b))) { - console.log(`${file} ${colors.green(size)}`); - } -} - -run();