@fastify/autoload
Advanced tools
@@ -7,3 +7,2 @@ name: CI | ||
| - main | ||
| - master | ||
| - next | ||
@@ -21,2 +20,5 @@ - 'v*' | ||
| test: | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| uses: fastify/workflows/.github/workflows/plugins-ci.yml@v5 | ||
@@ -23,0 +25,0 @@ with: |
+10
-7
@@ -120,3 +120,3 @@ 'use strict' | ||
| runtime.tsimp || | ||
| runtime.nodeVersion >= 23 | ||
| runtime.supportNativeTypeScript | ||
| ) | ||
@@ -126,2 +126,11 @@ return cache.supportTypeScript | ||
| }, | ||
| supportNativeTypeScript: { | ||
| get () { | ||
| cache.supportNativeTypeScript ??= | ||
| /* c8 ignore start - The right-hand part of the branch is unreachable on v20 for the moment */ | ||
| process.features.typescript !== undefined && process.features.typescript !== false | ||
| /* c8 ignore end */ | ||
| return cache.supportNativeTypeScript | ||
| } | ||
| }, | ||
| forceESM: { | ||
@@ -137,8 +146,2 @@ get () { | ||
| }, | ||
| nodeVersion: { | ||
| get () { | ||
| cache.nodeVersion ??= Number(process.version.split('.')[0].slice(1)) | ||
| return cache.nodeVersion | ||
| }, | ||
| }, | ||
| }) | ||
@@ -145,0 +148,0 @@ |
+3
-3
| { | ||
| "name": "@fastify/autoload", | ||
| "version": "6.1.0", | ||
| "version": "6.2.0", | ||
| "description": "Require all plugins in a directory", | ||
@@ -84,3 +84,3 @@ "main": "index.js", | ||
| "borp": "^0.19.0", | ||
| "esbuild": "^0.24.0", | ||
| "esbuild": "^0.25.0", | ||
| "esbuild-register": "^3.5.0", | ||
@@ -101,3 +101,3 @@ "eslint": "^9.17.0", | ||
| "vite": "^6.0.2", | ||
| "vitest": "^2.0.3" | ||
| "vitest": "^3.0.4" | ||
| }, | ||
@@ -104,0 +104,0 @@ "jest": { |
+1
-1
| # @fastify/autoload | ||
| [](https://github.com/fastify/fastify-autoload/actions/workflows/ci.yml) | ||
| [](https://github.com/fastify/fastify-autoload/actions/workflows/ci.yml) | ||
| [](https://www.npmjs.com/package/@fastify/autoload) | ||
@@ -5,0 +5,0 @@ [](https://github.com/neostandard/neostandard) |
@@ -6,2 +6,6 @@ 'use strict' | ||
| if (runtime.supportNativeTypeScript) { | ||
| common() | ||
| } | ||
| function common () { | ||
@@ -28,5 +32,1 @@ const args = ['node', 'test/typescript-common/index.ts'] | ||
| } | ||
| if (runtime.nodeVersion >= 23) { | ||
| common() | ||
| } |
| 'use strict' | ||
| const { exec } = require('node:child_process') | ||
| const runtime = require('../lib/runtime') | ||
| const nodeVersion = Number(process.version.split('.')[0].slice(1)) | ||
| const args = [ | ||
| 'npx', | ||
| runtime.nodeVersion >= 18 ? '--node-options=--import=tsx' : '', | ||
| nodeVersion >= 18 ? '--node-options=--import=tsx' : '', | ||
| 'tsnd', | ||
@@ -10,0 +11,0 @@ 'test/typescript/basic.ts' |
@@ -9,4 +9,2 @@ 'use strict' | ||
| const typeStrippingEnabled = runtime.nodeVersion >= 23 | ||
| describe('independent module support - unexpected token', function () { | ||
@@ -56,3 +54,3 @@ const app = Fastify() | ||
| it('should return cannot import plugin typescript error', async function () { | ||
| if (typeStrippingEnabled) { | ||
| if (runtime.supportNativeTypeScript) { | ||
| assert.doesNotThrow(() => app.ready()) | ||
@@ -59,0 +57,0 @@ } else { |
@@ -27,3 +27,3 @@ 'use strict' | ||
| }) | ||
| if (runtime.nodeVersion >= 23) { | ||
| if (runtime.supportNativeTypeScript) { | ||
| assert.doesNotThrow(() => app.ready()) | ||
@@ -30,0 +30,0 @@ } else { |
| 'use script' | ||
| const t = require('tap') | ||
| const { test: t } = require('node:test') | ||
| const fastify = require('fastify') | ||
@@ -5,0 +5,0 @@ |
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
163609
0.16%4336
0.05%9
-10%