Skip to content

Commit c01bd4c

Browse files
committed
chore: add explicit "type": "commonjs" to all CJS packages
Node 22 enables --experimental-detect-module by default, which reparses .ts test files as ESM when they contain import syntax. This conflicts with mocha/ts-node's CommonJS require-based loading. Adding explicit "type": "commonjs" removes the ambiguity and fixes Node 22+ CI failures. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ff93447 commit c01bd4c

32 files changed

Lines changed: 32 additions & 0 deletions

File tree

packages/browser-logs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@web/browser-logs",
3+
"type": "commonjs",
34
"version": "0.4.1",
45
"publishConfig": {
56
"access": "public"

packages/dev-server-core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@web/dev-server-core",
3+
"type": "commonjs",
34
"version": "0.7.5",
45
"publishConfig": {
56
"access": "public"

packages/dev-server-esbuild/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@web/dev-server-esbuild",
3+
"type": "commonjs",
34
"version": "1.0.5",
45
"publishConfig": {
56
"access": "public"

packages/dev-server-hmr/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@web/dev-server-hmr",
3+
"type": "commonjs",
34
"version": "0.4.1",
45
"publishConfig": {
56
"access": "public"

packages/dev-server-import-maps/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@web/dev-server-import-maps",
3+
"type": "commonjs",
34
"version": "0.2.1",
45
"publishConfig": {
56
"access": "public"

packages/dev-server-legacy/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@web/dev-server-legacy",
3+
"type": "commonjs",
34
"version": "2.1.1",
45
"publishConfig": {
56
"access": "public"

packages/dev-server-rollup/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@web/dev-server-rollup",
3+
"type": "commonjs",
34
"version": "0.6.4",
45
"publishConfig": {
56
"access": "public"

packages/dev-server/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@web/dev-server",
3+
"type": "commonjs",
34
"version": "0.4.6",
45
"publishConfig": {
56
"access": "public"

packages/parse5-utils/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@web/parse5-utils",
3+
"type": "commonjs",
34
"version": "2.1.1",
45
"publishConfig": {
56
"access": "public"

packages/polyfills-loader/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@web/polyfills-loader",
3+
"type": "commonjs",
34
"version": "2.3.1",
45
"publishConfig": {
56
"access": "public"

0 commit comments

Comments
 (0)