From ee1240d1047a91dc8a9e4767fbfffdc6e3aa57f8 Mon Sep 17 00:00:00 2001 From: Kevin Deng Date: Thu, 4 Jun 2026 19:31:35 +0900 Subject: [PATCH] chore: add `engines.node` field --- package.json | 36 +++++++++++--------- pnpm-lock.yaml | 90 +++++++++++++++++++++++++++++++++++++++++++++++--- tsconfig.json | 2 +- 3 files changed, 107 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 114dfac..e5490fc 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,23 @@ { "name": "obug", + "type": "module", "version": "1.0.2", "packageManager": "pnpm@11.5.1", "description": "A lightweight JavaScript debugging utility, forked from debug, featuring TypeScript and ESM support.", - "type": "module", + "author": "Kevin Deng ", "license": "MIT", + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], "homepage": "https://github.com/sxzz/obug#readme", - "bugs": { - "url": "https://github.com/sxzz/obug/issues" - }, "repository": { "type": "git", "url": "git+https://github.com/sxzz/obug.git" }, - "author": "Kevin Deng ", - "funding": [ - "https://github.com/sponsors/sxzz", - "https://opencollective.com/debug" - ], - "files": [ - "dist" - ], - "main": "./dist/node.js", - "module": "./dist/node.js", - "types": "./dist/browser.d.ts", + "bugs": { + "url": "https://github.com/sxzz/obug/issues" + }, "exports": { ".": { "browser": "./dist/browser.js", @@ -31,8 +25,17 @@ }, "./package.json": "./package.json" }, + "main": "./dist/node.js", + "module": "./dist/node.js", "unpkg": "./dist/browser.min.js", "jsdelivr": "./dist/browser.min.js", + "types": "./dist/browser.d.ts", + "files": [ + "dist" + ], + "engines": { + "node": ">=12.20.0" + }, "publishConfig": { "access": "public" }, @@ -44,7 +47,7 @@ "test": "vitest", "test:coverage": "vitest --project node --coverage", "play": "vite playground", - "typecheck": "tsc --noEmit", + "typecheck": "tsgo --noEmit", "format": "prettier --cache --write .", "release": "bumpp", "prepublishOnly": "pnpm run build" @@ -62,6 +65,7 @@ "@sxzz/prettier-config": "^2.3.1", "@types/debug": "^4.1.13", "@types/node": "^25.9.1", + "@typescript/native-preview": "7.0.0-dev.20260603.1", "@vitest/browser-playwright": "^4.1.8", "@vitest/coverage-v8": "^4.1.8", "bumpp": "^11.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9adb2a7..8003f39 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,6 +24,9 @@ importers: '@types/node': specifier: ^25.9.1 version: 25.9.1 + '@typescript/native-preview': + specifier: 7.0.0-dev.20260603.1 + version: 7.0.0-dev.20260603.1 '@vitest/browser-playwright': specifier: ^4.1.8 version: 4.1.8(playwright@1.60.0)(vite@8.0.16(@types/node@25.9.1)(jiti@2.7.0)(yaml@2.9.0))(vitest@4.1.8) @@ -47,7 +50,7 @@ importers: version: 3.8.3 tsdown: specifier: ^0.22.1 - version: 0.22.1(typescript@6.0.3) + version: 0.22.1(@typescript/native-preview@7.0.0-dev.20260603.1)(typescript@6.0.3) typescript: specifier: ^6.0.3 version: 6.0.3 @@ -618,6 +621,53 @@ packages: resolution: {integrity: sha512-EbGRQg4FhrmwLodl+t3JNAnXHWVr9Vp+Zl1QBZVPY4ByfkzIT8cX3K6QWODHtkIZqqJVEWvhHSx3v5PDHsaQag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript/native-preview-darwin-arm64@7.0.0-dev.20260603.1': + resolution: {integrity: sha512-BvaaQAHWaHA0nl26DsWTsXsKkCHqUTm7f5FMuNDyCU83Hvo7zHx0vpSTrzL+1KEWeWLUVVGA7U224dk+3yIosQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/native-preview-darwin-x64@7.0.0-dev.20260603.1': + resolution: {integrity: sha512-a2JJezvJAqWXgTAD1tKdWs7iA/4s3EakLcCYx4rg3ptEbBF6ADWv7A9ySHxT/+CQWYCD0DYIb9du1JUWL85fRw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/native-preview-linux-arm64@7.0.0-dev.20260603.1': + resolution: {integrity: sha512-MQ0JcRucLdcR6MT14wlrGNz9HaxJrFF8Axmo0IN6e5gSou2UrKKUvvAH1i8zU5Gm7jl8CWCLzzX/qGCi1TsinA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/native-preview-linux-arm@7.0.0-dev.20260603.1': + resolution: {integrity: sha512-GLsTfJQiGfTN+r1ezlxMcTd5MNYRB/tADD6Y1j1jfLjZsFYSVkNfCnDQA/jwUG6GddBBF+0Um7tBUP16emej9w==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/native-preview-linux-x64@7.0.0-dev.20260603.1': + resolution: {integrity: sha512-u6gvCiVGSDagdR2+GI5VJLPxJbGevATJgjZ2QFLKBLWI3re7liTGlPAuaINNDq/r0m9rUPj2rEn0zwqtcLK0nQ==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/native-preview-win32-arm64@7.0.0-dev.20260603.1': + resolution: {integrity: sha512-slxm6HBYs+jk0GpIBC2o03uY5qHgW7wIH+OTjK8JHbd2sUCgYV7P7bfZHUVZYi/cJZcVrnDW6MxXx734TuFn+w==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/native-preview-win32-x64@7.0.0-dev.20260603.1': + resolution: {integrity: sha512-G7SDZJn2Z9+c1qsAFzI/JL0OsRjJ18diQ39ycWKmJikilZZeL7iS7j933bemWY4ODaLTfxhMRKPMHf9292gpDA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + + '@typescript/native-preview@7.0.0-dev.20260603.1': + resolution: {integrity: sha512-CO519Ccw5rji4JIG0DGVMR5owraCeQhm94jM53eRhMdlzz0nAJcAZ63Y6m1u3dUwqGssqlYxh4CcwTFPxTpMYw==} + engines: {node: '>=16.20.0'} + hasBin: true + '@vitest/browser-playwright@4.1.8': resolution: {integrity: sha512-SR7FqgegaexEg73xvf3ArtygXegagMdXnL0EZMpxrWvvhQxvicD/E8p0ib0J91riPRtQUViyh67Xjw3NqvyhVg==} peerDependencies: @@ -2530,6 +2580,37 @@ snapshots: '@typescript-eslint/types': 8.60.1 eslint-visitor-keys: 5.0.1 + '@typescript/native-preview-darwin-arm64@7.0.0-dev.20260603.1': + optional: true + + '@typescript/native-preview-darwin-x64@7.0.0-dev.20260603.1': + optional: true + + '@typescript/native-preview-linux-arm64@7.0.0-dev.20260603.1': + optional: true + + '@typescript/native-preview-linux-arm@7.0.0-dev.20260603.1': + optional: true + + '@typescript/native-preview-linux-x64@7.0.0-dev.20260603.1': + optional: true + + '@typescript/native-preview-win32-arm64@7.0.0-dev.20260603.1': + optional: true + + '@typescript/native-preview-win32-x64@7.0.0-dev.20260603.1': + optional: true + + '@typescript/native-preview@7.0.0-dev.20260603.1': + optionalDependencies: + '@typescript/native-preview-darwin-arm64': 7.0.0-dev.20260603.1 + '@typescript/native-preview-darwin-x64': 7.0.0-dev.20260603.1 + '@typescript/native-preview-linux-arm': 7.0.0-dev.20260603.1 + '@typescript/native-preview-linux-arm64': 7.0.0-dev.20260603.1 + '@typescript/native-preview-linux-x64': 7.0.0-dev.20260603.1 + '@typescript/native-preview-win32-arm64': 7.0.0-dev.20260603.1 + '@typescript/native-preview-win32-x64': 7.0.0-dev.20260603.1 + '@vitest/browser-playwright@4.1.8(playwright@1.60.0)(vite@8.0.16(@types/node@25.9.1)(jiti@2.7.0)(yaml@2.9.0))(vitest@4.1.8)': dependencies: '@vitest/browser': 4.1.8(vite@8.0.16(@types/node@25.9.1)(jiti@2.7.0)(yaml@2.9.0))(vitest@4.1.8) @@ -3743,7 +3824,7 @@ snapshots: resolve-pkg-maps@1.0.0: {} - rolldown-plugin-dts@0.25.2(rolldown@1.0.3)(typescript@6.0.3): + rolldown-plugin-dts@0.25.2(@typescript/native-preview@7.0.0-dev.20260603.1)(rolldown@1.0.3)(typescript@6.0.3): dependencies: '@babel/generator': 8.0.0-rc.6 '@babel/helper-validator-identifier': 8.0.0-rc.6 @@ -3755,6 +3836,7 @@ snapshots: obug: 2.1.1 rolldown: 1.0.3 optionalDependencies: + '@typescript/native-preview': 7.0.0-dev.20260603.1 typescript: 6.0.3 transitivePeerDependencies: - oxc-resolver @@ -3853,7 +3935,7 @@ snapshots: dependencies: typescript: 6.0.3 - tsdown@0.22.1(typescript@6.0.3): + tsdown@0.22.1(@typescript/native-preview@7.0.0-dev.20260603.1)(typescript@6.0.3): dependencies: ansis: 4.3.1 cac: 7.0.0 @@ -3864,7 +3946,7 @@ snapshots: obug: 2.1.1 picomatch: 4.0.4 rolldown: 1.0.3 - rolldown-plugin-dts: 0.25.2(rolldown@1.0.3)(typescript@6.0.3) + rolldown-plugin-dts: 0.25.2(@typescript/native-preview@7.0.0-dev.20260603.1)(rolldown@1.0.3)(typescript@6.0.3) semver: 7.8.1 tinyexec: 1.2.4 tinyglobby: 0.2.17 diff --git a/tsconfig.json b/tsconfig.json index ba64d71..9d5a467 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,9 +11,9 @@ "strict": true, "noUnusedLocals": true, "declaration": true, - "isolatedDeclarations": true, "noEmit": true, "esModuleInterop": true, + "isolatedDeclarations": true, "isolatedModules": true, "verbatimModuleSyntax": true, "skipLibCheck": true -- 2.51.2