diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 21a8c68fcf..f3f3d11459 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -11,14 +11,14 @@ on: jobs: benchmark: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Setup Node.js environment uses: actions/setup-node@v4 with: - node-version: '*' + node-version: '22' cache: 'npm' check-latest: true diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index 1221aaa4c8..364b889cf2 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -12,7 +12,7 @@ defaults: jobs: fossa: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index e23983c9cc..638bf2a041 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -6,14 +6,14 @@ on: - releases/*/*/* jobs: prerelease: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: '*' + node-version: '22' check-latest: true registry-url: 'https://registry.npmjs.org' - name: Extract tag, version and package diff --git a/.github/workflows/stalebot.yml b/.github/workflows/stalebot.yml index 868fb1d840..9abdf847e5 100644 --- a/.github/workflows/stalebot.yml +++ b/.github/workflows/stalebot.yml @@ -5,7 +5,7 @@ on: jobs: stale: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/stale@v6.0.1 with: diff --git a/.github/workflows/typescript-nudge.yml b/.github/workflows/typescript-nudge.yml index bb1c0b0b5b..36fb1d7a55 100644 --- a/.github/workflows/typescript-nudge.yml +++ b/.github/workflows/typescript-nudge.yml @@ -10,7 +10,7 @@ on: name: TypeScript conversion nudge jobs: Nudge-to-convert-to-TypeScript-if-JavaScript-found: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 15d4f3abf0..d99a187e7c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -8,7 +8,7 @@ on: merge_group: jobs: e2e: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 timeout-minutes: 60 steps: # Sets an output parameter if this is a release PR @@ -27,7 +27,7 @@ jobs: if: ${{ !steps.release-check.outputs.IS_RELEASE }} - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 if: ${{ !steps.release-check.outputs.IS_RELEASE }} - name: Install dependencies run: npm ci @@ -49,12 +49,13 @@ jobs: timeout-minutes: 30 strategy: matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] - node-version: ['*'] + os: [ubuntu-24.04, macos-14, windows-2022] + node-version: ['22'] # Must include the minimum deno version from the `DENO_VERSION_RANGE` constant in `node/bridge.ts`. deno-version: ['v1.39.0', 'v1.46.3'] include: - - os: ubuntu-latest + - os: ubuntu-24.04 + # Earliest supported version node-version: '14.16.0' deno-version: 'v1.46.3' fail-fast: false @@ -63,7 +64,7 @@ jobs: # https://github.com/actions/virtual-environments/issues/268 - name: Increase open file limit run: sudo ulimit -Sn 65536 - if: "${{ matrix.os == 'macOS-latest' }}" + if: "${{ matrix.os == 'macos-14' }}" - run: git config --global core.symlinks true # Sets an output parameter if this is a release PR - name: Check for release @@ -121,56 +122,33 @@ jobs: timeout-minutes: 30 strategy: matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] - node-version: ['*'] + os: [ubuntu-24.04, macos-14, windows-2022] + node-version: ['22'] install-command: ['npm ci'] machine: ['0', '1', '2', '3', '4'] include: # We test on the oldest supported Node.js version, but only with a # single combination (Ubuntu) - - os: ubuntu-latest + - os: ubuntu-24.04 node-version: '14.16.0' install-command: npm ci machine: '0' - - os: ubuntu-latest + - os: ubuntu-24.04 node-version: '14.16.0' install-command: npm ci machine: '1' - - os: ubuntu-latest + - os: ubuntu-24.04 node-version: '14.16.0' install-command: npm ci machine: '2' - - os: ubuntu-latest + - os: ubuntu-24.04 node-version: '14.16.0' install-command: npm ci machine: '3' - - os: ubuntu-latest + - os: ubuntu-24.04 node-version: '14.16.0' install-command: npm ci machine: '4' - # The buildbot pins Netlify Build's dependencies, like `npm ci`. - # But other consumers do not, like `npm install`. - # So we test both. - - os: ubuntu-latest - node-version: '*' - install-command: npm install --no-package-lock - machine: '0' - - os: ubuntu-latest - node-version: '*' - install-command: npm install --no-package-lock - machine: '1' - - os: ubuntu-latest - node-version: '*' - install-command: npm install --no-package-lock - machine: '2' - - os: ubuntu-latest - node-version: '*' - install-command: npm install --no-package-lock - machine: '3' - - os: ubuntu-latest - node-version: '*' - install-command: npm install --no-package-lock - machine: '4' fail-fast: false steps: # Sets an output parameter if this is a release PR diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 016c494c90..8b99165044 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,18 +1,18 @@ { - "packages/build-info": "7.16.0", - "packages/build": "29.57.0", - "packages/edge-bundler": "12.3.0", + "packages/build-info": "7.17.0", + "packages/build": "29.58.0", + "packages/edge-bundler": "12.3.1", "packages/cache-utils": "5.2.0", - "packages/config": "20.20.0", + "packages/config": "20.21.0", "packages/framework-info": "9.9.0", - "packages/functions-utils": "5.3.0", + "packages/functions-utils": "5.3.1", "packages/git-utils": "5.2.0", - "packages/headers-parser": "7.2.0", + "packages/headers-parser": "7.3.0", "packages/js-client": "13.2.0", "packages/nock-udp": "3.2.0", - "packages/redirect-parser": "14.4.0", + "packages/redirect-parser": "14.5.0", "packages/run-utils": "5.2.0", "packages/opentelemetry-sdk-setup": "1.2.0", "packages/opentelemetry-utils": "1.3.0", - "packages/zip-it-and-ship-it": "9.42.0" + "packages/zip-it-and-ship-it": "9.42.1" } diff --git a/package-lock.json b/package-lock.json index 4868b08c35..ec03b1d930 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,10 @@ "resolved": "packages/git-utils", "link": true }, + "node_modules/@netlify/headers-parser": { + "resolved": "packages/headers-parser", + "link": true + }, "node_modules/@netlify/nock-udp": { "resolved": "packages/nock-udp", "link": true @@ -6702,6 +6706,10 @@ "node": "^14.14.0 || >=16.0.0" } }, + "node_modules/@netlify/redirect-parser": { + "resolved": "packages/redirect-parser", + "link": true + }, "node_modules/@netlify/run-utils": { "resolved": "packages/run-utils", "link": true @@ -8506,24 +8514,24 @@ "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "node_modules/@rollup/pluginutils": { - "version": "4.2.1", - "license": "MIT", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", + "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", "dependencies": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" }, "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/@rollup/pluginutils/node_modules/picomatch": { - "version": "2.3.1", - "license": "MIT", - "engines": { - "node": ">=8.6" + "node": ">=14.0.0" }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@rtsao/scc": { @@ -8703,7 +8711,6 @@ }, "node_modules/@types/estree": { "version": "1.0.5", - "dev": true, "license": "MIT" }, "node_modules/@types/glob": { @@ -9101,13 +9108,12 @@ "license": "ISC" }, "node_modules/@vercel/nft": { - "version": "0.27.6", - "resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.27.6.tgz", - "integrity": "sha512-mwuyUxskdcV8dd7N7JnxBgvFEz1D9UOePI/WyLLzktv6HSCwgPNQGit/UJ2IykAWGlypKw4pBQjOKWvIbXITSg==", - "license": "MIT", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.27.7.tgz", + "integrity": "sha512-FG6H5YkP4bdw9Ll1qhmbxuE8KwW2E/g8fJpM183fWQLeVDGqzeywMIeJ9h2txdWZ03psgWMn6QymTxaDLmdwUg==", "dependencies": { "@mapbox/node-pre-gyp": "^1.0.11", - "@rollup/pluginutils": "^4.0.0", + "@rollup/pluginutils": "^5.1.3", "acorn": "^8.6.0", "acorn-import-attributes": "^1.9.5", "async-sema": "^3.1.1", @@ -10644,9 +10650,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", - "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.3.tgz", + "integrity": "sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==", "dev": true, "funding": [ { @@ -10664,10 +10670,10 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001646", - "electron-to-chromium": "^1.5.4", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -11122,9 +11128,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001647", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001647.tgz", - "integrity": "sha512-n83xdNiyeNcHpzWY+1aFbqCK7LuLfBricc4+alSQL2Xb6OR3XpnQAmlDG+pQcdTfiHRuLcQ96VOfrPSGiNJYSg==", + "version": "1.0.30001688", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001688.tgz", + "integrity": "sha512-Nmqpru91cuABu/DTCXbM2NSRHzM2uVHfPnhJ/1zEAJx/ILBRVmz3pzH4N7DZqbdG0gWClsCC05Oj0mJ/1AWMbA==", "dev": true, "funding": [ { @@ -13782,9 +13788,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.4.tgz", - "integrity": "sha512-orzA81VqLyIGUEA77YkVA1D+N+nNfl2isJVjjmOyrlxuooZ19ynb+dOlaDTqd/idKRS9lDCSBmtzM+kyCsMnkA==", + "version": "1.5.73", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.73.tgz", + "integrity": "sha512-8wGNxG9tAG5KhGd3eeA0o6ixhiNdgr0DcHWm85XPCphwZgD1lIEoi6t3VERayWao7SF7AAZTw6oARGJeVjH8Kg==", "dev": true, "license": "ISC" }, @@ -14420,9 +14426,9 @@ } }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "license": "MIT", "engines": { "node": ">=6" @@ -15221,7 +15227,8 @@ }, "node_modules/estree-walker": { "version": "2.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" }, "node_modules/esutils": { "version": "2.0.3", @@ -20049,14 +20056,6 @@ "resolved": "packages/js-client", "link": true }, - "node_modules/netlify-headers-parser": { - "resolved": "packages/headers-parser", - "link": true - }, - "node_modules/netlify-redirect-parser": { - "resolved": "packages/redirect-parser", - "link": true - }, "node_modules/nise": { "version": "5.1.5", "dev": true, @@ -20291,9 +20290,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "dev": true, "license": "MIT" }, @@ -21925,18 +21924,17 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC" }, "node_modules/picomatch": { - "version": "3.0.1", - "license": "MIT", - "optional": true, - "peer": true, + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" @@ -23177,7 +23175,7 @@ }, "node_modules/rollup": { "version": "3.29.4", - "dev": true, + "devOptional": true, "license": "MIT", "bin": { "rollup": "dist/bin/rollup" @@ -25105,9 +25103,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", - "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "dev": true, "funding": [ { @@ -25125,8 +25123,8 @@ ], "license": "MIT", "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -26347,21 +26345,21 @@ }, "packages/build": { "name": "@netlify/build", - "version": "29.57.0", + "version": "29.58.0", "license": "MIT", "dependencies": { "@bugsnag/js": "^7.0.0", "@netlify/blobs": "^7.4.0", "@netlify/cache-utils": "^5.2.0", - "@netlify/config": "^20.20.0", - "@netlify/edge-bundler": "12.3.0", + "@netlify/config": "^20.21.0", + "@netlify/edge-bundler": "12.3.1", "@netlify/framework-info": "^9.9.0", - "@netlify/functions-utils": "^5.3.0", + "@netlify/functions-utils": "^5.3.1", "@netlify/git-utils": "^5.2.0", "@netlify/opentelemetry-utils": "^1.3.0", "@netlify/plugins-list": "^6.80.0", "@netlify/run-utils": "^5.2.0", - "@netlify/zip-it-and-ship-it": "9.42.0", + "@netlify/zip-it-and-ship-it": "9.42.1", "@sindresorhus/slugify": "^2.0.0", "ansi-escapes": "^6.0.0", "chalk": "^5.0.0", @@ -26454,7 +26452,7 @@ }, "packages/build-info": { "name": "@netlify/build-info", - "version": "7.16.0", + "version": "7.17.0", "license": "MIT", "dependencies": { "@bugsnag/js": "^7.20.0", @@ -26669,10 +26667,12 @@ }, "packages/config": { "name": "@netlify/config", - "version": "20.20.0", + "version": "20.21.0", "license": "MIT", "dependencies": { "@iarna/toml": "^2.2.5", + "@netlify/headers-parser": "^7.3.0", + "@netlify/redirect-parser": "^14.5.0", "chalk": "^5.0.0", "cron-parser": "^4.1.0", "deepmerge": "^4.2.2", @@ -26687,8 +26687,6 @@ "js-yaml": "^4.0.0", "map-obj": "^5.0.0", "netlify": "^13.2.0", - "netlify-headers-parser": "^7.2.0", - "netlify-redirect-parser": "^14.4.0", "node-fetch": "^3.3.1", "omit.js": "^2.0.2", "p-locate": "^6.0.0", @@ -26789,11 +26787,11 @@ }, "packages/edge-bundler": { "name": "@netlify/edge-bundler", - "version": "12.3.0", + "version": "12.3.1", "license": "MIT", "dependencies": { "@import-maps/resolve": "^1.0.1", - "@vercel/nft": "^0.27.0", + "@vercel/nft": "0.27.7", "ajv": "^8.11.2", "ajv-errors": "^3.0.0", "better-ajv-errors": "^1.2.0", @@ -27159,10 +27157,10 @@ }, "packages/functions-utils": { "name": "@netlify/functions-utils", - "version": "5.3.0", + "version": "5.3.1", "license": "MIT", "dependencies": { - "@netlify/zip-it-and-ship-it": "9.42.0", + "@netlify/zip-it-and-ship-it": "9.42.1", "cpy": "^9.0.0", "path-exists": "^5.0.0" }, @@ -27272,8 +27270,8 @@ } }, "packages/headers-parser": { - "name": "netlify-headers-parser", - "version": "7.2.0", + "name": "@netlify/headers-parser", + "version": "7.3.0", "license": "MIT", "dependencies": { "@iarna/toml": "^2.2.5", @@ -27394,8 +27392,8 @@ } }, "packages/redirect-parser": { - "name": "netlify-redirect-parser", - "version": "14.4.0", + "name": "@netlify/redirect-parser", + "version": "14.5.0", "license": "MIT", "dependencies": { "@iarna/toml": "^2.2.5", @@ -27614,14 +27612,14 @@ }, "packages/zip-it-and-ship-it": { "name": "@netlify/zip-it-and-ship-it", - "version": "9.42.0", + "version": "9.42.1", "license": "MIT", "dependencies": { "@babel/parser": "^7.22.5", "@babel/types": "7.26.3", "@netlify/binary-info": "^1.0.0", "@netlify/serverless-functions-api": "^1.31.1", - "@vercel/nft": "^0.27.1", + "@vercel/nft": "0.27.7", "archiver": "^7.0.0", "common-path-prefix": "^3.0.0", "cp-file": "^10.0.0", @@ -27668,7 +27666,7 @@ "@types/unixify": "1.0.2", "@types/yargs": "17.0.32", "@vitest/coverage-v8": "0.34.6", - "browserslist": "4.23.3", + "browserslist": "4.24.3", "cardinal": "2.1.1", "cpy": "9.0.1", "decompress": "4.2.1", diff --git a/packages/build-info/CHANGELOG.md b/packages/build-info/CHANGELOG.md index e56e6f5097..9b44d4d232 100644 --- a/packages/build-info/CHANGELOG.md +++ b/packages/build-info/CHANGELOG.md @@ -64,6 +64,13 @@ * dependencies * @netlify/framework-info bumped from ^9.8.8 to ^9.8.9 +## [7.17.0](https://github.com/netlify/build/compare/build-info-v7.16.0...build-info-v7.17.0) (2024-12-16) + + +### Features + +* **@netlify/build-info:** add React Router 7 detection ([#5930](https://github.com/netlify/build/issues/5930)) ([2289a78](https://github.com/netlify/build/commit/2289a7884fc0a2fc34b86b60464441d8cb70d4bd)) + ## [7.16.0](https://github.com/netlify/build/compare/build-info-v7.15.2...build-info-v7.16.0) (2024-12-11) diff --git a/packages/build-info/assets/logos/react-router/dark.svg b/packages/build-info/assets/logos/react-router/dark.svg new file mode 100644 index 0000000000..dd82028944 --- /dev/null +++ b/packages/build-info/assets/logos/react-router/dark.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/build-info/assets/logos/react-router/light.svg b/packages/build-info/assets/logos/react-router/light.svg new file mode 100644 index 0000000000..73284929d3 --- /dev/null +++ b/packages/build-info/assets/logos/react-router/light.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/build-info/package.json b/packages/build-info/package.json index d61f874d0c..a840d87b30 100644 --- a/packages/build-info/package.json +++ b/packages/build-info/package.json @@ -1,6 +1,6 @@ { "name": "@netlify/build-info", - "version": "7.16.0", + "version": "7.17.0", "description": "Build info utility", "type": "module", "exports": { diff --git a/packages/build-info/src/frameworks/index.ts b/packages/build-info/src/frameworks/index.ts index 9cd1b52edc..1fe19e31f4 100644 --- a/packages/build-info/src/frameworks/index.ts +++ b/packages/build-info/src/frameworks/index.ts @@ -28,6 +28,7 @@ import { Parcel } from './parcel.js' import { Phenomic } from './phenomic.js' import { Quasar } from './quasar.js' import { Qwik } from './qwik.js' +import { ReactRouter } from './react-router.js' import { ReactStatic } from './react-static.js' import { CreateReactApp } from './react.js' import { RedwoodJS } from './redwoodjs.js' @@ -65,6 +66,7 @@ export const frameworks = [ Nuxt, Phenomic, Qwik, + ReactRouter, ReactStatic, RedwoodJS, Remix, diff --git a/packages/build-info/src/frameworks/react-router.test.ts b/packages/build-info/src/frameworks/react-router.test.ts new file mode 100644 index 0000000000..805e15daee --- /dev/null +++ b/packages/build-info/src/frameworks/react-router.test.ts @@ -0,0 +1,101 @@ +import { beforeEach, expect, test } from 'vitest' + +import { mockFileSystem } from '../../tests/mock-file-system.js' +import { NodeFS } from '../node/file-system.js' +import { Project } from '../project.js' + +beforeEach((ctx) => { + ctx.fs = new NodeFS() +}) +test('detects a site using React Router v7 as a framework', async ({ fs }) => { + const cwd = mockFileSystem({ + 'react-router.config.ts': '', + 'vite.config.ts': '', + 'package.json': JSON.stringify({ + scripts: { + build: 'react-router build', + dev: 'react-router dev', + start: 'react-router-serve ./build/server/index.js', + typecheck: 'react-router typegen && tsc', + }, + dependencies: { + '@react-router/node': '^7.0.2', + '@react-router/serve': '^7.0.2', + react: '^18.3.1', + 'react-dom': '^18.3.1', + 'react-router': '^7.0.2', + }, + devDependencies: { + '@netlify/vite-plugin-react-router': '^1.0.0', + '@react-router/dev': '^7.0.2', + typescript: '^5.6.3', + vite: '^5.4.11', + 'vite-tsconfig-paths': '^5.1.2', + }, + }), + }) + const detected = await new Project(fs, cwd).detectFrameworks() + + const detectedFrameworks = (detected ?? []).map((framework) => framework.id) + expect(detectedFrameworks).not.toContain('remix') + + expect(detected?.[0]?.id).toBe('react-router') + expect(detected?.[0]?.build?.command).toBe('react-router build') + expect(detected?.[0]?.build?.directory).toBe('build/client') + expect(detected?.[0]?.dev?.command).toBe('react-router dev') + expect(detected?.[0]?.dev?.port).toBe(5173) +}) + +test('does NOT detect a site using React Router v7 as a library', async ({ fs }) => { + const cwd = mockFileSystem({ + 'rollup.config.ts': '', + 'package.json': JSON.stringify({ + scripts: { + build: 'rollup build', + dev: 'rollup dev', + typecheck: 'react-router typegen && tsc', + }, + dependencies: { + react: '^18.3.1', + 'react-dom': '^18.3.1', + 'react-router': '^7.0.2', + }, + devDependencies: { + rollup: '^4.28.1', + typescript: '^5.6.3', + }, + }), + }) + const detected = await new Project(fs, cwd).detectFrameworks() + + const detectedFrameworks = (detected ?? []).map((framework) => framework.id) + expect(detectedFrameworks).not.toContain('react-router') +}) + +test('does NOT detect a React Router { + const cwd = mockFileSystem({ + 'vite.config.ts': '', + 'package.json': JSON.stringify({ + scripts: { + build: 'vite build', + dev: 'vite dev', + }, + dependencies: { + react: '^18.2.0', + 'react-dom': '^18.2.0', + 'react-router-dom': '^6.15.0', + }, + devDependencies: { + '@vitejs/plugin-react': '^3.0.1', + typescript: '^4.9.5', + vite: '^4.0.4', + }, + }), + }) + const detected = await new Project(fs, cwd).detectFrameworks() + + const detectedFrameworks = (detected ?? []).map((framework) => framework.id) + expect(detectedFrameworks).not.toContain('react-router') + + expect(detected?.[0]?.id).toBe('vite') +}) diff --git a/packages/build-info/src/frameworks/react-router.ts b/packages/build-info/src/frameworks/react-router.ts new file mode 100644 index 0000000000..929688121d --- /dev/null +++ b/packages/build-info/src/frameworks/react-router.ts @@ -0,0 +1,43 @@ +import { lt } from 'semver' + +import { BaseFramework, Category, DetectedFramework, Framework } from './framework.js' + +export class ReactRouter extends BaseFramework implements Framework { + readonly id = 'react-router' + name = 'React Router' + // React Router 7+ can be used either as a library or as a framework. We want to ignore lib mode (and possibly let + // other frameworks/bundlers/runners be detected). There isn't a perfect way to identify a site's mode, but at the + // time of writing both `@react-router/dev` and `react-router.config` should only be present in framework mode. + npmDependencies = ['@react-router/dev'] + configFiles = ['react-router.config.ts', 'react-router.config.js'] + category = Category.SSG + + dev = { + port: 5173, + command: 'react-router dev', + } + + build = { + command: 'react-router build', + directory: 'build/client', + } + + logo = { + default: '/logos/react-router/light.svg', + light: '/logos/react-router/light.svg', + dark: '/logos/react-router/dark.svg', + } + + async detect(): Promise { + await super.detect() + + if (this.detected) { + // React Router wasn't a framework before v7. As of v7, it's... Remix. + if (this.version && lt(this.version, '7.0.0')) { + return + } + + return this as DetectedFramework + } + } +} diff --git a/packages/build/CHANGELOG.md b/packages/build/CHANGELOG.md index 258699e2e2..bd85b6fdbf 100644 --- a/packages/build/CHANGELOG.md +++ b/packages/build/CHANGELOG.md @@ -105,6 +105,23 @@ * dependencies * @netlify/config bumped from ^20.8.0 to ^20.8.1 +## [29.58.0](https://github.com/netlify/build/compare/build-v29.57.0...build-v29.58.0) (2024-12-14) + + +### Features + +* **build:** Add trace attribute to track builds failing from Netlify maintained extensions ([#5914](https://github.com/netlify/build/issues/5914)) ([7e99c26](https://github.com/netlify/build/commit/7e99c263f1f47d0982c0a6ee3053163d43980844)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @netlify/config bumped from ^20.20.0 to ^20.21.0 + * @netlify/edge-bundler bumped from 12.3.0 to 12.3.1 + * @netlify/functions-utils bumped from ^5.3.0 to ^5.3.1 + * @netlify/zip-it-and-ship-it bumped from 9.42.0 to 9.42.1 + ## [29.57.0](https://github.com/netlify/build/compare/build-v29.56.1...build-v29.57.0) (2024-12-11) diff --git a/packages/build/package.json b/packages/build/package.json index c6f794167a..6149aa64df 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -1,6 +1,6 @@ { "name": "@netlify/build", - "version": "29.57.0", + "version": "29.58.0", "description": "Netlify build module", "type": "module", "exports": "./lib/index.js", @@ -70,15 +70,15 @@ "@bugsnag/js": "^7.0.0", "@netlify/blobs": "^7.4.0", "@netlify/cache-utils": "^5.2.0", - "@netlify/config": "^20.20.0", - "@netlify/edge-bundler": "12.3.0", + "@netlify/config": "^20.21.0", + "@netlify/edge-bundler": "12.3.1", "@netlify/framework-info": "^9.9.0", - "@netlify/functions-utils": "^5.3.0", + "@netlify/functions-utils": "^5.3.1", "@netlify/git-utils": "^5.2.0", "@netlify/opentelemetry-utils": "^1.3.0", "@netlify/plugins-list": "^6.80.0", "@netlify/run-utils": "^5.2.0", - "@netlify/zip-it-and-ship-it": "9.42.0", + "@netlify/zip-it-and-ship-it": "9.42.1", "@sindresorhus/slugify": "^2.0.0", "ansi-escapes": "^6.0.0", "chalk": "^5.0.0", diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index 8461d72d53..469d1607c2 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -76,6 +76,27 @@ * dependencies * netlify bumped from ^13.1.8 to ^13.1.9 +## [20.21.0](https://github.com/netlify/build/compare/config-v20.20.0...config-v20.21.0) (2024-12-14) + + +### Features + +* **build:** Add trace attribute to track builds failing from Netlify maintained extensions ([#5914](https://github.com/netlify/build/issues/5914)) ([7e99c26](https://github.com/netlify/build/commit/7e99c263f1f47d0982c0a6ee3053163d43980844)) +* rename unscoped NPM packages ([#5943](https://github.com/netlify/build/issues/5943)) ([131a644](https://github.com/netlify/build/commit/131a644bfde5205f730f3369b778d8914c7c0382)) + + +### Bug Fixes + +* fail build when extension failed to be retrieved ([#5915](https://github.com/netlify/build/issues/5915)) ([20c7359](https://github.com/netlify/build/commit/20c73593deda6fc4a570fc7b71178687a693e03d)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @netlify/headers-parser bumped from ^7.2.0 to ^7.3.0 + * @netlify/redirect-parser bumped from ^14.4.0 to ^14.5.0 + ## [20.20.0](https://github.com/netlify/build/compare/config-v20.19.1...config-v20.20.0) (2024-12-11) diff --git a/packages/config/docs/main.md b/packages/config/docs/main.md index 569023242a..2d54cb7514 100644 --- a/packages/config/docs/main.md +++ b/packages/config/docs/main.md @@ -150,11 +150,10 @@ Redirects configuration is more complicated: - It can be specified either in `netlify.toml` or in a separate `_redirects` file located in the publish directory and with its own Netlify-specific file format -Therefore, that logic is abstracted to -[its own module `netlify-redirect-parser`](https://github.com/netlify/netlify-redirect-parser). +Therefore, that logic is abstracted to [its own module `@netlify/redirect-parser`](../../redirect-parser). Headers are handled very similarly to redirects, for consistency. They use a separate `_headers` file -[and `netlify-headers-parser` module](https://github.com/netlify/netlify-headers-parser). +[and `@netlify/headers-parser` module](../../headers-parser). ## Context-specific configuration diff --git a/packages/config/package.json b/packages/config/package.json index 93f8cbc5be..94b4efec12 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,6 +1,6 @@ { "name": "@netlify/config", - "version": "20.20.0", + "version": "20.21.0", "description": "Netlify config module", "type": "module", "exports": "./lib/index.js", @@ -73,8 +73,8 @@ "js-yaml": "^4.0.0", "map-obj": "^5.0.0", "netlify": "^13.2.0", - "netlify-headers-parser": "^7.2.0", - "netlify-redirect-parser": "^14.4.0", + "@netlify/headers-parser": "^7.3.0", + "@netlify/redirect-parser": "^14.5.0", "node-fetch": "^3.3.1", "omit.js": "^2.0.2", "p-locate": "^6.0.0", diff --git a/packages/config/src/headers.js b/packages/config/src/headers.js index cc35eb5181..c9ff8c0bbd 100644 --- a/packages/config/src/headers.js +++ b/packages/config/src/headers.js @@ -1,6 +1,6 @@ import { resolve } from 'path' -import { parseAllHeaders } from 'netlify-headers-parser' +import { parseAllHeaders } from '@netlify/headers-parser' import { warnHeadersParsing, warnHeadersCaseSensitivity } from './log/messages.js' diff --git a/packages/config/src/redirects.ts b/packages/config/src/redirects.ts index dbb1466fc5..e7a3c1c8db 100644 --- a/packages/config/src/redirects.ts +++ b/packages/config/src/redirects.ts @@ -1,6 +1,6 @@ import { resolve } from 'path' -import { parseAllRedirects } from 'netlify-redirect-parser' +import { parseAllRedirects } from '@netlify/redirect-parser' import { warnRedirectsParsing } from './log/messages.js' diff --git a/packages/edge-bundler/CHANGELOG.md b/packages/edge-bundler/CHANGELOG.md index 2241c259c6..66a27c9640 100644 --- a/packages/edge-bundler/CHANGELOG.md +++ b/packages/edge-bundler/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [12.3.1](https://github.com/netlify/build/compare/edge-bundler-v12.3.0...edge-bundler-v12.3.1) (2024-12-14) + + +### Bug Fixes + +* **deps:** pin @vercel/nft due to breaking change in patch ([#5944](https://github.com/netlify/build/issues/5944)) ([e8e29f0](https://github.com/netlify/build/commit/e8e29f027b09631b7c66dee35c874f8533003d46)) + ## [12.3.0](https://github.com/netlify/build/compare/edge-bundler-v12.2.3...edge-bundler-v12.3.0) (2024-12-11) diff --git a/packages/edge-bundler/package.json b/packages/edge-bundler/package.json index 41636eb1f3..0a194acc13 100644 --- a/packages/edge-bundler/package.json +++ b/packages/edge-bundler/package.json @@ -1,6 +1,6 @@ { "name": "@netlify/edge-bundler", - "version": "12.3.0", + "version": "12.3.1", "description": "Intelligently prepare Netlify Edge Functions for deployment", "type": "module", "main": "./dist/node/index.js", @@ -61,7 +61,7 @@ }, "dependencies": { "@import-maps/resolve": "^1.0.1", - "@vercel/nft": "^0.27.0", + "@vercel/nft": "0.27.7", "ajv": "^8.11.2", "ajv-errors": "^3.0.0", "better-ajv-errors": "^1.2.0", diff --git a/packages/functions-utils/CHANGELOG.md b/packages/functions-utils/CHANGELOG.md index aafb91e0b0..db4c6544b1 100644 --- a/packages/functions-utils/CHANGELOG.md +++ b/packages/functions-utils/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [5.3.1](https://github.com/netlify/build/compare/functions-utils-v5.3.0...functions-utils-v5.3.1) (2024-12-14) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @netlify/zip-it-and-ship-it bumped from 9.42.0 to 9.42.1 + ## [5.3.0](https://github.com/netlify/build/compare/functions-utils-v5.2.93...functions-utils-v5.3.0) (2024-12-11) diff --git a/packages/functions-utils/package.json b/packages/functions-utils/package.json index 5d843fe09a..b703f5d1c4 100644 --- a/packages/functions-utils/package.json +++ b/packages/functions-utils/package.json @@ -1,6 +1,6 @@ { "name": "@netlify/functions-utils", - "version": "5.3.0", + "version": "5.3.1", "description": "Utility for adding Functions files in Netlify Build", "type": "module", "exports": "./lib/main.js", @@ -50,7 +50,7 @@ }, "license": "MIT", "dependencies": { - "@netlify/zip-it-and-ship-it": "9.42.0", + "@netlify/zip-it-and-ship-it": "9.42.1", "cpy": "^9.0.0", "path-exists": "^5.0.0" }, diff --git a/packages/functions-utils/tests/main.test.ts b/packages/functions-utils/tests/main.test.ts index e5f2c579b1..4ad80e2396 100644 --- a/packages/functions-utils/tests/main.test.ts +++ b/packages/functions-utils/tests/main.test.ts @@ -1,6 +1,6 @@ -import { rm } from 'fs/promises' +import { readFile, rm } from 'fs/promises' import { normalize } from 'path' -import { fileURLToPath, pathToFileURL } from 'url' +import { fileURLToPath } from 'url' import cpy from 'cpy' import { pathExists } from 'path-exists' @@ -77,21 +77,22 @@ test('Should copy a source file even if dist directory already exists', async () test('Should overwrite dist file if it already exists', async () => { const dist = await getDist() const fixtureDir = `${FIXTURES_DIR}/file` + const testModule = `${dist}/test.mjs` await cpy(`${fixtureDir}/test.mjs`, fixtureDir, { rename: 'test.mjs.backup' }) try { await add(`${fixtureDir}/test.mjs`, dist) - const { func1 } = await import(`${pathToFileURL(`${dist}/test.mjs`).href}?one`) + const file1 = await readFile(testModule, 'utf8') await cpy(`${fixtureDir}/test_2.mjs`, fixtureDir, { rename: 'test.mjs' }) await add(`${fixtureDir}/test.mjs`, dist) - const { func2 } = await import(`${pathToFileURL(`${dist}/test.mjs`).href}?two`) + const file2 = await readFile(testModule, 'utf8') - expect(func1()).toBe('one') - expect(func2()).toBe('two') + expect(file1).toContain('one') + expect(file2).toContain('two') } finally { await cpy(`${fixtureDir}/test.mjs.backup`, fixtureDir, { rename: 'test.mjs' }) await rm(`${fixtureDir}/test.mjs.backup`, { force: true }) diff --git a/packages/headers-parser/CHANGELOG.md b/packages/headers-parser/CHANGELOG.md index 24e9abefde..d97fc522fc 100644 --- a/packages/headers-parser/CHANGELOG.md +++ b/packages/headers-parser/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [7.3.0](https://github.com/netlify/build/compare/headers-parser-v7.2.0...headers-parser-v7.3.0) (2024-12-14) + + +### Features + +* add node 22 to supported versions list ([#5917](https://github.com/netlify/build/issues/5917)) ([5455393](https://github.com/netlify/build/commit/545539369a3f1a0e9d2036df7d41a8bed1df8272)) +* rename unscoped NPM packages ([#5943](https://github.com/netlify/build/issues/5943)) ([131a644](https://github.com/netlify/build/commit/131a644bfde5205f730f3369b778d8914c7c0382)) + + +### Bug Fixes + +* switch to @iarna/toml ([#5508](https://github.com/netlify/build/issues/5508)) ([ba81c85](https://github.com/netlify/build/commit/ba81c85aad902380d24fc1722bc65d4feed24b84)) + ## [7.2.0](https://github.com/netlify/build/compare/netlify-headers-parser-v7.1.4...netlify-headers-parser-v7.2.0) (2024-12-11) diff --git a/packages/headers-parser/package.json b/packages/headers-parser/package.json index 0fdb4cbff3..10363f5be6 100644 --- a/packages/headers-parser/package.json +++ b/packages/headers-parser/package.json @@ -1,6 +1,6 @@ { - "name": "netlify-headers-parser", - "version": "7.2.0", + "name": "@netlify/headers-parser", + "version": "7.3.0", "description": "Parses Netlify headers into a JavaScript object representation", "type": "module", "exports": "./lib/index.js", diff --git a/packages/redirect-parser/CHANGELOG.md b/packages/redirect-parser/CHANGELOG.md index 375cb13b50..afa320bb5f 100644 --- a/packages/redirect-parser/CHANGELOG.md +++ b/packages/redirect-parser/CHANGELOG.md @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +## [14.5.0](https://github.com/netlify/build/compare/redirect-parser-v14.4.0...redirect-parser-v14.5.0) (2024-12-14) + + +### Features + +* add node 22 to supported versions list ([#5917](https://github.com/netlify/build/issues/5917)) ([5455393](https://github.com/netlify/build/commit/545539369a3f1a0e9d2036df7d41a8bed1df8272)) +* parse custom rate limit info from redirects ([#5623](https://github.com/netlify/build/issues/5623)) ([ef4e615](https://github.com/netlify/build/commit/ef4e6157e3060efef4c5006ba891f05909586296)) +* rename unscoped NPM packages ([#5943](https://github.com/netlify/build/issues/5943)) ([131a644](https://github.com/netlify/build/commit/131a644bfde5205f730f3369b778d8914c7c0382)) + + +### Bug Fixes + +* switch to @iarna/toml ([#5508](https://github.com/netlify/build/issues/5508)) ([ba81c85](https://github.com/netlify/build/commit/ba81c85aad902380d24fc1722bc65d4feed24b84)) + ## [14.4.0](https://github.com/netlify/build/compare/netlify-redirect-parser-v14.3.0...netlify-redirect-parser-v14.4.0) (2024-12-11) diff --git a/packages/redirect-parser/package.json b/packages/redirect-parser/package.json index f5d2b63f27..a8fd4a75a1 100644 --- a/packages/redirect-parser/package.json +++ b/packages/redirect-parser/package.json @@ -1,6 +1,6 @@ { - "name": "netlify-redirect-parser", - "version": "14.4.0", + "name": "@netlify/redirect-parser", + "version": "14.5.0", "description": "Parses netlify redirects into a js object representation", "type": "module", "exports": "./lib/index.js", diff --git a/packages/zip-it-and-ship-it/CHANGELOG.md b/packages/zip-it-and-ship-it/CHANGELOG.md index d84cf108a9..b140d56e51 100644 --- a/packages/zip-it-and-ship-it/CHANGELOG.md +++ b/packages/zip-it-and-ship-it/CHANGELOG.md @@ -7,6 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +## [9.42.1](https://github.com/netlify/build/compare/zip-it-and-ship-it-v9.42.0...zip-it-and-ship-it-v9.42.1) (2024-12-14) + + +### Bug Fixes + +* **deps:** pin @vercel/nft due to breaking change in patch ([#5944](https://github.com/netlify/build/issues/5944)) ([e8e29f0](https://github.com/netlify/build/commit/e8e29f027b09631b7c66dee35c874f8533003d46)) + ## [9.42.0](https://github.com/netlify/build/compare/zip-it-and-ship-it-v9.41.1...zip-it-and-ship-it-v9.42.0) (2024-12-11) diff --git a/packages/zip-it-and-ship-it/package.json b/packages/zip-it-and-ship-it/package.json index 4cce1fa950..b2e01f2182 100644 --- a/packages/zip-it-and-ship-it/package.json +++ b/packages/zip-it-and-ship-it/package.json @@ -1,6 +1,6 @@ { "name": "@netlify/zip-it-and-ship-it", - "version": "9.42.0", + "version": "9.42.1", "description": "Zip it and ship it", "main": "./dist/main.js", "type": "module", @@ -45,7 +45,7 @@ "@babel/types": "7.26.3", "@netlify/binary-info": "^1.0.0", "@netlify/serverless-functions-api": "^1.31.1", - "@vercel/nft": "^0.27.1", + "@vercel/nft": "0.27.7", "archiver": "^7.0.0", "common-path-prefix": "^3.0.0", "cp-file": "^10.0.0", @@ -89,7 +89,7 @@ "@types/unixify": "1.0.2", "@types/yargs": "17.0.32", "@vitest/coverage-v8": "0.34.6", - "browserslist": "4.23.3", + "browserslist": "4.24.3", "cardinal": "2.1.1", "cpy": "9.0.1", "decompress": "4.2.1",