From c7d2479af6b31c0379b5681389301d70627d6bcc Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Fri, 11 Oct 2024 06:19:08 -0700 Subject: [PATCH] break: require Node 18+ --- packages/sirv-cli/bin.js | 2 +- packages/sirv-cli/package.json | 7 +++++-- packages/sirv/package.json | 17 +++++++++++++++-- 3 files changed, 21 insertions(+), 5 deletions(-) mode change 100644 => 100755 packages/sirv-cli/bin.js diff --git a/packages/sirv-cli/bin.js b/packages/sirv-cli/bin.js old mode 100644 new mode 100755 index 9a7d054..b1edeeb --- a/packages/sirv-cli/bin.js +++ b/packages/sirv-cli/bin.js @@ -1,7 +1,7 @@ #!/usr/bin/env node const sade = require('sade'); const boot = require('./index'); -const pkg = require('./package'); +const pkg = require('./package.json'); sade('sirv [dir]') .version(pkg.version) diff --git a/packages/sirv-cli/package.json b/packages/sirv-cli/package.json index b00db1a..02617a0 100644 --- a/packages/sirv-cli/package.json +++ b/packages/sirv-cli/package.json @@ -11,13 +11,16 @@ "bin": { "sirv": "bin.js" }, + "exports": { + "./package.json": "./package.json" + }, "author": { "name": "Luke Edwards", "email": "luke@lukeed.com", "url": "https://lukeed.com" }, "engines": { - "node": ">= 10" + "node": ">=18" }, "dependencies": { "console-clear": "^1.1.0", @@ -29,4 +32,4 @@ "sirv": "^2.0.0", "tinydate": "^1.0.0" } -} \ No newline at end of file +} diff --git a/packages/sirv/package.json b/packages/sirv/package.json index 143ed9d..d0353a8 100644 --- a/packages/sirv/package.json +++ b/packages/sirv/package.json @@ -11,17 +11,30 @@ "build.*", "sirv.d.ts" ], + "exports": { + ".": { + "import": { + "types": "./sirv.d.ts", + "default": "./build.mjs" + }, + "require": { + "types": "./sirv.d.ts", + "default": "./build.js" + } + }, + "./package.json": "./package.json" + }, "author": { "name": "Luke Edwards", "email": "luke@lukeed.com", "url": "https://lukeed.com" }, "engines": { - "node": ">= 10" + "node": ">=18" }, "dependencies": { "@polka/url": "^1.0.0-next.24", "mrmime": "^2.0.0", "totalist": "^3.0.0" } -} \ No newline at end of file +}