Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,18 @@ on: pull_request

jobs:
unit-test:
strategy:
fail-fast: false
matrix:
node:
- node-version-file: 'package.json'
- node-version: 20.x

name: Unit tests w/ Node.js ${{matrix.node.node-version || matrix.node.node-version-file}}
name: Unit tests
runs-on: ubuntu-latest
env:
FORCE_COLOR: true

steps:
- uses: actions/checkout@v4

- name: Install Node ${{matrix.node.node-version || matrix.node.node-version-file}}
- name: Install Node
uses: actions/setup-node@v4
with: ${{matrix.node}}
with:
node-version-file: 'package.json'

- name: Cache build:all
id: cache-build
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"packages/published/*"
],
"volta": {
"node": "18.20.5",
"node": "20.19.4",
"yarn": "1.22.19"
},
"scripts": {
Expand All @@ -39,7 +39,7 @@
}
},
"devDependencies": {
"@types/node": "^18",
"@types/node": "^20",
"@typescript-eslint/eslint-plugin": "7.5.0",
"@typescript-eslint/parser": "7.5.0",
"eslint": "8.57.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"devDependencies": {
"@types/async-retry": "1.4.8",
"@types/chalk": "2.2.0",
"@types/node": "^18",
"@types/node": "^20",
"esbuild": "0.24.0",
"typescript": "5.4.3",
"unplugin": "1.16.0"
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/helpers/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@ export const existsSync = (filepath: string) => {

// From a path, returns a File to use with native FormData and fetch.
export const getFile = async (filepath: string, options: LocalAppendOptions) => {
// @ts-expect-error openAsBlob is not in the NodeJS types until 19+
if (typeof fs.openAsBlob === 'function') {
// Support NodeJS 19+
// @ts-expect-error openAsBlob is not in the NodeJS types until 19+
const blob = await fs.openAsBlob(filepath, { type: options.contentType });
return new File([blob], options.filename);
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/published/esbuild-plugin/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

import { getDefaultBuildConfigs } from '@dd/tools/rollupConfig.mjs';

import packageJson from './package.json' assert { type: 'json' };
import packageJson from './package.json' with { type: 'json' };

export default getDefaultBuildConfigs(packageJson);
2 changes: 1 addition & 1 deletion packages/published/rollup-plugin/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

import { getDefaultBuildConfigs } from '@dd/tools/rollupConfig.mjs';

import packageJson from './package.json' assert { type: 'json' };
import packageJson from './package.json' with { type: 'json' };

export default getDefaultBuildConfigs(packageJson);
2 changes: 1 addition & 1 deletion packages/published/rspack-plugin/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

import { getDefaultBuildConfigs } from '@dd/tools/rollupConfig.mjs';

import packageJson from './package.json' assert { type: 'json' };
import packageJson from './package.json' with { type: 'json' };

export default getDefaultBuildConfigs(packageJson);
2 changes: 1 addition & 1 deletion packages/published/vite-plugin/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

import { getDefaultBuildConfigs } from '@dd/tools/rollupConfig.mjs';

import packageJson from './package.json' assert { type: 'json' };
import packageJson from './package.json' with { type: 'json' };

export default getDefaultBuildConfigs(packageJson);
2 changes: 1 addition & 1 deletion packages/published/webpack-plugin/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

import { getDefaultBuildConfigs } from '@dd/tools/rollupConfig.mjs';

import packageJson from './package.json' assert { type: 'json' };
import packageJson from './package.json' with { type: 'json' };

export default getDefaultBuildConfigs(packageJson);
2 changes: 1 addition & 1 deletion packages/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@rspack/core": "1.3.10",
"@types/faker": "5.5.9",
"@types/jest": "^29",
"@types/node": "^18",
"@types/node": "^20",
"@types/webpack4": "npm:@types/webpack@4.41.38",
"esbuild": "0.24.0",
"faker": "5.5.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@rollup/plugin-esm-shim": "0.1.7",
"@types/chalk": "2.2.0",
"@types/lodash.template": "^4",
"@types/node": "^18",
"@types/node": "^20",
"@types/webpack4": "npm:@types/webpack@4.41.38",
"lodash.template": "4.5.0",
"ts-node": "10.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/src/rollupConfig.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export const getSubBuilds = async (ddPlugin, packageJson, options) => {
const subBuilds = [];
for (const pkg of pkgs) {
const { default: content } = await import(path.resolve(CWD, pkg), {
assert: { type: 'json' },
with: { type: 'json' },
});

if (!content.toBuild) {
Expand Down
25 changes: 16 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@datadog/build-plugins@workspace:."
dependencies:
"@types/node": "npm:^18"
"@types/node": "npm:^20"
"@typescript-eslint/eslint-plugin": "npm:7.5.0"
"@typescript-eslint/parser": "npm:7.5.0"
eslint: "npm:8.57.0"
Expand Down Expand Up @@ -1882,7 +1882,7 @@ __metadata:
dependencies:
"@types/async-retry": "npm:1.4.8"
"@types/chalk": "npm:2.2.0"
"@types/node": "npm:^18"
"@types/node": "npm:^20"
async-retry: "npm:1.3.3"
chalk: "npm:2.3.1"
esbuild: "npm:0.24.0"
Expand Down Expand Up @@ -2058,7 +2058,7 @@ __metadata:
"@rspack/core": "npm:1.3.10"
"@types/faker": "npm:5.5.9"
"@types/jest": "npm:^29"
"@types/node": "npm:^18"
"@types/node": "npm:^20"
"@types/webpack4": "npm:@types/webpack@4.41.38"
clipanion: "npm:4.0.0-rc.3"
esbuild: "npm:0.24.0"
Expand Down Expand Up @@ -2102,7 +2102,7 @@ __metadata:
"@rspack/core": "npm:1.3.10"
"@types/chalk": "npm:2.2.0"
"@types/lodash.template": "npm:^4"
"@types/node": "npm:^18"
"@types/node": "npm:^20"
"@types/webpack4": "npm:@types/webpack@4.41.38"
chalk: "npm:2.3.1"
clipanion: "npm:4.0.0-rc.3"
Expand Down Expand Up @@ -4006,12 +4006,12 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^18":
version: 18.19.37
resolution: "@types/node@npm:18.19.37"
"@types/node@npm:^20":
version: 20.19.9
resolution: "@types/node@npm:20.19.9"
dependencies:
undici-types: "npm:~5.26.4"
checksum: 10/c0307df7b510e1bdbe548317d361d71d866a62df9878137a31844d4ea9e744e9190c1afabf86531c829cf243e7765de7ab56e3d3083dd08b578eb1551c2248c6
undici-types: "npm:~6.21.0"
checksum: 10/7631e541fb3cdef57d73b626cbcf4365ae5979345ee920429f0de0acceff69dbf843d4815404b58eb3957bace3f825d0ea38889051d2d218301c5dc48ada6cff
languageName: node
linkType: hard

Expand Down Expand Up @@ -13002,6 +13002,13 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~6.21.0":
version: 6.21.0
resolution: "undici-types@npm:6.21.0"
checksum: 10/ec8f41aa4359d50f9b59fa61fe3efce3477cc681908c8f84354d8567bb3701fafdddf36ef6bff307024d3feb42c837cf6f670314ba37fc8145e219560e473d14
languageName: node
linkType: hard

"unicode-canonical-property-names-ecmascript@npm:^2.0.0":
version: 2.0.0
resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0"
Expand Down