diff --git a/.gitignore b/.gitignore index bfea28a63f0c76..4761261d9f7dfd 100644 --- a/.gitignore +++ b/.gitignore @@ -153,3 +153,5 @@ gulp-cache .cursor/rules/nx-rules.mdc .github/instructions/nx.instructions.md .playwright-cli + +_tmp_work diff --git a/change/@fluentui-chart-utilities-b37959c8-1fc0-4957-bef8-ef7436cd7541.json b/change/@fluentui-chart-utilities-b37959c8-1fc0-4957-bef8-ef7436cd7541.json new file mode 100644 index 00000000000000..2b8283dd3fdb68 --- /dev/null +++ b/change/@fluentui-chart-utilities-b37959c8-1fc0-4957-bef8-ef7436cd7541.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Add `module` export condition so node-targeted bundlers resolve ESM (tree-shaking) while bare Node stays CommonJS; emit fully-specified .js import paths", + "packageName": "@fluentui/chart-utilities", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-global-context-e8e7b932-bc36-4fdc-9be9-1e12a1d8a949.json b/change/@fluentui-global-context-e8e7b932-bc36-4fdc-9be9-1e12a1d8a949.json new file mode 100644 index 00000000000000..dee6c6dad1e6b8 --- /dev/null +++ b/change/@fluentui-global-context-e8e7b932-bc36-4fdc-9be9-1e12a1d8a949.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/global-context", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-keyboard-keys-c678d39e-975b-4d2e-ae1a-de3f97489383.json b/change/@fluentui-keyboard-keys-c678d39e-975b-4d2e-ae1a-de3f97489383.json new file mode 100644 index 00000000000000..b36361c5b71bc9 --- /dev/null +++ b/change/@fluentui-keyboard-keys-c678d39e-975b-4d2e-ae1a-de3f97489383.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/keyboard-keys", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-priority-overflow-ddd98c10-4c8d-4597-b296-50c33b97a811.json b/change/@fluentui-priority-overflow-ddd98c10-4c8d-4597-b296-50c33b97a811.json new file mode 100644 index 00000000000000..b6e650bb52a632 --- /dev/null +++ b/change/@fluentui-priority-overflow-ddd98c10-4c8d-4597-b296-50c33b97a811.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/priority-overflow", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-accordion-24a1d1e2-1ae3-4d6b-8128-eb7dfe95f499.json b/change/@fluentui-react-accordion-24a1d1e2-1ae3-4d6b-8128-eb7dfe95f499.json new file mode 100644 index 00000000000000..4a03d47d47e439 --- /dev/null +++ b/change/@fluentui-react-accordion-24a1d1e2-1ae3-4d6b-8128-eb7dfe95f499.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-accordion", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-alert-a83574d9-d54d-47b0-b58f-96aefc791571.json b/change/@fluentui-react-alert-a83574d9-d54d-47b0-b58f-96aefc791571.json new file mode 100644 index 00000000000000..bef13b20e3085c --- /dev/null +++ b/change/@fluentui-react-alert-a83574d9-d54d-47b0-b58f-96aefc791571.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-alert", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-aria-ec2def8d-af70-4c22-ae1a-b6dacb83e837.json b/change/@fluentui-react-aria-ec2def8d-af70-4c22-ae1a-b6dacb83e837.json new file mode 100644 index 00000000000000..ee6b3e2958e414 --- /dev/null +++ b/change/@fluentui-react-aria-ec2def8d-af70-4c22-ae1a-b6dacb83e837.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-aria", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-avatar-6ecfeed1-dee8-46f7-8e45-cff428e62deb.json b/change/@fluentui-react-avatar-6ecfeed1-dee8-46f7-8e45-cff428e62deb.json new file mode 100644 index 00000000000000..c5b3c71d4aa3ab --- /dev/null +++ b/change/@fluentui-react-avatar-6ecfeed1-dee8-46f7-8e45-cff428e62deb.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-avatar", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-badge-36d58dfa-d47a-4090-b6df-3ddc9eae27e8.json b/change/@fluentui-react-badge-36d58dfa-d47a-4090-b6df-3ddc9eae27e8.json new file mode 100644 index 00000000000000..135d32d46cea87 --- /dev/null +++ b/change/@fluentui-react-badge-36d58dfa-d47a-4090-b6df-3ddc9eae27e8.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-badge", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-breadcrumb-8830165f-d40a-48dd-9420-8e44e6e37c64.json b/change/@fluentui-react-breadcrumb-8830165f-d40a-48dd-9420-8e44e6e37c64.json new file mode 100644 index 00000000000000..cd8043f77c92b3 --- /dev/null +++ b/change/@fluentui-react-breadcrumb-8830165f-d40a-48dd-9420-8e44e6e37c64.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-breadcrumb", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-button-5ca0f2ec-a203-47ba-af0b-af4795b41072.json b/change/@fluentui-react-button-5ca0f2ec-a203-47ba-af0b-af4795b41072.json new file mode 100644 index 00000000000000..2f916976f740f4 --- /dev/null +++ b/change/@fluentui-react-button-5ca0f2ec-a203-47ba-af0b-af4795b41072.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-button", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-calendar-compat-a322fd69-9454-4406-a10f-2ab9c809f3ee.json b/change/@fluentui-react-calendar-compat-a322fd69-9454-4406-a10f-2ab9c809f3ee.json new file mode 100644 index 00000000000000..0411c113211de9 --- /dev/null +++ b/change/@fluentui-react-calendar-compat-a322fd69-9454-4406-a10f-2ab9c809f3ee.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-calendar-compat", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-card-e94fecd0-f1b0-4726-a65b-8ea1e905b3c0.json b/change/@fluentui-react-card-e94fecd0-f1b0-4726-a65b-8ea1e905b3c0.json new file mode 100644 index 00000000000000..a1418d7bd21960 --- /dev/null +++ b/change/@fluentui-react-card-e94fecd0-f1b0-4726-a65b-8ea1e905b3c0.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-card", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-carousel-6907df6f-c557-487f-b926-dcea2ad9db44.json b/change/@fluentui-react-carousel-6907df6f-c557-487f-b926-dcea2ad9db44.json new file mode 100644 index 00000000000000..c6549a2ffde0b7 --- /dev/null +++ b/change/@fluentui-react-carousel-6907df6f-c557-487f-b926-dcea2ad9db44.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-carousel", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-charts-6c79d2b2-1236-4326-8d7e-3b95706edd2c.json b/change/@fluentui-react-charts-6c79d2b2-1236-4326-8d7e-3b95706edd2c.json new file mode 100644 index 00000000000000..7d92e2c4632103 --- /dev/null +++ b/change/@fluentui-react-charts-6c79d2b2-1236-4326-8d7e-3b95706edd2c.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Add `module` export condition so node-targeted bundlers resolve ESM (tree-shaking) while bare Node stays CommonJS; emit fully-specified .js import paths", + "packageName": "@fluentui/react-charts", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-checkbox-4c5c4691-f756-4134-be64-866fab3b2c70.json b/change/@fluentui-react-checkbox-4c5c4691-f756-4134-be64-866fab3b2c70.json new file mode 100644 index 00000000000000..46b66cfb6cf7b2 --- /dev/null +++ b/change/@fluentui-react-checkbox-4c5c4691-f756-4134-be64-866fab3b2c70.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-checkbox", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-color-picker-c39025a0-527e-43a7-bdb2-b8f3f6f32653.json b/change/@fluentui-react-color-picker-c39025a0-527e-43a7-bdb2-b8f3f6f32653.json new file mode 100644 index 00000000000000..1e68b6aae2f819 --- /dev/null +++ b/change/@fluentui-react-color-picker-c39025a0-527e-43a7-bdb2-b8f3f6f32653.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-color-picker", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-combobox-2279c1cb-6864-4788-bac7-0505dde975b2.json b/change/@fluentui-react-combobox-2279c1cb-6864-4788-bac7-0505dde975b2.json new file mode 100644 index 00000000000000..19f739b6ab7a6c --- /dev/null +++ b/change/@fluentui-react-combobox-2279c1cb-6864-4788-bac7-0505dde975b2.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-combobox", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-components-afa0f223-70bc-49a0-85ef-5ccb4feff18a.json b/change/@fluentui-react-components-afa0f223-70bc-49a0-85ef-5ccb4feff18a.json new file mode 100644 index 00000000000000..27825cf6bffb08 --- /dev/null +++ b/change/@fluentui-react-components-afa0f223-70bc-49a0-85ef-5ccb4feff18a.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-components", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-context-selector-7955484a-23dc-4909-9b29-fc0cb35e56c9.json b/change/@fluentui-react-context-selector-7955484a-23dc-4909-9b29-fc0cb35e56c9.json new file mode 100644 index 00000000000000..167fd11e82a62f --- /dev/null +++ b/change/@fluentui-react-context-selector-7955484a-23dc-4909-9b29-fc0cb35e56c9.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-context-selector", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-datepicker-compat-42a1ccdd-192d-4609-ba13-4aac94badd54.json b/change/@fluentui-react-datepicker-compat-42a1ccdd-192d-4609-ba13-4aac94badd54.json new file mode 100644 index 00000000000000..0fa691645f130d --- /dev/null +++ b/change/@fluentui-react-datepicker-compat-42a1ccdd-192d-4609-ba13-4aac94badd54.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-datepicker-compat", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-dialog-587cb476-df03-4b70-99ca-93af982b6f50.json b/change/@fluentui-react-dialog-587cb476-df03-4b70-99ca-93af982b6f50.json new file mode 100644 index 00000000000000..246c6b91528063 --- /dev/null +++ b/change/@fluentui-react-dialog-587cb476-df03-4b70-99ca-93af982b6f50.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-dialog", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-divider-3f853e4d-6f0b-4fb9-87b0-485f2d4839c9.json b/change/@fluentui-react-divider-3f853e4d-6f0b-4fb9-87b0-485f2d4839c9.json new file mode 100644 index 00000000000000..3cfcb5118743fd --- /dev/null +++ b/change/@fluentui-react-divider-3f853e4d-6f0b-4fb9-87b0-485f2d4839c9.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-divider", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-drawer-e194a08d-0888-40b5-a147-369a950ba288.json b/change/@fluentui-react-drawer-e194a08d-0888-40b5-a147-369a950ba288.json new file mode 100644 index 00000000000000..92c0dc5d4e23a4 --- /dev/null +++ b/change/@fluentui-react-drawer-e194a08d-0888-40b5-a147-369a950ba288.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-drawer", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-field-470f4e2f-092b-4903-bd34-d654b75731b8.json b/change/@fluentui-react-field-470f4e2f-092b-4903-bd34-d654b75731b8.json new file mode 100644 index 00000000000000..40e27a93fd8b59 --- /dev/null +++ b/change/@fluentui-react-field-470f4e2f-092b-4903-bd34-d654b75731b8.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-field", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-headless-components-preview-0cbb853a-317a-4383-a7be-92db2ea054de.json b/change/@fluentui-react-headless-components-preview-0cbb853a-317a-4383-a7be-92db2ea054de.json new file mode 100644 index 00000000000000..b9f03434726ef3 --- /dev/null +++ b/change/@fluentui-react-headless-components-preview-0cbb853a-317a-4383-a7be-92db2ea054de.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Add `module` export condition so node-targeted bundlers resolve ESM (tree-shaking) while bare Node stays CommonJS; emit fully-specified .js import paths", + "packageName": "@fluentui/react-headless-components-preview", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-headless-components-preview-7c3a1f2e-4b8d-4e6a-9f1c-2d5e8a9b0c4d.json b/change/@fluentui-react-headless-components-preview-7c3a1f2e-4b8d-4e6a-9f1c-2d5e8a9b0c4d.json new file mode 100644 index 00000000000000..7d3577e3060a44 --- /dev/null +++ b/change/@fluentui-react-headless-components-preview-7c3a1f2e-4b8d-4e6a-9f1c-2d5e8a9b0c4d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-headless-components-preview", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-icons-compat-3bf3eb47-ac44-4571-9305-11044a55d237.json b/change/@fluentui-react-icons-compat-3bf3eb47-ac44-4571-9305-11044a55d237.json new file mode 100644 index 00000000000000..292bb93e8112c7 --- /dev/null +++ b/change/@fluentui-react-icons-compat-3bf3eb47-ac44-4571-9305-11044a55d237.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-icons-compat", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-image-c303b1bf-f400-4a3e-9e68-a0e966bafffb.json b/change/@fluentui-react-image-c303b1bf-f400-4a3e-9e68-a0e966bafffb.json new file mode 100644 index 00000000000000..c4297a97fa7712 --- /dev/null +++ b/change/@fluentui-react-image-c303b1bf-f400-4a3e-9e68-a0e966bafffb.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-image", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-infobutton-34bbeca0-e082-464d-8820-8a545252a02d.json b/change/@fluentui-react-infobutton-34bbeca0-e082-464d-8820-8a545252a02d.json new file mode 100644 index 00000000000000..a25e9a9c817725 --- /dev/null +++ b/change/@fluentui-react-infobutton-34bbeca0-e082-464d-8820-8a545252a02d.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-infobutton", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-infolabel-2c6af8d9-d1e7-4641-bf52-b59c7b159ac8.json b/change/@fluentui-react-infolabel-2c6af8d9-d1e7-4641-bf52-b59c7b159ac8.json new file mode 100644 index 00000000000000..a5eec0569a1191 --- /dev/null +++ b/change/@fluentui-react-infolabel-2c6af8d9-d1e7-4641-bf52-b59c7b159ac8.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-infolabel", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-input-62cfaa70-308e-4d8d-b296-339766551db3.json b/change/@fluentui-react-input-62cfaa70-308e-4d8d-b296-339766551db3.json new file mode 100644 index 00000000000000..487430ea33209c --- /dev/null +++ b/change/@fluentui-react-input-62cfaa70-308e-4d8d-b296-339766551db3.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-input", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-jsx-runtime-0c75dc50-61fb-49f5-b472-18ad918207ba.json b/change/@fluentui-react-jsx-runtime-0c75dc50-61fb-49f5-b472-18ad918207ba.json new file mode 100644 index 00000000000000..b6e68920348369 --- /dev/null +++ b/change/@fluentui-react-jsx-runtime-0c75dc50-61fb-49f5-b472-18ad918207ba.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-jsx-runtime", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-label-5aa3bb7a-26a3-4b44-9fbc-9593db7fbfcb.json b/change/@fluentui-react-label-5aa3bb7a-26a3-4b44-9fbc-9593db7fbfcb.json new file mode 100644 index 00000000000000..4382b1bdebfe57 --- /dev/null +++ b/change/@fluentui-react-label-5aa3bb7a-26a3-4b44-9fbc-9593db7fbfcb.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-label", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-link-5c956aaa-9ef3-42b2-953b-af7b9b467e9e.json b/change/@fluentui-react-link-5c956aaa-9ef3-42b2-953b-af7b9b467e9e.json new file mode 100644 index 00000000000000..da78d7208d92ce --- /dev/null +++ b/change/@fluentui-react-link-5c956aaa-9ef3-42b2-953b-af7b9b467e9e.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-link", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-list-bec2fc87-aaec-465b-9bed-e753037522a5.json b/change/@fluentui-react-list-bec2fc87-aaec-465b-9bed-e753037522a5.json new file mode 100644 index 00000000000000..2531d4aa333526 --- /dev/null +++ b/change/@fluentui-react-list-bec2fc87-aaec-465b-9bed-e753037522a5.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-list", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-menu-a1afb852-808b-4b9b-8412-bac5ed6e3af3.json b/change/@fluentui-react-menu-a1afb852-808b-4b9b-8412-bac5ed6e3af3.json new file mode 100644 index 00000000000000..6d1063f7bf219b --- /dev/null +++ b/change/@fluentui-react-menu-a1afb852-808b-4b9b-8412-bac5ed6e3af3.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-menu", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-menu-grid-preview-e3405dd1-491b-40a4-a8b6-16b1fb14a018.json b/change/@fluentui-react-menu-grid-preview-e3405dd1-491b-40a4-a8b6-16b1fb14a018.json new file mode 100644 index 00000000000000..fb4d6b9183e597 --- /dev/null +++ b/change/@fluentui-react-menu-grid-preview-e3405dd1-491b-40a4-a8b6-16b1fb14a018.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-menu-grid-preview", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-message-bar-17c4c1cb-68f9-4b1a-9c16-716aa6bfd315.json b/change/@fluentui-react-message-bar-17c4c1cb-68f9-4b1a-9c16-716aa6bfd315.json new file mode 100644 index 00000000000000..e25db3d1bbac36 --- /dev/null +++ b/change/@fluentui-react-message-bar-17c4c1cb-68f9-4b1a-9c16-716aa6bfd315.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-message-bar", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-migration-v0-v9-173f8687-50f3-452d-a46c-7507bb15c424.json b/change/@fluentui-react-migration-v0-v9-173f8687-50f3-452d-a46c-7507bb15c424.json new file mode 100644 index 00000000000000..99fa0f3f742ce2 --- /dev/null +++ b/change/@fluentui-react-migration-v0-v9-173f8687-50f3-452d-a46c-7507bb15c424.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-migration-v0-v9", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-migration-v8-v9-e0c706a9-5ec7-4f6c-b42f-0af13e508b15.json b/change/@fluentui-react-migration-v8-v9-e0c706a9-5ec7-4f6c-b42f-0af13e508b15.json new file mode 100644 index 00000000000000..edb76982941ff1 --- /dev/null +++ b/change/@fluentui-react-migration-v8-v9-e0c706a9-5ec7-4f6c-b42f-0af13e508b15.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-migration-v8-v9", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-motion-812a7dcc-49a0-403a-b3c0-fa033fae5d4e.json b/change/@fluentui-react-motion-812a7dcc-49a0-403a-b3c0-fa033fae5d4e.json new file mode 100644 index 00000000000000..be7114046e539b --- /dev/null +++ b/change/@fluentui-react-motion-812a7dcc-49a0-403a-b3c0-fa033fae5d4e.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-motion", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-motion-components-preview-6919eecc-3e3a-4ab2-9508-2acfc8be6892.json b/change/@fluentui-react-motion-components-preview-6919eecc-3e3a-4ab2-9508-2acfc8be6892.json new file mode 100644 index 00000000000000..5314085df5331b --- /dev/null +++ b/change/@fluentui-react-motion-components-preview-6919eecc-3e3a-4ab2-9508-2acfc8be6892.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-motion-components-preview", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-nav-eaf56730-d52b-4309-a6af-26f425d1e4af.json b/change/@fluentui-react-nav-eaf56730-d52b-4309-a6af-26f425d1e4af.json new file mode 100644 index 00000000000000..7bd2b4ba6b2f94 --- /dev/null +++ b/change/@fluentui-react-nav-eaf56730-d52b-4309-a6af-26f425d1e4af.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-nav", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-overflow-b940e0cd-3a31-4210-a484-205bfe15aa86.json b/change/@fluentui-react-overflow-b940e0cd-3a31-4210-a484-205bfe15aa86.json new file mode 100644 index 00000000000000..d66c28ae099342 --- /dev/null +++ b/change/@fluentui-react-overflow-b940e0cd-3a31-4210-a484-205bfe15aa86.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-overflow", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-persona-fe72f585-73fd-4728-b66b-81208f5db93a.json b/change/@fluentui-react-persona-fe72f585-73fd-4728-b66b-81208f5db93a.json new file mode 100644 index 00000000000000..533f31dbbb8936 --- /dev/null +++ b/change/@fluentui-react-persona-fe72f585-73fd-4728-b66b-81208f5db93a.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-persona", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-popover-d3158fd7-1157-4349-a532-d0a9333d8d59.json b/change/@fluentui-react-popover-d3158fd7-1157-4349-a532-d0a9333d8d59.json new file mode 100644 index 00000000000000..76eaf0a1bc4618 --- /dev/null +++ b/change/@fluentui-react-popover-d3158fd7-1157-4349-a532-d0a9333d8d59.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-popover", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-portal-7c7856eb-7a90-4391-bf5e-e46d4f8120a6.json b/change/@fluentui-react-portal-7c7856eb-7a90-4391-bf5e-e46d4f8120a6.json new file mode 100644 index 00000000000000..99bf3372c1afbe --- /dev/null +++ b/change/@fluentui-react-portal-7c7856eb-7a90-4391-bf5e-e46d4f8120a6.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-portal", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-portal-compat-45f99d4d-35b4-4112-99af-12aa3a6eadcd.json b/change/@fluentui-react-portal-compat-45f99d4d-35b4-4112-99af-12aa3a6eadcd.json new file mode 100644 index 00000000000000..c319cfb3769b48 --- /dev/null +++ b/change/@fluentui-react-portal-compat-45f99d4d-35b4-4112-99af-12aa3a6eadcd.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-portal-compat", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-portal-compat-context-988005d7-a101-4dc4-8bcd-1b600e00add9.json b/change/@fluentui-react-portal-compat-context-988005d7-a101-4dc4-8bcd-1b600e00add9.json new file mode 100644 index 00000000000000..412b6703947a74 --- /dev/null +++ b/change/@fluentui-react-portal-compat-context-988005d7-a101-4dc4-8bcd-1b600e00add9.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-portal-compat-context", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-positioning-75c6dfb1-fbac-4e84-b2fc-3a10e6bc3e43.json b/change/@fluentui-react-positioning-75c6dfb1-fbac-4e84-b2fc-3a10e6bc3e43.json new file mode 100644 index 00000000000000..c4f781a066027c --- /dev/null +++ b/change/@fluentui-react-positioning-75c6dfb1-fbac-4e84-b2fc-3a10e6bc3e43.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-positioning", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-progress-0d1a6e0e-460c-433f-9f2e-066f9bb123f9.json b/change/@fluentui-react-progress-0d1a6e0e-460c-433f-9f2e-066f9bb123f9.json new file mode 100644 index 00000000000000..c23cc03dc16d8a --- /dev/null +++ b/change/@fluentui-react-progress-0d1a6e0e-460c-433f-9f2e-066f9bb123f9.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-progress", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-provider-3b71f083-6280-4945-840a-9e4d65059122.json b/change/@fluentui-react-provider-3b71f083-6280-4945-840a-9e4d65059122.json new file mode 100644 index 00000000000000..49199ca9988b4b --- /dev/null +++ b/change/@fluentui-react-provider-3b71f083-6280-4945-840a-9e4d65059122.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-provider", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-radio-5a2cfd79-edb9-4bf8-b179-ed1431ee6e7f.json b/change/@fluentui-react-radio-5a2cfd79-edb9-4bf8-b179-ed1431ee6e7f.json new file mode 100644 index 00000000000000..5994c940f5bc37 --- /dev/null +++ b/change/@fluentui-react-radio-5a2cfd79-edb9-4bf8-b179-ed1431ee6e7f.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-radio", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-rating-c5360c9f-1ee0-4126-a996-d62c09304d3d.json b/change/@fluentui-react-rating-c5360c9f-1ee0-4126-a996-d62c09304d3d.json new file mode 100644 index 00000000000000..572158c38d9f39 --- /dev/null +++ b/change/@fluentui-react-rating-c5360c9f-1ee0-4126-a996-d62c09304d3d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-rating", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-search-f36078f9-e5fc-4344-b2db-44b941ffa91a.json b/change/@fluentui-react-search-f36078f9-e5fc-4344-b2db-44b941ffa91a.json new file mode 100644 index 00000000000000..18c722d3cc9864 --- /dev/null +++ b/change/@fluentui-react-search-f36078f9-e5fc-4344-b2db-44b941ffa91a.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-search", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-select-50a85be5-0955-4c16-b6db-527d2bfe6f06.json b/change/@fluentui-react-select-50a85be5-0955-4c16-b6db-527d2bfe6f06.json new file mode 100644 index 00000000000000..0e946cdc575f57 --- /dev/null +++ b/change/@fluentui-react-select-50a85be5-0955-4c16-b6db-527d2bfe6f06.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-select", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-shared-contexts-e8cb05d3-69e1-4bc6-bab3-017d3e8a1494.json b/change/@fluentui-react-shared-contexts-e8cb05d3-69e1-4bc6-bab3-017d3e8a1494.json new file mode 100644 index 00000000000000..87cc3c0033739c --- /dev/null +++ b/change/@fluentui-react-shared-contexts-e8cb05d3-69e1-4bc6-bab3-017d3e8a1494.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-shared-contexts", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-skeleton-b0363764-3e25-49b3-8534-959a0834591a.json b/change/@fluentui-react-skeleton-b0363764-3e25-49b3-8534-959a0834591a.json new file mode 100644 index 00000000000000..ce24884cda8125 --- /dev/null +++ b/change/@fluentui-react-skeleton-b0363764-3e25-49b3-8534-959a0834591a.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-skeleton", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-slider-c6183a1f-7fc7-42f2-91d0-998387bcfd40.json b/change/@fluentui-react-slider-c6183a1f-7fc7-42f2-91d0-998387bcfd40.json new file mode 100644 index 00000000000000..ced5b2a8e671e0 --- /dev/null +++ b/change/@fluentui-react-slider-c6183a1f-7fc7-42f2-91d0-998387bcfd40.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-slider", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-spinbutton-dca37a6e-a46f-4f45-bd1e-92c5860795f8.json b/change/@fluentui-react-spinbutton-dca37a6e-a46f-4f45-bd1e-92c5860795f8.json new file mode 100644 index 00000000000000..d2927029ea06a4 --- /dev/null +++ b/change/@fluentui-react-spinbutton-dca37a6e-a46f-4f45-bd1e-92c5860795f8.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-spinbutton", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-spinner-f5da929d-c544-49d3-a8b9-4e942a0ab991.json b/change/@fluentui-react-spinner-f5da929d-c544-49d3-a8b9-4e942a0ab991.json new file mode 100644 index 00000000000000..ae9ebefc3e0738 --- /dev/null +++ b/change/@fluentui-react-spinner-f5da929d-c544-49d3-a8b9-4e942a0ab991.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-spinner", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-storybook-addon-22046dc1-5e5f-4957-b654-02a63311aa3b.json b/change/@fluentui-react-storybook-addon-22046dc1-5e5f-4957-b654-02a63311aa3b.json new file mode 100644 index 00000000000000..2c7d8c6d2623a0 --- /dev/null +++ b/change/@fluentui-react-storybook-addon-22046dc1-5e5f-4957-b654-02a63311aa3b.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Add `module` export condition so node-targeted bundlers resolve ESM (tree-shaking) while bare Node stays CommonJS; emit fully-specified .js import paths", + "packageName": "@fluentui/react-storybook-addon", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-storybook-addon-export-to-sandbox-c0469bed-1761-4a1f-930a-5f4a92d97749.json b/change/@fluentui-react-storybook-addon-export-to-sandbox-c0469bed-1761-4a1f-930a-5f4a92d97749.json new file mode 100644 index 00000000000000..546ebf27d5faa0 --- /dev/null +++ b/change/@fluentui-react-storybook-addon-export-to-sandbox-c0469bed-1761-4a1f-930a-5f4a92d97749.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Add `module` export condition so node-targeted bundlers resolve ESM (tree-shaking) while bare Node stays CommonJS; emit fully-specified .js import paths", + "packageName": "@fluentui/react-storybook-addon-export-to-sandbox", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-swatch-picker-2beeb0ee-6c84-4cbc-8418-06c3a2b20b7e.json b/change/@fluentui-react-swatch-picker-2beeb0ee-6c84-4cbc-8418-06c3a2b20b7e.json new file mode 100644 index 00000000000000..0a645b300e7666 --- /dev/null +++ b/change/@fluentui-react-swatch-picker-2beeb0ee-6c84-4cbc-8418-06c3a2b20b7e.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-swatch-picker", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-switch-3dd465b9-7d34-4360-ba4b-78e0953a5f74.json b/change/@fluentui-react-switch-3dd465b9-7d34-4360-ba4b-78e0953a5f74.json new file mode 100644 index 00000000000000..b7e2acb3d36d7e --- /dev/null +++ b/change/@fluentui-react-switch-3dd465b9-7d34-4360-ba4b-78e0953a5f74.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-switch", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-table-2e387656-9d47-4fcf-a040-ded685f88e61.json b/change/@fluentui-react-table-2e387656-9d47-4fcf-a040-ded685f88e61.json new file mode 100644 index 00000000000000..f919f3c63be95e --- /dev/null +++ b/change/@fluentui-react-table-2e387656-9d47-4fcf-a040-ded685f88e61.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-table", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tabs-cbe17ac0-877b-42ae-8b6c-2ca1c54f0b15.json b/change/@fluentui-react-tabs-cbe17ac0-877b-42ae-8b6c-2ca1c54f0b15.json new file mode 100644 index 00000000000000..150c6e4b8718a9 --- /dev/null +++ b/change/@fluentui-react-tabs-cbe17ac0-877b-42ae-8b6c-2ca1c54f0b15.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-tabs", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tabster-ebc0290d-74b5-422e-ad4f-cee62c088f36.json b/change/@fluentui-react-tabster-ebc0290d-74b5-422e-ad4f-cee62c088f36.json new file mode 100644 index 00000000000000..e37199d01b820c --- /dev/null +++ b/change/@fluentui-react-tabster-ebc0290d-74b5-422e-ad4f-cee62c088f36.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-tabster", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tag-picker-766c6c8b-75ed-4068-8d69-017c7a2809ef.json b/change/@fluentui-react-tag-picker-766c6c8b-75ed-4068-8d69-017c7a2809ef.json new file mode 100644 index 00000000000000..e0f1acf894519a --- /dev/null +++ b/change/@fluentui-react-tag-picker-766c6c8b-75ed-4068-8d69-017c7a2809ef.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-tag-picker", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tags-1edffb10-ddbd-4600-8119-079e31643710.json b/change/@fluentui-react-tags-1edffb10-ddbd-4600-8119-079e31643710.json new file mode 100644 index 00000000000000..3c07d9a9d2811b --- /dev/null +++ b/change/@fluentui-react-tags-1edffb10-ddbd-4600-8119-079e31643710.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-tags", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-teaching-popover-553c3344-fa74-41f3-96d3-c49ebb45fffa.json b/change/@fluentui-react-teaching-popover-553c3344-fa74-41f3-96d3-c49ebb45fffa.json new file mode 100644 index 00000000000000..9bb890e86a4338 --- /dev/null +++ b/change/@fluentui-react-teaching-popover-553c3344-fa74-41f3-96d3-c49ebb45fffa.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-teaching-popover", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-text-b5a6e03f-c376-460a-a4e8-2b8c67f99eda.json b/change/@fluentui-react-text-b5a6e03f-c376-460a-a4e8-2b8c67f99eda.json new file mode 100644 index 00000000000000..4c126ce3c44c91 --- /dev/null +++ b/change/@fluentui-react-text-b5a6e03f-c376-460a-a4e8-2b8c67f99eda.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-text", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-textarea-c90bdd60-d827-43ab-96b0-d4f519ef0176.json b/change/@fluentui-react-textarea-c90bdd60-d827-43ab-96b0-d4f519ef0176.json new file mode 100644 index 00000000000000..d86fafd9dd324b --- /dev/null +++ b/change/@fluentui-react-textarea-c90bdd60-d827-43ab-96b0-d4f519ef0176.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-textarea", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-theme-38b2cfbb-76be-4daa-ba35-588ce1e208bb.json b/change/@fluentui-react-theme-38b2cfbb-76be-4daa-ba35-588ce1e208bb.json new file mode 100644 index 00000000000000..1bcad654e68fd7 --- /dev/null +++ b/change/@fluentui-react-theme-38b2cfbb-76be-4daa-ba35-588ce1e208bb.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-theme", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-theme-sass-6eda362e-202b-44cb-9a94-3c6bbb3fef2e.json b/change/@fluentui-react-theme-sass-6eda362e-202b-44cb-9a94-3c6bbb3fef2e.json new file mode 100644 index 00000000000000..64575cf9f3240f --- /dev/null +++ b/change/@fluentui-react-theme-sass-6eda362e-202b-44cb-9a94-3c6bbb3fef2e.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-theme-sass", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-timepicker-compat-191558d0-8705-4856-935a-c47bbffe6f5c.json b/change/@fluentui-react-timepicker-compat-191558d0-8705-4856-935a-c47bbffe6f5c.json new file mode 100644 index 00000000000000..fd11311041f7c6 --- /dev/null +++ b/change/@fluentui-react-timepicker-compat-191558d0-8705-4856-935a-c47bbffe6f5c.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-timepicker-compat", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-toast-6ca07605-6ced-470a-a8af-e9025f217c2d.json b/change/@fluentui-react-toast-6ca07605-6ced-470a-a8af-e9025f217c2d.json new file mode 100644 index 00000000000000..71a3951b651f81 --- /dev/null +++ b/change/@fluentui-react-toast-6ca07605-6ced-470a-a8af-e9025f217c2d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-toast", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-toolbar-a424ed41-dd0d-4072-8a39-4a4f3b5e8dd7.json b/change/@fluentui-react-toolbar-a424ed41-dd0d-4072-8a39-4a4f3b5e8dd7.json new file mode 100644 index 00000000000000..0813b0595617e9 --- /dev/null +++ b/change/@fluentui-react-toolbar-a424ed41-dd0d-4072-8a39-4a4f3b5e8dd7.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-toolbar", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tooltip-20492802-285d-4140-a5eb-2a617752160f.json b/change/@fluentui-react-tooltip-20492802-285d-4140-a5eb-2a617752160f.json new file mode 100644 index 00000000000000..6be6d83542c3b7 --- /dev/null +++ b/change/@fluentui-react-tooltip-20492802-285d-4140-a5eb-2a617752160f.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-tooltip", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tree-58c91467-4503-4983-b7bf-b42a20acc81b.json b/change/@fluentui-react-tree-58c91467-4503-4983-b7bf-b42a20acc81b.json new file mode 100644 index 00000000000000..dad190fa5461fe --- /dev/null +++ b/change/@fluentui-react-tree-58c91467-4503-4983-b7bf-b42a20acc81b.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-tree", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-utilities-01a47879-4d97-4d59-82ba-62879cabef50.json b/change/@fluentui-react-utilities-01a47879-4d97-4d59-82ba-62879cabef50.json new file mode 100644 index 00000000000000..442dc83bc2cb2e --- /dev/null +++ b/change/@fluentui-react-utilities-01a47879-4d97-4d59-82ba-62879cabef50.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-utilities", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-virtualizer-bf8007d9-90c1-44e2-9773-8eedddda347d.json b/change/@fluentui-react-virtualizer-bf8007d9-90c1-44e2-9773-8eedddda347d.json new file mode 100644 index 00000000000000..f9761ca1793b74 --- /dev/null +++ b/change/@fluentui-react-virtualizer-bf8007d9-90c1-44e2-9773-8eedddda347d.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/react-virtualizer", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-tokens-010b8f43-184f-46ed-a093-72532aeec11d.json b/change/@fluentui-tokens-010b8f43-184f-46ed-a093-72532aeec11d.json new file mode 100644 index 00000000000000..59413f311b4344 --- /dev/null +++ b/change/@fluentui-tokens-010b8f43-184f-46ed-a093-72532aeec11d.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake.", + "packageName": "@fluentui/tokens", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/package.json b/package.json index 01af4fd25eec7b..0506ccd3a5ec32 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "devDependencies": { "@actions/core": "1.9.1", "@actions/github": "5.0.3", + "@arethetypeswrong/cli": "0.18.3", "@babel/core": "7.29.0", "@babel/generator": "7.29.1", "@babel/parser": "7.29.3", diff --git a/packages/charts/chart-utilities/package.json b/packages/charts/chart-utilities/package.json index 649b12b0095307..1b336770f797b1 100644 --- a/packages/charts/chart-utilities/package.json +++ b/packages/charts/chart-utilities/package.json @@ -36,7 +36,10 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", + "node": { + "module": "./lib/index.js", + "default": "./lib-commonjs/index.js" + }, "import": "./lib/index.js", "require": "./lib-commonjs/index.js" }, diff --git a/packages/charts/chart-web-components/package.json b/packages/charts/chart-web-components/package.json index f122a77f7342e9..81fecc6142e31c 100644 --- a/packages/charts/chart-web-components/package.json +++ b/packages/charts/chart-web-components/package.json @@ -21,7 +21,8 @@ "*.md", "dist/esm/", "dist/*.js", - "dist/*.d.ts" + "dist/*.d.ts", + "dist/*.d.cts" ], "exports": { ".": "./dist/esm/index.js", diff --git a/packages/charts/react-charts/library/.swcrc b/packages/charts/react-charts/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/charts/react-charts/library/.swcrc +++ b/packages/charts/react-charts/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/charts/react-charts/library/package.json b/packages/charts/react-charts/library/package.json index 30a660754cdcff..50c9c089ec5a9c 100644 --- a/packages/charts/react-charts/library/package.json +++ b/packages/charts/react-charts/library/package.json @@ -65,7 +65,10 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", + "node": { + "module": "./lib/index.js", + "default": "./lib-commonjs/index.js" + }, "import": "./lib/index.js", "require": "./lib-commonjs/index.js" }, diff --git a/packages/react-components/component-selector-preview/library/.swcrc b/packages/react-components/component-selector-preview/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/component-selector-preview/library/.swcrc +++ b/packages/react-components/component-selector-preview/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/component-selector-preview/library/config/tests.js b/packages/react-components/component-selector-preview/library/config/tests.cjs similarity index 100% rename from packages/react-components/component-selector-preview/library/config/tests.js rename to packages/react-components/component-selector-preview/library/config/tests.cjs diff --git a/packages/react-components/component-selector-preview/library/eslint.config.js b/packages/react-components/component-selector-preview/library/eslint.config.cjs similarity index 100% rename from packages/react-components/component-selector-preview/library/eslint.config.js rename to packages/react-components/component-selector-preview/library/eslint.config.cjs diff --git a/packages/react-components/component-selector-preview/library/jest.config.js b/packages/react-components/component-selector-preview/library/jest.config.cjs similarity index 96% rename from packages/react-components/component-selector-preview/library/jest.config.js rename to packages/react-components/component-selector-preview/library/jest.config.cjs index 6be0523d0159bb..a2c1f38fe47cbe 100644 --- a/packages/react-components/component-selector-preview/library/jest.config.js +++ b/packages/react-components/component-selector-preview/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/component-selector-preview/library/package.json b/packages/react-components/component-selector-preview/library/package.json index d0c7018a35e8a6..6c7b6674bd581d 100644 --- a/packages/react-components/component-selector-preview/library/package.json +++ b/packages/react-components/component-selector-preview/library/package.json @@ -3,13 +3,14 @@ "version": "0.0.0", "private": true, "description": "New fluentui react package", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -34,10 +35,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -46,5 +51,6 @@ "major", "prerelease" ] - } + }, + "type": "module" } diff --git a/packages/react-components/deprecated/react-alert/.swcrc b/packages/react-components/deprecated/react-alert/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/deprecated/react-alert/.swcrc +++ b/packages/react-components/deprecated/react-alert/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/deprecated/react-alert/config/tests.js b/packages/react-components/deprecated/react-alert/config/tests.cjs similarity index 100% rename from packages/react-components/deprecated/react-alert/config/tests.js rename to packages/react-components/deprecated/react-alert/config/tests.cjs diff --git a/packages/react-components/deprecated/react-alert/eslint.config.js b/packages/react-components/deprecated/react-alert/eslint.config.cjs similarity index 100% rename from packages/react-components/deprecated/react-alert/eslint.config.js rename to packages/react-components/deprecated/react-alert/eslint.config.cjs diff --git a/packages/react-components/deprecated/react-alert/jest.config.js b/packages/react-components/deprecated/react-alert/jest.config.cjs similarity index 90% rename from packages/react-components/deprecated/react-alert/jest.config.js rename to packages/react-components/deprecated/react-alert/jest.config.cjs index 4aa36ebe5cad65..e55174fe492dfb 100644 --- a/packages/react-components/deprecated/react-alert/jest.config.js +++ b/packages/react-components/deprecated/react-alert/jest.config.cjs @@ -16,6 +16,6 @@ module.exports = { ], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/deprecated/react-alert/package.json b/packages/react-components/deprecated/react-alert/package.json index da0a8c750eefa4..a90f5300a824d6 100644 --- a/packages/react-components/deprecated/react-alert/package.json +++ b/packages/react-components/deprecated/react-alert/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-alert", "version": "9.0.0-beta.140", "description": "An alert component to display brief messages", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -37,17 +37,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/deprecated/react-infobutton/.swcrc b/packages/react-components/deprecated/react-infobutton/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/deprecated/react-infobutton/.swcrc +++ b/packages/react-components/deprecated/react-infobutton/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/deprecated/react-infobutton/config/tests.js b/packages/react-components/deprecated/react-infobutton/config/tests.cjs similarity index 100% rename from packages/react-components/deprecated/react-infobutton/config/tests.js rename to packages/react-components/deprecated/react-infobutton/config/tests.cjs diff --git a/packages/react-components/deprecated/react-infobutton/eslint.config.js b/packages/react-components/deprecated/react-infobutton/eslint.config.cjs similarity index 100% rename from packages/react-components/deprecated/react-infobutton/eslint.config.js rename to packages/react-components/deprecated/react-infobutton/eslint.config.cjs diff --git a/packages/react-components/deprecated/react-infobutton/jest.config.js b/packages/react-components/deprecated/react-infobutton/jest.config.cjs similarity index 90% rename from packages/react-components/deprecated/react-infobutton/jest.config.js rename to packages/react-components/deprecated/react-infobutton/jest.config.cjs index 39ba2cc0b2efc8..f83043c92183a5 100644 --- a/packages/react-components/deprecated/react-infobutton/jest.config.js +++ b/packages/react-components/deprecated/react-infobutton/jest.config.cjs @@ -16,6 +16,6 @@ module.exports = { ], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/deprecated/react-infobutton/package.json b/packages/react-components/deprecated/react-infobutton/package.json index bdf554c6c2d979..ddc200a7d3bc15 100644 --- a/packages/react-components/deprecated/react-infobutton/package.json +++ b/packages/react-components/deprecated/react-infobutton/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-infobutton", "version": "9.0.0-beta.116", "description": "React components for building web experiences", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -37,17 +37,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/deprecated/react-virtualizer/.swcrc b/packages/react-components/deprecated/react-virtualizer/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/deprecated/react-virtualizer/.swcrc +++ b/packages/react-components/deprecated/react-virtualizer/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/deprecated/react-virtualizer/config/tests.js b/packages/react-components/deprecated/react-virtualizer/config/tests.cjs similarity index 100% rename from packages/react-components/deprecated/react-virtualizer/config/tests.js rename to packages/react-components/deprecated/react-virtualizer/config/tests.cjs diff --git a/packages/react-components/deprecated/react-virtualizer/eslint.config.js b/packages/react-components/deprecated/react-virtualizer/eslint.config.cjs similarity index 100% rename from packages/react-components/deprecated/react-virtualizer/eslint.config.js rename to packages/react-components/deprecated/react-virtualizer/eslint.config.cjs diff --git a/packages/react-components/deprecated/react-virtualizer/jest.config.js b/packages/react-components/deprecated/react-virtualizer/jest.config.cjs similarity index 96% rename from packages/react-components/deprecated/react-virtualizer/jest.config.js rename to packages/react-components/deprecated/react-virtualizer/jest.config.cjs index dc88c3fa6d9af5..4168b284e4c2e6 100644 --- a/packages/react-components/deprecated/react-virtualizer/jest.config.js +++ b/packages/react-components/deprecated/react-virtualizer/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/deprecated/react-virtualizer/package.json b/packages/react-components/deprecated/react-virtualizer/package.json index 59d69e69a61402..d6feab4662fd3d 100644 --- a/packages/react-components/deprecated/react-virtualizer/package.json +++ b/packages/react-components/deprecated/react-virtualizer/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-virtualizer", "version": "9.0.0-alpha.113", "description": "Generic and composable virtualizer framework built on browser intersection observer", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -33,17 +33,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/global-context/.swcrc b/packages/react-components/global-context/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/global-context/.swcrc +++ b/packages/react-components/global-context/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/global-context/config/tests.js b/packages/react-components/global-context/config/tests.cjs similarity index 100% rename from packages/react-components/global-context/config/tests.js rename to packages/react-components/global-context/config/tests.cjs diff --git a/packages/react-components/global-context/eslint.config.js b/packages/react-components/global-context/eslint.config.cjs similarity index 100% rename from packages/react-components/global-context/eslint.config.js rename to packages/react-components/global-context/eslint.config.cjs diff --git a/packages/react-components/global-context/jest.config.js b/packages/react-components/global-context/jest.config.cjs similarity index 96% rename from packages/react-components/global-context/jest.config.js rename to packages/react-components/global-context/jest.config.cjs index d8b4384a280e01..8988772b4f2197 100644 --- a/packages/react-components/global-context/jest.config.js +++ b/packages/react-components/global-context/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/react-components/global-context/package.json b/packages/react-components/global-context/package.json index dbe08345f80b79..8307617e72c95a 100644 --- a/packages/react-components/global-context/package.json +++ b/packages/react-components/global-context/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/global-context", "version": "9.0.0-beta.102", "description": "Extension of React createContext to be a true singleton on the global scope", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -31,17 +31,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/keyboard-keys/.swcrc b/packages/react-components/keyboard-keys/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/keyboard-keys/.swcrc +++ b/packages/react-components/keyboard-keys/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/keyboard-keys/config/tests.js b/packages/react-components/keyboard-keys/config/tests.cjs similarity index 100% rename from packages/react-components/keyboard-keys/config/tests.js rename to packages/react-components/keyboard-keys/config/tests.cjs diff --git a/packages/react-components/keyboard-keys/eslint.config.js b/packages/react-components/keyboard-keys/eslint.config.cjs similarity index 100% rename from packages/react-components/keyboard-keys/eslint.config.js rename to packages/react-components/keyboard-keys/eslint.config.cjs diff --git a/packages/react-components/keyboard-keys/jest.config.js b/packages/react-components/keyboard-keys/jest.config.cjs similarity index 96% rename from packages/react-components/keyboard-keys/jest.config.js rename to packages/react-components/keyboard-keys/jest.config.cjs index 757f1c501d40c1..a6089c916a81e2 100644 --- a/packages/react-components/keyboard-keys/jest.config.js +++ b/packages/react-components/keyboard-keys/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/react-components/keyboard-keys/package.json b/packages/react-components/keyboard-keys/package.json index fc26425de1c8c9..4089b9032bc71d 100644 --- a/packages/react-components/keyboard-keys/package.json +++ b/packages/react-components/keyboard-keys/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/keyboard-keys", "version": "9.0.8", "description": "Contains a set of keyboard constants for key and keyCode", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -22,17 +22,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/priority-overflow/.swcrc b/packages/react-components/priority-overflow/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/priority-overflow/.swcrc +++ b/packages/react-components/priority-overflow/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/priority-overflow/config/tests.js b/packages/react-components/priority-overflow/config/tests.cjs similarity index 100% rename from packages/react-components/priority-overflow/config/tests.js rename to packages/react-components/priority-overflow/config/tests.cjs diff --git a/packages/react-components/priority-overflow/eslint.config.js b/packages/react-components/priority-overflow/eslint.config.cjs similarity index 100% rename from packages/react-components/priority-overflow/eslint.config.js rename to packages/react-components/priority-overflow/eslint.config.cjs diff --git a/packages/react-components/priority-overflow/jest.config.js b/packages/react-components/priority-overflow/jest.config.cjs similarity index 96% rename from packages/react-components/priority-overflow/jest.config.js rename to packages/react-components/priority-overflow/jest.config.cjs index 3885e65adcbb46..4fc1cd41dfb3ae 100644 --- a/packages/react-components/priority-overflow/jest.config.js +++ b/packages/react-components/priority-overflow/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/react-components/priority-overflow/package.json b/packages/react-components/priority-overflow/package.json index 26eb4633eab26a..b78f934db49129 100644 --- a/packages/react-components/priority-overflow/package.json +++ b/packages/react-components/priority-overflow/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/priority-overflow", "version": "9.3.0", "description": "Vanilla JS utilities to implement overflow menus", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -22,17 +22,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-accordion/library/.swcrc b/packages/react-components/react-accordion/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-accordion/library/.swcrc +++ b/packages/react-components/react-accordion/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-accordion/library/config/tests.js b/packages/react-components/react-accordion/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-accordion/library/config/tests.js rename to packages/react-components/react-accordion/library/config/tests.cjs diff --git a/packages/react-components/react-accordion/library/eslint.config.js b/packages/react-components/react-accordion/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-accordion/library/eslint.config.js rename to packages/react-components/react-accordion/library/eslint.config.cjs diff --git a/packages/react-components/react-accordion/library/jest.config.js b/packages/react-components/react-accordion/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-accordion/library/jest.config.js rename to packages/react-components/react-accordion/library/jest.config.cjs index 709e4a2a4da592..da6fa3069a1200 100644 --- a/packages/react-components/react-accordion/library/jest.config.js +++ b/packages/react-components/react-accordion/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-accordion/library/package.json b/packages/react-components/react-accordion/library/package.json index 2b90cbee114a95..0e85d76f7a1b94 100644 --- a/packages/react-components/react-accordion/library/package.json +++ b/packages/react-components/react-accordion/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-accordion", "version": "9.12.0", "description": "Fluent UI accordion component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -39,17 +39,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-aria/library/.swcrc b/packages/react-components/react-aria/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-aria/library/.swcrc +++ b/packages/react-components/react-aria/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-aria/library/config/tests.js b/packages/react-components/react-aria/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-aria/library/config/tests.js rename to packages/react-components/react-aria/library/config/tests.cjs diff --git a/packages/react-components/react-aria/library/eslint.config.js b/packages/react-components/react-aria/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-aria/library/eslint.config.js rename to packages/react-components/react-aria/library/eslint.config.cjs diff --git a/packages/react-components/react-aria/library/jest.config.js b/packages/react-components/react-aria/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-aria/library/jest.config.js rename to packages/react-components/react-aria/library/jest.config.cjs index 57deee862a091a..364db9d11902b9 100644 --- a/packages/react-components/react-aria/library/jest.config.js +++ b/packages/react-components/react-aria/library/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/react-components/react-aria/library/package.json b/packages/react-components/react-aria/library/package.json index 39ddb78bb1147a..b213819428036d 100644 --- a/packages/react-components/react-aria/library/package.json +++ b/packages/react-components/react-aria/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-aria", "version": "9.17.12", "description": "React helper to ensure ARIA", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -33,17 +33,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-avatar/library/.swcrc b/packages/react-components/react-avatar/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-avatar/library/.swcrc +++ b/packages/react-components/react-avatar/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-avatar/library/config/tests.js b/packages/react-components/react-avatar/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-avatar/library/config/tests.js rename to packages/react-components/react-avatar/library/config/tests.cjs diff --git a/packages/react-components/react-avatar/library/eslint.config.js b/packages/react-components/react-avatar/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-avatar/library/eslint.config.js rename to packages/react-components/react-avatar/library/eslint.config.cjs diff --git a/packages/react-components/react-avatar/library/jest.config.js b/packages/react-components/react-avatar/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-avatar/library/jest.config.js rename to packages/react-components/react-avatar/library/jest.config.cjs index dc18a8504c421d..56153ef8d9a8b8 100644 --- a/packages/react-components/react-avatar/library/jest.config.js +++ b/packages/react-components/react-avatar/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-avatar/library/package.json b/packages/react-components/react-avatar/library/package.json index b1f11b9584e746..d93249108ab6ed 100644 --- a/packages/react-components/react-avatar/library/package.json +++ b/packages/react-components/react-avatar/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-avatar", "version": "9.11.2", "description": "React components for building Microsoft web experiences.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -42,17 +42,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-badge/library/.swcrc b/packages/react-components/react-badge/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-badge/library/.swcrc +++ b/packages/react-components/react-badge/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-badge/library/config/tests.js b/packages/react-components/react-badge/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-badge/library/config/tests.js rename to packages/react-components/react-badge/library/config/tests.cjs diff --git a/packages/react-components/react-badge/library/eslint.config.js b/packages/react-components/react-badge/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-badge/library/eslint.config.js rename to packages/react-components/react-badge/library/eslint.config.cjs diff --git a/packages/react-components/react-badge/library/jest.config.js b/packages/react-components/react-badge/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-badge/library/jest.config.js rename to packages/react-components/react-badge/library/jest.config.cjs index 9774395ae9a231..1b355873788980 100644 --- a/packages/react-components/react-badge/library/jest.config.js +++ b/packages/react-components/react-badge/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-badge/library/package.json b/packages/react-components/react-badge/library/package.json index 14001d897af39a..95946b5a2f3a31 100644 --- a/packages/react-components/react-badge/library/package.json +++ b/packages/react-components/react-badge/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-badge", "version": "9.5.3", "description": "React components for building web experiences", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -34,17 +34,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-breadcrumb/library/.swcrc b/packages/react-components/react-breadcrumb/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-breadcrumb/library/.swcrc +++ b/packages/react-components/react-breadcrumb/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-breadcrumb/library/config/tests.js b/packages/react-components/react-breadcrumb/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-breadcrumb/library/config/tests.js rename to packages/react-components/react-breadcrumb/library/config/tests.cjs diff --git a/packages/react-components/react-breadcrumb/library/eslint.config.js b/packages/react-components/react-breadcrumb/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-breadcrumb/library/eslint.config.js rename to packages/react-components/react-breadcrumb/library/eslint.config.cjs diff --git a/packages/react-components/react-breadcrumb/library/jest.config.js b/packages/react-components/react-breadcrumb/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-breadcrumb/library/jest.config.js rename to packages/react-components/react-breadcrumb/library/jest.config.cjs index 3e1bdbdcd121b4..dbb94e0f9c3a21 100644 --- a/packages/react-components/react-breadcrumb/library/jest.config.js +++ b/packages/react-components/react-breadcrumb/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-breadcrumb/library/package.json b/packages/react-components/react-breadcrumb/library/package.json index eb7c38c16796d9..7bc370d1549d04 100644 --- a/packages/react-components/react-breadcrumb/library/package.json +++ b/packages/react-components/react-breadcrumb/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-breadcrumb", "version": "9.4.2", "description": "Breadcrumb component for Fluent UI React.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -38,17 +38,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-button/library/.swcrc b/packages/react-components/react-button/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-button/library/.swcrc +++ b/packages/react-components/react-button/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-button/library/config/tests.js b/packages/react-components/react-button/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-button/library/config/tests.js rename to packages/react-components/react-button/library/config/tests.cjs diff --git a/packages/react-components/react-button/library/eslint.config.js b/packages/react-components/react-button/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-button/library/eslint.config.js rename to packages/react-components/react-button/library/eslint.config.cjs diff --git a/packages/react-components/react-button/library/jest.config.js b/packages/react-components/react-button/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-button/library/jest.config.js rename to packages/react-components/react-button/library/jest.config.cjs index 6d295e622d5f86..e54d99918878f6 100644 --- a/packages/react-components/react-button/library/jest.config.js +++ b/packages/react-components/react-button/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-button/library/package.json b/packages/react-components/react-button/library/package.json index d13504d4d8760e..33718d7307b656 100644 --- a/packages/react-components/react-button/library/package.json +++ b/packages/react-components/react-button/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-button", "version": "9.9.2", "description": "Fluent UI React Button component.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -37,17 +37,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-calendar-compat/library/.swcrc b/packages/react-components/react-calendar-compat/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-calendar-compat/library/.swcrc +++ b/packages/react-components/react-calendar-compat/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-calendar-compat/library/config/tests.js b/packages/react-components/react-calendar-compat/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-calendar-compat/library/config/tests.js rename to packages/react-components/react-calendar-compat/library/config/tests.cjs diff --git a/packages/react-components/react-calendar-compat/library/eslint.config.js b/packages/react-components/react-calendar-compat/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-calendar-compat/library/eslint.config.js rename to packages/react-components/react-calendar-compat/library/eslint.config.cjs diff --git a/packages/react-components/react-calendar-compat/library/jest.config.js b/packages/react-components/react-calendar-compat/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-calendar-compat/library/jest.config.js rename to packages/react-components/react-calendar-compat/library/jest.config.cjs index f6ebe01a386f10..08b05f06cc0aa8 100644 --- a/packages/react-components/react-calendar-compat/library/jest.config.js +++ b/packages/react-components/react-calendar-compat/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-calendar-compat/library/package.json b/packages/react-components/react-calendar-compat/library/package.json index 9d0c6a39eac4fb..9de7bedf7669d7 100644 --- a/packages/react-components/react-calendar-compat/library/package.json +++ b/packages/react-components/react-calendar-compat/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-calendar-compat", "version": "0.4.2", "description": "Calendar compat component for Fluent UI v9", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -32,10 +32,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -48,7 +52,9 @@ "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-card/library/.swcrc b/packages/react-components/react-card/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-card/library/.swcrc +++ b/packages/react-components/react-card/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-card/library/config/tests.js b/packages/react-components/react-card/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-card/library/config/tests.js rename to packages/react-components/react-card/library/config/tests.cjs diff --git a/packages/react-components/react-card/library/eslint.config.js b/packages/react-components/react-card/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-card/library/eslint.config.js rename to packages/react-components/react-card/library/eslint.config.cjs diff --git a/packages/react-components/react-card/library/jest.config.js b/packages/react-components/react-card/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-card/library/jest.config.js rename to packages/react-components/react-card/library/jest.config.cjs index 818a6fd0a53f6c..90654a8fb4d6a9 100644 --- a/packages/react-components/react-card/library/jest.config.js +++ b/packages/react-components/react-card/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-card/library/package.json b/packages/react-components/react-card/library/package.json index 51db6f7a1da402..5c1bc68a780660 100644 --- a/packages/react-components/react-card/library/package.json +++ b/packages/react-components/react-card/library/package.json @@ -3,7 +3,7 @@ "version": "9.7.0", "private": false, "description": "Card container components for Fluent UI React.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -36,17 +36,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-carousel/library/.swcrc b/packages/react-components/react-carousel/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-carousel/library/.swcrc +++ b/packages/react-components/react-carousel/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-carousel/library/config/tests.js b/packages/react-components/react-carousel/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-carousel/library/config/tests.js rename to packages/react-components/react-carousel/library/config/tests.cjs diff --git a/packages/react-components/react-carousel/library/eslint.config.js b/packages/react-components/react-carousel/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-carousel/library/eslint.config.js rename to packages/react-components/react-carousel/library/eslint.config.cjs diff --git a/packages/react-components/react-carousel/library/jest.config.js b/packages/react-components/react-carousel/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-carousel/library/jest.config.js rename to packages/react-components/react-carousel/library/jest.config.cjs index 6a3aa3bac93e0f..dfa00599f96a5d 100644 --- a/packages/react-components/react-carousel/library/jest.config.js +++ b/packages/react-components/react-carousel/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-carousel/library/package.json b/packages/react-components/react-carousel/library/package.json index 0829b5c2a0d1f5..89ec5c808ce14c 100644 --- a/packages/react-components/react-carousel/library/package.json +++ b/packages/react-components/react-carousel/library/package.json @@ -2,13 +2,14 @@ "name": "@fluentui/react-carousel", "version": "9.9.8", "description": "A composable carousel component that enables pagination with minimal rerenders", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -42,10 +43,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -54,5 +59,6 @@ "major", "prerelease" ] - } + }, + "type": "module" } diff --git a/packages/react-components/react-checkbox/library/.swcrc b/packages/react-components/react-checkbox/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-checkbox/library/.swcrc +++ b/packages/react-components/react-checkbox/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-checkbox/library/config/tests.js b/packages/react-components/react-checkbox/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-checkbox/library/config/tests.js rename to packages/react-components/react-checkbox/library/config/tests.cjs diff --git a/packages/react-components/react-checkbox/library/eslint.config.js b/packages/react-components/react-checkbox/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-checkbox/library/eslint.config.js rename to packages/react-components/react-checkbox/library/eslint.config.cjs diff --git a/packages/react-components/react-checkbox/library/jest.config.js b/packages/react-components/react-checkbox/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-checkbox/library/jest.config.js rename to packages/react-components/react-checkbox/library/jest.config.cjs index 99ac23722e12f8..e3fd33ab083621 100644 --- a/packages/react-components/react-checkbox/library/jest.config.js +++ b/packages/react-components/react-checkbox/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-checkbox/library/package.json b/packages/react-components/react-checkbox/library/package.json index b5508351d3da38..18cb0a81646229 100644 --- a/packages/react-components/react-checkbox/library/package.json +++ b/packages/react-components/react-checkbox/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-checkbox", "version": "9.6.2", "description": "Fluent UI checkbox component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -37,17 +37,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-color-picker/library/.swcrc b/packages/react-components/react-color-picker/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-color-picker/library/.swcrc +++ b/packages/react-components/react-color-picker/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-color-picker/library/config/tests.js b/packages/react-components/react-color-picker/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-color-picker/library/config/tests.js rename to packages/react-components/react-color-picker/library/config/tests.cjs diff --git a/packages/react-components/react-color-picker/library/eslint.config.js b/packages/react-components/react-color-picker/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-color-picker/library/eslint.config.js rename to packages/react-components/react-color-picker/library/eslint.config.cjs diff --git a/packages/react-components/react-color-picker/library/jest.config.js b/packages/react-components/react-color-picker/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-color-picker/library/jest.config.js rename to packages/react-components/react-color-picker/library/jest.config.cjs index 8476bbf5af6f97..23ccd81b507070 100644 --- a/packages/react-components/react-color-picker/library/jest.config.js +++ b/packages/react-components/react-color-picker/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-color-picker/library/package.json b/packages/react-components/react-color-picker/library/package.json index 786dd58faa9f73..73e24ee5d82921 100644 --- a/packages/react-components/react-color-picker/library/package.json +++ b/packages/react-components/react-color-picker/library/package.json @@ -2,13 +2,14 @@ "name": "@fluentui/react-color-picker", "version": "9.2.17", "description": "ColorPicker component for Fluent UI React.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -36,10 +37,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -48,5 +53,6 @@ "major", "prerelease" ] - } + }, + "type": "module" } diff --git a/packages/react-components/react-colorpicker-compat/.swcrc b/packages/react-components/react-colorpicker-compat/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-colorpicker-compat/.swcrc +++ b/packages/react-components/react-colorpicker-compat/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-colorpicker-compat/config/tests.js b/packages/react-components/react-colorpicker-compat/config/tests.cjs similarity index 100% rename from packages/react-components/react-colorpicker-compat/config/tests.js rename to packages/react-components/react-colorpicker-compat/config/tests.cjs diff --git a/packages/react-components/react-colorpicker-compat/eslint.config.js b/packages/react-components/react-colorpicker-compat/eslint.config.cjs similarity index 100% rename from packages/react-components/react-colorpicker-compat/eslint.config.js rename to packages/react-components/react-colorpicker-compat/eslint.config.cjs diff --git a/packages/react-components/react-colorpicker-compat/jest.config.js b/packages/react-components/react-colorpicker-compat/jest.config.cjs similarity index 96% rename from packages/react-components/react-colorpicker-compat/jest.config.js rename to packages/react-components/react-colorpicker-compat/jest.config.cjs index 76e2e0cbe6b4fd..a3e37cb6e05a5f 100644 --- a/packages/react-components/react-colorpicker-compat/jest.config.js +++ b/packages/react-components/react-colorpicker-compat/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-colorpicker-compat/package.json b/packages/react-components/react-colorpicker-compat/package.json index 29b9cbd65a1c7f..d2dab5dbf87c32 100644 --- a/packages/react-components/react-colorpicker-compat/package.json +++ b/packages/react-components/react-colorpicker-compat/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "private": true, "description": "React components for building web experiences", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -34,17 +34,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-combobox/library/.swcrc b/packages/react-components/react-combobox/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-combobox/library/.swcrc +++ b/packages/react-components/react-combobox/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-combobox/library/config/tests.js b/packages/react-components/react-combobox/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-combobox/library/config/tests.js rename to packages/react-components/react-combobox/library/config/tests.cjs diff --git a/packages/react-components/react-combobox/library/eslint.config.js b/packages/react-components/react-combobox/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-combobox/library/eslint.config.js rename to packages/react-components/react-combobox/library/eslint.config.cjs diff --git a/packages/react-components/react-combobox/library/jest.config.js b/packages/react-components/react-combobox/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-combobox/library/jest.config.js rename to packages/react-components/react-combobox/library/jest.config.cjs index c37f332f562def..81be9ff63afe7d 100644 --- a/packages/react-components/react-combobox/library/jest.config.js +++ b/packages/react-components/react-combobox/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-combobox/library/package.json b/packages/react-components/react-combobox/library/package.json index 4099c8a691e575..8aed82b30221ef 100644 --- a/packages/react-components/react-combobox/library/package.json +++ b/packages/react-components/react-combobox/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-combobox", "version": "9.17.2", "description": "Fluent UI React Combobox component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -41,17 +41,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-components/.swcrc b/packages/react-components/react-components/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-components/.swcrc +++ b/packages/react-components/react-components/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-components/config/tests.js b/packages/react-components/react-components/config/tests.cjs similarity index 100% rename from packages/react-components/react-components/config/tests.js rename to packages/react-components/react-components/config/tests.cjs diff --git a/packages/react-components/react-components/eslint.config.js b/packages/react-components/react-components/eslint.config.cjs similarity index 100% rename from packages/react-components/react-components/eslint.config.js rename to packages/react-components/react-components/eslint.config.cjs diff --git a/packages/react-components/react-components/jest.config.js b/packages/react-components/react-components/jest.config.cjs similarity index 96% rename from packages/react-components/react-components/jest.config.js rename to packages/react-components/react-components/jest.config.cjs index 094414a8839794..4dcb6401852aaa 100644 --- a/packages/react-components/react-components/jest.config.js +++ b/packages/react-components/react-components/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-components/package.json b/packages/react-components/react-components/package.json index 08c46c6f79d24c..b21f54f1a12717 100644 --- a/packages/react-components/react-components/package.json +++ b/packages/react-components/react-components/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-components", "version": "9.74.1", "description": "Suite package for converged React components", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -88,22 +88,31 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json", "./unstable": { - "types": "./dist/unstable.d.ts", - "node": "./lib-commonjs/unstable/index.js", - "import": "./lib/unstable/index.js", - "require": "./lib-commonjs/unstable/index.js" + "import": { + "types": "./dist/unstable.d.ts", + "default": "./lib/unstable/index.js" + }, + "require": { + "types": "./dist/unstable.d.cts", + "default": "./lib-commonjs/unstable/index.cjs" + } } }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs", "unstable" @@ -113,5 +122,6 @@ "makeStyles": "@griffel/tag-processor/make-styles", "makeResetStyles": "@griffel/tag-processor/make-reset-styles" } - } + }, + "type": "module" } diff --git a/packages/react-components/react-context-selector/.swcrc b/packages/react-components/react-context-selector/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-context-selector/.swcrc +++ b/packages/react-components/react-context-selector/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-context-selector/config/tests.js b/packages/react-components/react-context-selector/config/tests.cjs similarity index 100% rename from packages/react-components/react-context-selector/config/tests.js rename to packages/react-components/react-context-selector/config/tests.cjs diff --git a/packages/react-components/react-context-selector/eslint.config.js b/packages/react-components/react-context-selector/eslint.config.cjs similarity index 100% rename from packages/react-components/react-context-selector/eslint.config.js rename to packages/react-components/react-context-selector/eslint.config.cjs diff --git a/packages/react-components/react-context-selector/jest.config.js b/packages/react-components/react-context-selector/jest.config.cjs similarity index 96% rename from packages/react-components/react-context-selector/jest.config.js rename to packages/react-components/react-context-selector/jest.config.cjs index 61d20ddfe16b41..caf127af7ea434 100644 --- a/packages/react-components/react-context-selector/jest.config.js +++ b/packages/react-components/react-context-selector/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/react-components/react-context-selector/package.json b/packages/react-components/react-context-selector/package.json index ccff3171035bbc..ccc0d087767135 100644 --- a/packages/react-components/react-context-selector/package.json +++ b/packages/react-components/react-context-selector/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-context-selector", "version": "9.2.17", "description": "React useContextSelector hook in userland", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -33,17 +33,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-datepicker-compat/library/.swcrc b/packages/react-components/react-datepicker-compat/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-datepicker-compat/library/.swcrc +++ b/packages/react-components/react-datepicker-compat/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-datepicker-compat/library/config/tests.js b/packages/react-components/react-datepicker-compat/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-datepicker-compat/library/config/tests.js rename to packages/react-components/react-datepicker-compat/library/config/tests.cjs diff --git a/packages/react-components/react-datepicker-compat/library/eslint.config.js b/packages/react-components/react-datepicker-compat/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-datepicker-compat/library/eslint.config.js rename to packages/react-components/react-datepicker-compat/library/eslint.config.cjs diff --git a/packages/react-components/react-datepicker-compat/library/jest.config.js b/packages/react-components/react-datepicker-compat/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-datepicker-compat/library/jest.config.js rename to packages/react-components/react-datepicker-compat/library/jest.config.cjs index f78b4bb2bdb9c7..678ba315e3b226 100644 --- a/packages/react-components/react-datepicker-compat/library/jest.config.js +++ b/packages/react-components/react-datepicker-compat/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-datepicker-compat/library/package.json b/packages/react-components/react-datepicker-compat/library/package.json index 1382c1d031f478..1187eb75575fb5 100644 --- a/packages/react-components/react-datepicker-compat/library/package.json +++ b/packages/react-components/react-datepicker-compat/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-datepicker-compat", "version": "0.6.32", "description": "React components for building web experiences", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -42,17 +42,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-dialog/library/.swcrc b/packages/react-components/react-dialog/library/.swcrc index 7c60535c03e245..a2c577cb1f91ea 100644 --- a/packages/react-components/react-dialog/library/.swcrc +++ b/packages/react-components/react-dialog/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "experimental": { "plugins": [["swc-plugin-de-indent-template-literal", {}]] }, diff --git a/packages/react-components/react-dialog/library/config/tests.js b/packages/react-components/react-dialog/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-dialog/library/config/tests.js rename to packages/react-components/react-dialog/library/config/tests.cjs diff --git a/packages/react-components/react-dialog/library/eslint.config.js b/packages/react-components/react-dialog/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-dialog/library/eslint.config.js rename to packages/react-components/react-dialog/library/eslint.config.cjs diff --git a/packages/react-components/react-dialog/library/jest.config.js b/packages/react-components/react-dialog/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-dialog/library/jest.config.js rename to packages/react-components/react-dialog/library/jest.config.cjs index 9bb2d9dde732d7..6ef437810dd4d8 100644 --- a/packages/react-components/react-dialog/library/jest.config.js +++ b/packages/react-components/react-dialog/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-dialog/library/package.json b/packages/react-components/react-dialog/library/package.json index f93afcb102872d..5ecd3fe8beef75 100644 --- a/packages/react-components/react-dialog/library/package.json +++ b/packages/react-components/react-dialog/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-dialog", "version": "9.18.1", "description": "Dialog component for Fluent UI React", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -41,17 +41,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-divider/library/.swcrc b/packages/react-components/react-divider/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-divider/library/.swcrc +++ b/packages/react-components/react-divider/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-divider/library/config/tests.js b/packages/react-components/react-divider/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-divider/library/config/tests.js rename to packages/react-components/react-divider/library/config/tests.cjs diff --git a/packages/react-components/react-divider/library/eslint.config.js b/packages/react-components/react-divider/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-divider/library/eslint.config.js rename to packages/react-components/react-divider/library/eslint.config.cjs diff --git a/packages/react-components/react-divider/library/jest.config.js b/packages/react-components/react-divider/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-divider/library/jest.config.js rename to packages/react-components/react-divider/library/jest.config.cjs index e54733aa0d7ce0..f64025affd2a4b 100644 --- a/packages/react-components/react-divider/library/jest.config.js +++ b/packages/react-components/react-divider/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-divider/library/package.json b/packages/react-components/react-divider/library/package.json index ec0ea7b700ea4e..7df5f31eb7f83e 100644 --- a/packages/react-components/react-divider/library/package.json +++ b/packages/react-components/react-divider/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-divider", "version": "9.7.2", "description": "Fluent UI component to visually separate content.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -33,17 +33,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-drawer/library/.swcrc b/packages/react-components/react-drawer/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-drawer/library/.swcrc +++ b/packages/react-components/react-drawer/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-drawer/library/config/tests.js b/packages/react-components/react-drawer/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-drawer/library/config/tests.js rename to packages/react-components/react-drawer/library/config/tests.cjs diff --git a/packages/react-components/react-drawer/library/eslint.config.js b/packages/react-components/react-drawer/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-drawer/library/eslint.config.js rename to packages/react-components/react-drawer/library/eslint.config.cjs diff --git a/packages/react-components/react-drawer/library/jest.config.js b/packages/react-components/react-drawer/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-drawer/library/jest.config.js rename to packages/react-components/react-drawer/library/jest.config.cjs index 30599cabbbac9c..0c87b897561fe9 100644 --- a/packages/react-components/react-drawer/library/jest.config.js +++ b/packages/react-components/react-drawer/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-drawer/library/package.json b/packages/react-components/react-drawer/library/package.json index d09483537ee776..d2aa41e5ada967 100644 --- a/packages/react-components/react-drawer/library/package.json +++ b/packages/react-components/react-drawer/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-drawer", "version": "9.13.0", "description": "Drawer components for Fluent UI React", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -38,17 +38,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-field/library/.swcrc b/packages/react-components/react-field/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-field/library/.swcrc +++ b/packages/react-components/react-field/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-field/library/config/tests.js b/packages/react-components/react-field/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-field/library/config/tests.js rename to packages/react-components/react-field/library/config/tests.cjs diff --git a/packages/react-components/react-field/library/eslint.config.js b/packages/react-components/react-field/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-field/library/eslint.config.js rename to packages/react-components/react-field/library/eslint.config.cjs diff --git a/packages/react-components/react-field/library/jest.config.js b/packages/react-components/react-field/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-field/library/jest.config.js rename to packages/react-components/react-field/library/jest.config.cjs index 40140f5bad8a89..6774eb527a2a3c 100644 --- a/packages/react-components/react-field/library/jest.config.js +++ b/packages/react-components/react-field/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-field/library/package.json b/packages/react-components/react-field/library/package.json index a091a8a6ff8ca0..80af4946369f25 100644 --- a/packages/react-components/react-field/library/package.json +++ b/packages/react-components/react-field/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-field", "version": "9.5.2", "description": "Fluent UI Field components", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -36,17 +36,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-headless-components-preview/library/.swcrc b/packages/react-components/react-headless-components-preview/library/.swcrc index 6ae360015ce576..67f33cb59414a3 100644 --- a/packages/react-components/react-headless-components-preview/library/.swcrc +++ b/packages/react-components/react-headless-components-preview/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-headless-components-preview/library/config/tests.js b/packages/react-components/react-headless-components-preview/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-headless-components-preview/library/config/tests.js rename to packages/react-components/react-headless-components-preview/library/config/tests.cjs diff --git a/packages/react-components/react-headless-components-preview/library/eslint.config.js b/packages/react-components/react-headless-components-preview/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-headless-components-preview/library/eslint.config.js rename to packages/react-components/react-headless-components-preview/library/eslint.config.cjs diff --git a/packages/react-components/react-headless-components-preview/library/jest.config.js b/packages/react-components/react-headless-components-preview/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-headless-components-preview/library/jest.config.js rename to packages/react-components/react-headless-components-preview/library/jest.config.cjs index eafebaf8130b29..37c5447140c1d4 100644 --- a/packages/react-components/react-headless-components-preview/library/jest.config.js +++ b/packages/react-components/react-headless-components-preview/library/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/react-components/react-headless-components-preview/library/package.json b/packages/react-components/react-headless-components-preview/library/package.json index 54c7d57430ef4d..21d520424bc5ba 100644 --- a/packages/react-components/react-headless-components-preview/library/package.json +++ b/packages/react-components/react-headless-components-preview/library/package.json @@ -2,13 +2,14 @@ "name": "@fluentui/react-headless-components-preview", "version": "0.2.0", "description": "Fluent UI React Headless Components", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -75,280 +76,464 @@ }, "exports": { "./accordion": { - "types": "./dist/accordion.d.ts", - "node": "./lib-commonjs/accordion.js", - "import": "./lib/accordion.js", - "require": "./lib-commonjs/accordion.js" + "import": { + "types": "./dist/accordion.d.ts", + "default": "./lib/accordion.js" + }, + "require": { + "types": "./dist/accordion.d.cts", + "default": "./lib-commonjs/accordion.cjs" + } }, "./avatar": { - "types": "./dist/avatar.d.ts", - "node": "./lib-commonjs/avatar.js", - "import": "./lib/avatar.js", - "require": "./lib-commonjs/avatar.js" + "import": { + "types": "./dist/avatar.d.ts", + "default": "./lib/avatar.js" + }, + "require": { + "types": "./dist/avatar.d.cts", + "default": "./lib-commonjs/avatar.cjs" + } }, "./badge": { - "types": "./dist/badge.d.ts", - "node": "./lib-commonjs/badge.js", - "import": "./lib/badge.js", - "require": "./lib-commonjs/badge.js" + "import": { + "types": "./dist/badge.d.ts", + "default": "./lib/badge.js" + }, + "require": { + "types": "./dist/badge.d.cts", + "default": "./lib-commonjs/badge.cjs" + } }, "./breadcrumb": { - "types": "./dist/breadcrumb.d.ts", - "node": "./lib-commonjs/breadcrumb.js", - "import": "./lib/breadcrumb.js", - "require": "./lib-commonjs/breadcrumb.js" + "import": { + "types": "./dist/breadcrumb.d.ts", + "default": "./lib/breadcrumb.js" + }, + "require": { + "types": "./dist/breadcrumb.d.cts", + "default": "./lib-commonjs/breadcrumb.cjs" + } }, "./button": { - "types": "./dist/button.d.ts", - "node": "./lib-commonjs/button.js", - "import": "./lib/button.js", - "require": "./lib-commonjs/button.js" + "import": { + "types": "./dist/button.d.ts", + "default": "./lib/button.js" + }, + "require": { + "types": "./dist/button.d.cts", + "default": "./lib-commonjs/button.cjs" + } }, "./card": { - "types": "./dist/card.d.ts", - "node": "./lib-commonjs/card.js", - "import": "./lib/card.js", - "require": "./lib-commonjs/card.js" + "import": { + "types": "./dist/card.d.ts", + "default": "./lib/card.js" + }, + "require": { + "types": "./dist/card.d.cts", + "default": "./lib-commonjs/card.cjs" + } }, "./checkbox": { - "types": "./dist/checkbox.d.ts", - "node": "./lib-commonjs/checkbox.js", - "import": "./lib/checkbox.js", - "require": "./lib-commonjs/checkbox.js" + "import": { + "types": "./dist/checkbox.d.ts", + "default": "./lib/checkbox.js" + }, + "require": { + "types": "./dist/checkbox.d.cts", + "default": "./lib-commonjs/checkbox.cjs" + } }, "./combobox": { - "types": "./dist/combobox.d.ts", - "node": "./lib-commonjs/combobox.js", - "import": "./lib/combobox.js", - "require": "./lib-commonjs/combobox.js" + "import": { + "types": "./dist/combobox.d.ts", + "default": "./lib/combobox.js" + }, + "require": { + "types": "./dist/combobox.d.cts", + "default": "./lib-commonjs/combobox.cjs" + } }, "./dialog": { - "types": "./dist/dialog.d.ts", - "node": "./lib-commonjs/dialog.js", - "import": "./lib/dialog.js", - "require": "./lib-commonjs/dialog.js" + "import": { + "types": "./dist/dialog.d.ts", + "default": "./lib/dialog.js" + }, + "require": { + "types": "./dist/dialog.d.cts", + "default": "./lib-commonjs/dialog.cjs" + } }, "./divider": { - "types": "./dist/divider.d.ts", - "node": "./lib-commonjs/divider.js", - "import": "./lib/divider.js", - "require": "./lib-commonjs/divider.js" + "import": { + "types": "./dist/divider.d.ts", + "default": "./lib/divider.js" + }, + "require": { + "types": "./dist/divider.d.cts", + "default": "./lib-commonjs/divider.cjs" + } }, "./drawer": { - "types": "./dist/drawer.d.ts", - "node": "./lib-commonjs/drawer.js", - "import": "./lib/drawer.js", - "require": "./lib-commonjs/drawer.js" + "import": { + "types": "./dist/drawer.d.ts", + "default": "./lib/drawer.js" + }, + "require": { + "types": "./dist/drawer.d.cts", + "default": "./lib-commonjs/drawer.cjs" + } }, "./dropdown": { - "types": "./dist/dropdown.d.ts", - "node": "./lib-commonjs/dropdown.js", - "import": "./lib/dropdown.js", - "require": "./lib-commonjs/dropdown.js" + "import": { + "types": "./dist/dropdown.d.ts", + "default": "./lib/dropdown.js" + }, + "require": { + "types": "./dist/dropdown.d.cts", + "default": "./lib-commonjs/dropdown.cjs" + } }, "./field": { - "types": "./dist/field.d.ts", - "node": "./lib-commonjs/field.js", - "import": "./lib/field.js", - "require": "./lib-commonjs/field.js" + "import": { + "types": "./dist/field.d.ts", + "default": "./lib/field.js" + }, + "require": { + "types": "./dist/field.d.cts", + "default": "./lib-commonjs/field.cjs" + } }, "./image": { - "types": "./dist/image.d.ts", - "node": "./lib-commonjs/image.js", - "import": "./lib/image.js", - "require": "./lib-commonjs/image.js" + "import": { + "types": "./dist/image.d.ts", + "default": "./lib/image.js" + }, + "require": { + "types": "./dist/image.d.cts", + "default": "./lib-commonjs/image.cjs" + } }, "./info-label": { - "types": "./dist/info-label.d.ts", - "node": "./lib-commonjs/info-label.js", - "import": "./lib/info-label.js", - "require": "./lib-commonjs/info-label.js" + "import": { + "types": "./dist/info-label.d.ts", + "default": "./lib/info-label.js" + }, + "require": { + "types": "./dist/info-label.d.cts", + "default": "./lib-commonjs/info-label.cjs" + } }, "./input": { - "types": "./dist/input.d.ts", - "node": "./lib-commonjs/input.js", - "import": "./lib/input.js", - "require": "./lib-commonjs/input.js" + "import": { + "types": "./dist/input.d.ts", + "default": "./lib/input.js" + }, + "require": { + "types": "./dist/input.d.cts", + "default": "./lib-commonjs/input.cjs" + } }, "./interaction-tag": { - "types": "./dist/interaction-tag.d.ts", - "node": "./lib-commonjs/interaction-tag.js", - "import": "./lib/interaction-tag.js", - "require": "./lib-commonjs/interaction-tag.js" + "import": { + "types": "./dist/interaction-tag.d.ts", + "default": "./lib/interaction-tag.js" + }, + "require": { + "types": "./dist/interaction-tag.d.cts", + "default": "./lib-commonjs/interaction-tag.cjs" + } }, "./label": { - "types": "./dist/label.d.ts", - "node": "./lib-commonjs/label.js", - "import": "./lib/label.js", - "require": "./lib-commonjs/label.js" + "import": { + "types": "./dist/label.d.ts", + "default": "./lib/label.js" + }, + "require": { + "types": "./dist/label.d.cts", + "default": "./lib-commonjs/label.cjs" + } }, "./link": { - "types": "./dist/link.d.ts", - "node": "./lib-commonjs/link.js", - "import": "./lib/link.js", - "require": "./lib-commonjs/link.js" + "import": { + "types": "./dist/link.d.ts", + "default": "./lib/link.js" + }, + "require": { + "types": "./dist/link.d.cts", + "default": "./lib-commonjs/link.cjs" + } }, "./menu": { - "types": "./dist/menu.d.ts", - "node": "./lib-commonjs/menu.js", - "import": "./lib/menu.js", - "require": "./lib-commonjs/menu.js" + "import": { + "types": "./dist/menu.d.ts", + "default": "./lib/menu.js" + }, + "require": { + "types": "./dist/menu.d.cts", + "default": "./lib-commonjs/menu.cjs" + } }, "./message-bar": { - "types": "./dist/message-bar.d.ts", - "node": "./lib-commonjs/message-bar.js", - "import": "./lib/message-bar.js", - "require": "./lib-commonjs/message-bar.js" + "import": { + "types": "./dist/message-bar.d.ts", + "default": "./lib/message-bar.js" + }, + "require": { + "types": "./dist/message-bar.d.cts", + "default": "./lib-commonjs/message-bar.cjs" + } }, "./nav": { - "types": "./dist/nav.d.ts", - "node": "./lib-commonjs/nav.js", - "import": "./lib/nav.js", - "require": "./lib-commonjs/nav.js" + "import": { + "types": "./dist/nav.d.ts", + "default": "./lib/nav.js" + }, + "require": { + "types": "./dist/nav.d.cts", + "default": "./lib-commonjs/nav.cjs" + } }, "./persona": { - "types": "./dist/persona.d.ts", - "node": "./lib-commonjs/persona.js", - "import": "./lib/persona.js", - "require": "./lib-commonjs/persona.js" + "import": { + "types": "./dist/persona.d.ts", + "default": "./lib/persona.js" + }, + "require": { + "types": "./dist/persona.d.cts", + "default": "./lib-commonjs/persona.cjs" + } }, "./popover": { - "types": "./dist/popover.d.ts", - "node": "./lib-commonjs/popover.js", - "import": "./lib/popover.js", - "require": "./lib-commonjs/popover.js" + "import": { + "types": "./dist/popover.d.ts", + "default": "./lib/popover.js" + }, + "require": { + "types": "./dist/popover.d.cts", + "default": "./lib-commonjs/popover.cjs" + } }, "./positioning": { - "types": "./dist/positioning.d.ts", - "node": "./lib-commonjs/positioning.js", - "import": "./lib/positioning.js", - "require": "./lib-commonjs/positioning.js" + "import": { + "types": "./dist/positioning.d.ts", + "default": "./lib/positioning.js" + }, + "require": { + "types": "./dist/positioning.d.cts", + "default": "./lib-commonjs/positioning.cjs" + } }, "./progress-bar": { - "types": "./dist/progress-bar.d.ts", - "node": "./lib-commonjs/progress-bar.js", - "import": "./lib/progress-bar.js", - "require": "./lib-commonjs/progress-bar.js" + "import": { + "types": "./dist/progress-bar.d.ts", + "default": "./lib/progress-bar.js" + }, + "require": { + "types": "./dist/progress-bar.d.cts", + "default": "./lib-commonjs/progress-bar.cjs" + } }, "./provider": { - "types": "./dist/provider.d.ts", - "node": "./lib-commonjs/provider.js", - "import": "./lib/provider.js", - "require": "./lib-commonjs/provider.js" + "import": { + "types": "./dist/provider.d.ts", + "default": "./lib/provider.js" + }, + "require": { + "types": "./dist/provider.d.cts", + "default": "./lib-commonjs/provider.cjs" + } }, "./radio-group": { - "types": "./dist/radio-group.d.ts", - "node": "./lib-commonjs/radio-group.js", - "import": "./lib/radio-group.js", - "require": "./lib-commonjs/radio-group.js" + "import": { + "types": "./dist/radio-group.d.ts", + "default": "./lib/radio-group.js" + }, + "require": { + "types": "./dist/radio-group.d.cts", + "default": "./lib-commonjs/radio-group.cjs" + } }, "./rating": { - "types": "./dist/rating.d.ts", - "node": "./lib-commonjs/rating.js", - "import": "./lib/rating.js", - "require": "./lib-commonjs/rating.js" + "import": { + "types": "./dist/rating.d.ts", + "default": "./lib/rating.js" + }, + "require": { + "types": "./dist/rating.d.cts", + "default": "./lib-commonjs/rating.cjs" + } }, "./rating-display": { - "types": "./dist/rating-display.d.ts", - "node": "./lib-commonjs/rating-display.js", - "import": "./lib/rating-display.js", - "require": "./lib-commonjs/rating-display.js" + "import": { + "types": "./dist/rating-display.d.ts", + "default": "./lib/rating-display.js" + }, + "require": { + "types": "./dist/rating-display.d.cts", + "default": "./lib-commonjs/rating-display.cjs" + } }, "./search-box": { - "types": "./dist/search-box.d.ts", - "node": "./lib-commonjs/search-box.js", - "import": "./lib/search-box.js", - "require": "./lib-commonjs/search-box.js" + "import": { + "types": "./dist/search-box.d.ts", + "default": "./lib/search-box.js" + }, + "require": { + "types": "./dist/search-box.d.cts", + "default": "./lib-commonjs/search-box.cjs" + } }, "./select": { - "types": "./dist/select.d.ts", - "node": "./lib-commonjs/select.js", - "import": "./lib/select.js", - "require": "./lib-commonjs/select.js" + "import": { + "types": "./dist/select.d.ts", + "default": "./lib/select.js" + }, + "require": { + "types": "./dist/select.d.cts", + "default": "./lib-commonjs/select.cjs" + } }, "./skeleton": { - "types": "./dist/skeleton.d.ts", - "node": "./lib-commonjs/skeleton.js", - "import": "./lib/skeleton.js", - "require": "./lib-commonjs/skeleton.js" + "import": { + "types": "./dist/skeleton.d.ts", + "default": "./lib/skeleton.js" + }, + "require": { + "types": "./dist/skeleton.d.cts", + "default": "./lib-commonjs/skeleton.cjs" + } }, "./slider": { - "types": "./dist/slider.d.ts", - "node": "./lib-commonjs/slider.js", - "import": "./lib/slider.js", - "require": "./lib-commonjs/slider.js" + "import": { + "types": "./dist/slider.d.ts", + "default": "./lib/slider.js" + }, + "require": { + "types": "./dist/slider.d.cts", + "default": "./lib-commonjs/slider.cjs" + } }, "./spin-button": { - "types": "./dist/spin-button.d.ts", - "node": "./lib-commonjs/spin-button.js", - "import": "./lib/spin-button.js", - "require": "./lib-commonjs/spin-button.js" + "import": { + "types": "./dist/spin-button.d.ts", + "default": "./lib/spin-button.js" + }, + "require": { + "types": "./dist/spin-button.d.cts", + "default": "./lib-commonjs/spin-button.cjs" + } }, "./spinner": { - "types": "./dist/spinner.d.ts", - "node": "./lib-commonjs/spinner.js", - "import": "./lib/spinner.js", - "require": "./lib-commonjs/spinner.js" + "import": { + "types": "./dist/spinner.d.ts", + "default": "./lib/spinner.js" + }, + "require": { + "types": "./dist/spinner.d.cts", + "default": "./lib-commonjs/spinner.cjs" + } }, "./switch": { - "types": "./dist/switch.d.ts", - "node": "./lib-commonjs/switch.js", - "import": "./lib/switch.js", - "require": "./lib-commonjs/switch.js" + "import": { + "types": "./dist/switch.d.ts", + "default": "./lib/switch.js" + }, + "require": { + "types": "./dist/switch.d.cts", + "default": "./lib-commonjs/switch.cjs" + } }, "./tab-list": { - "types": "./dist/tab-list.d.ts", - "node": "./lib-commonjs/tab-list.js", - "import": "./lib/tab-list.js", - "require": "./lib-commonjs/tab-list.js" + "import": { + "types": "./dist/tab-list.d.ts", + "default": "./lib/tab-list.js" + }, + "require": { + "types": "./dist/tab-list.d.cts", + "default": "./lib-commonjs/tab-list.cjs" + } }, "./tag": { - "types": "./dist/tag.d.ts", - "node": "./lib-commonjs/tag.js", - "import": "./lib/tag.js", - "require": "./lib-commonjs/tag.js" + "import": { + "types": "./dist/tag.d.ts", + "default": "./lib/tag.js" + }, + "require": { + "types": "./dist/tag.d.cts", + "default": "./lib-commonjs/tag.cjs" + } }, "./tag-group": { - "types": "./dist/tag-group.d.ts", - "node": "./lib-commonjs/tag-group.js", - "import": "./lib/tag-group.js", - "require": "./lib-commonjs/tag-group.js" + "import": { + "types": "./dist/tag-group.d.ts", + "default": "./lib/tag-group.js" + }, + "require": { + "types": "./dist/tag-group.d.cts", + "default": "./lib-commonjs/tag-group.cjs" + } }, "./teaching-popover": { - "types": "./dist/teaching-popover.d.ts", - "node": "./lib-commonjs/teaching-popover.js", - "import": "./lib/teaching-popover.js", - "require": "./lib-commonjs/teaching-popover.js" + "import": { + "types": "./dist/teaching-popover.d.ts", + "default": "./lib/teaching-popover.js" + }, + "require": { + "types": "./dist/teaching-popover.d.cts", + "default": "./lib-commonjs/teaching-popover.cjs" + } }, "./textarea": { - "types": "./dist/textarea.d.ts", - "node": "./lib-commonjs/textarea.js", - "import": "./lib/textarea.js", - "require": "./lib-commonjs/textarea.js" + "import": { + "types": "./dist/textarea.d.ts", + "default": "./lib/textarea.js" + }, + "require": { + "types": "./dist/textarea.d.cts", + "default": "./lib-commonjs/textarea.cjs" + } }, "./toast": { - "types": "./dist/toast.d.ts", - "node": "./lib-commonjs/toast.js", - "import": "./lib/toast.js", - "require": "./lib-commonjs/toast.js" + "import": { + "types": "./dist/toast.d.ts", + "default": "./lib/toast.js" + }, + "require": { + "types": "./dist/toast.d.cts", + "default": "./lib-commonjs/toast.cjs" + } }, "./toggle-button": { - "types": "./dist/toggle-button.d.ts", - "node": "./lib-commonjs/toggle-button.js", - "import": "./lib/toggle-button.js", - "require": "./lib-commonjs/toggle-button.js" + "import": { + "types": "./dist/toggle-button.d.ts", + "default": "./lib/toggle-button.js" + }, + "require": { + "types": "./dist/toggle-button.d.cts", + "default": "./lib-commonjs/toggle-button.cjs" + } }, "./toolbar": { - "types": "./dist/toolbar.d.ts", - "node": "./lib-commonjs/toolbar.js", - "import": "./lib/toolbar.js", - "require": "./lib-commonjs/toolbar.js" + "import": { + "types": "./dist/toolbar.d.ts", + "default": "./lib/toolbar.js" + }, + "require": { + "types": "./dist/toolbar.d.cts", + "default": "./lib-commonjs/toolbar.cjs" + } }, "./tooltip": { - "types": "./dist/tooltip.d.ts", - "node": "./lib-commonjs/tooltip.js", - "import": "./lib/tooltip.js", - "require": "./lib-commonjs/tooltip.js" + "import": { + "types": "./dist/tooltip.d.ts", + "default": "./lib/tooltip.js" + }, + "require": { + "types": "./dist/tooltip.d.cts", + "default": "./lib-commonjs/tooltip.cjs" + } }, "./package.json": "./package.json" }, @@ -361,5 +546,6 @@ "devDependencies": { "@fluentui/scripts-cypress": "*", "@oddbird/popover-polyfill": "^0.6.1" - } + }, + "type": "module" } diff --git a/packages/react-components/react-icons-compat/library/.swcrc b/packages/react-components/react-icons-compat/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-icons-compat/library/.swcrc +++ b/packages/react-components/react-icons-compat/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-icons-compat/library/config/tests.js b/packages/react-components/react-icons-compat/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-icons-compat/library/config/tests.js rename to packages/react-components/react-icons-compat/library/config/tests.cjs diff --git a/packages/react-components/react-icons-compat/library/eslint.config.js b/packages/react-components/react-icons-compat/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-icons-compat/library/eslint.config.js rename to packages/react-components/react-icons-compat/library/eslint.config.cjs diff --git a/packages/react-components/react-icons-compat/library/jest.config.js b/packages/react-components/react-icons-compat/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-icons-compat/library/jest.config.js rename to packages/react-components/react-icons-compat/library/jest.config.cjs index a2f259c7b7791b..eca792969af665 100644 --- a/packages/react-components/react-icons-compat/library/jest.config.js +++ b/packages/react-components/react-icons-compat/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-icons-compat/library/package.json b/packages/react-components/react-icons-compat/library/package.json index e2caa588e8fce6..403cada48aa168 100644 --- a/packages/react-components/react-icons-compat/library/package.json +++ b/packages/react-components/react-icons-compat/library/package.json @@ -2,13 +2,14 @@ "name": "@fluentui/react-icons-compat", "version": "0.2.20", "description": "Package for icon utility methods used by font and svg icons.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -33,10 +34,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -45,5 +50,6 @@ "major", "prerelease" ] - } + }, + "type": "module" } diff --git a/packages/react-components/react-image/library/.swcrc b/packages/react-components/react-image/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-image/library/.swcrc +++ b/packages/react-components/react-image/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-image/library/config/tests.js b/packages/react-components/react-image/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-image/library/config/tests.js rename to packages/react-components/react-image/library/config/tests.cjs diff --git a/packages/react-components/react-image/library/eslint.config.js b/packages/react-components/react-image/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-image/library/eslint.config.js rename to packages/react-components/react-image/library/eslint.config.cjs diff --git a/packages/react-components/react-image/library/jest.config.js b/packages/react-components/react-image/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-image/library/jest.config.js rename to packages/react-components/react-image/library/jest.config.cjs index 1228d0798c7e23..e728a28fab8df5 100644 --- a/packages/react-components/react-image/library/jest.config.js +++ b/packages/react-components/react-image/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-image/library/package.json b/packages/react-components/react-image/library/package.json index b51c320b9751b3..0e9abdef01dbac 100644 --- a/packages/react-components/react-image/library/package.json +++ b/packages/react-components/react-image/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-image", "version": "9.4.2", "description": "Fluent UI React Image component.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -33,17 +33,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-infolabel/library/.swcrc b/packages/react-components/react-infolabel/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-infolabel/library/.swcrc +++ b/packages/react-components/react-infolabel/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-infolabel/library/config/tests.js b/packages/react-components/react-infolabel/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-infolabel/library/config/tests.js rename to packages/react-components/react-infolabel/library/config/tests.cjs diff --git a/packages/react-components/react-infolabel/library/eslint.config.js b/packages/react-components/react-infolabel/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-infolabel/library/eslint.config.js rename to packages/react-components/react-infolabel/library/eslint.config.cjs diff --git a/packages/react-components/react-infolabel/library/jest.config.js b/packages/react-components/react-infolabel/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-infolabel/library/jest.config.js rename to packages/react-components/react-infolabel/library/jest.config.cjs index c871bda7ac9f7c..3bc4feac803afd 100644 --- a/packages/react-components/react-infolabel/library/jest.config.js +++ b/packages/react-components/react-infolabel/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-infolabel/library/package.json b/packages/react-components/react-infolabel/library/package.json index 62b41cf09157df..ccfeb13cb1ba9e 100644 --- a/packages/react-components/react-infolabel/library/package.json +++ b/packages/react-components/react-infolabel/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-infolabel", "version": "9.4.21", "description": "InfoLabel component for Fluent UI v9", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -31,10 +31,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -47,7 +51,9 @@ "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-input/library/.swcrc b/packages/react-components/react-input/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-input/library/.swcrc +++ b/packages/react-components/react-input/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-input/library/config/tests.js b/packages/react-components/react-input/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-input/library/config/tests.js rename to packages/react-components/react-input/library/config/tests.cjs diff --git a/packages/react-components/react-input/library/eslint.config.js b/packages/react-components/react-input/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-input/library/eslint.config.js rename to packages/react-components/react-input/library/eslint.config.cjs diff --git a/packages/react-components/react-input/library/jest.config.js b/packages/react-components/react-input/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-input/library/jest.config.js rename to packages/react-components/react-input/library/jest.config.cjs index 699e1f6ec8e8db..977db72a53f836 100644 --- a/packages/react-components/react-input/library/jest.config.js +++ b/packages/react-components/react-input/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-input/library/package.json b/packages/react-components/react-input/library/package.json index 3ba46e0c66db22..7ba5b9282de1f3 100644 --- a/packages/react-components/react-input/library/package.json +++ b/packages/react-components/react-input/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-input", "version": "9.8.3", "description": "Fluent UI React Input component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -34,17 +34,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-jsx-runtime/.swcrc b/packages/react-components/react-jsx-runtime/.swcrc index 7c60535c03e245..a2c577cb1f91ea 100644 --- a/packages/react-components/react-jsx-runtime/.swcrc +++ b/packages/react-components/react-jsx-runtime/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "experimental": { "plugins": [["swc-plugin-de-indent-template-literal", {}]] }, diff --git a/packages/react-components/react-jsx-runtime/config/tests.js b/packages/react-components/react-jsx-runtime/config/tests.cjs similarity index 100% rename from packages/react-components/react-jsx-runtime/config/tests.js rename to packages/react-components/react-jsx-runtime/config/tests.cjs diff --git a/packages/react-components/react-jsx-runtime/eslint.config.js b/packages/react-components/react-jsx-runtime/eslint.config.cjs similarity index 100% rename from packages/react-components/react-jsx-runtime/eslint.config.js rename to packages/react-components/react-jsx-runtime/eslint.config.cjs diff --git a/packages/react-components/react-jsx-runtime/jest.config.js b/packages/react-components/react-jsx-runtime/jest.config.cjs similarity index 96% rename from packages/react-components/react-jsx-runtime/jest.config.js rename to packages/react-components/react-jsx-runtime/jest.config.cjs index f5ec29eee00d72..eb472121804260 100644 --- a/packages/react-components/react-jsx-runtime/jest.config.js +++ b/packages/react-components/react-jsx-runtime/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/react-components/react-jsx-runtime/package.json b/packages/react-components/react-jsx-runtime/package.json index 5faf9abc552e38..444989af808d11 100644 --- a/packages/react-components/react-jsx-runtime/package.json +++ b/packages/react-components/react-jsx-runtime/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-jsx-runtime", "version": "9.4.3", "description": "Custom JSX runtime for @fluentui/react-components", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -27,31 +27,45 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./jsx-dev-runtime": { - "types": "./dist/jsx-dev-runtime.d.ts", - "node": "./lib-commonjs/jsx-dev-runtime.js", - "import": "./lib/jsx-dev-runtime.js", - "require": "./lib-commonjs/jsx-dev-runtime.js" + "import": { + "types": "./dist/jsx-dev-runtime.d.ts", + "default": "./lib/jsx-dev-runtime.js" + }, + "require": { + "types": "./dist/jsx-dev-runtime.d.cts", + "default": "./lib-commonjs/jsx-dev-runtime.cjs" + } }, "./jsx-runtime": { - "types": "./dist/jsx-runtime.d.ts", - "node": "./lib-commonjs/jsx-runtime.js", - "import": "./lib/jsx-runtime.js", - "require": "./lib-commonjs/jsx-runtime.js" + "import": { + "types": "./dist/jsx-runtime.d.ts", + "default": "./lib/jsx-runtime.js" + }, + "require": { + "types": "./dist/jsx-runtime.d.cts", + "default": "./lib-commonjs/jsx-runtime.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "jsx-dev-runtime", "jsx-runtime", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-label/library/.swcrc b/packages/react-components/react-label/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-label/library/.swcrc +++ b/packages/react-components/react-label/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-label/library/config/tests.js b/packages/react-components/react-label/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-label/library/config/tests.js rename to packages/react-components/react-label/library/config/tests.cjs diff --git a/packages/react-components/react-label/library/eslint.config.js b/packages/react-components/react-label/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-label/library/eslint.config.js rename to packages/react-components/react-label/library/eslint.config.cjs diff --git a/packages/react-components/react-label/library/jest.config.js b/packages/react-components/react-label/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-label/library/jest.config.js rename to packages/react-components/react-label/library/jest.config.cjs index 53f7c7b70ea8b7..ad0283886a8679 100644 --- a/packages/react-components/react-label/library/jest.config.js +++ b/packages/react-components/react-label/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-label/library/package.json b/packages/react-components/react-label/library/package.json index 43f3780c931025..f410c77225ba92 100644 --- a/packages/react-components/react-label/library/package.json +++ b/packages/react-components/react-label/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-label", "version": "9.4.2", "description": "Fluent UI React Label component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -33,17 +33,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-link/library/.swcrc b/packages/react-components/react-link/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-link/library/.swcrc +++ b/packages/react-components/react-link/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-link/library/config/tests.js b/packages/react-components/react-link/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-link/library/config/tests.js rename to packages/react-components/react-link/library/config/tests.cjs diff --git a/packages/react-components/react-link/library/eslint.config.js b/packages/react-components/react-link/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-link/library/eslint.config.js rename to packages/react-components/react-link/library/eslint.config.cjs diff --git a/packages/react-components/react-link/library/jest.config.js b/packages/react-components/react-link/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-link/library/jest.config.js rename to packages/react-components/react-link/library/jest.config.cjs index fba3cb18a026f8..a0f47e8a31374f 100644 --- a/packages/react-components/react-link/library/jest.config.js +++ b/packages/react-components/react-link/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-link/library/package.json b/packages/react-components/react-link/library/package.json index 13beea054e7b90..e1076542c52723 100644 --- a/packages/react-components/react-link/library/package.json +++ b/packages/react-components/react-link/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-link", "version": "9.8.2", "description": "Fluent UI React Link component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -35,17 +35,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-list/library/.swcrc b/packages/react-components/react-list/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-list/library/.swcrc +++ b/packages/react-components/react-list/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-list/library/config/tests.js b/packages/react-components/react-list/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-list/library/config/tests.js rename to packages/react-components/react-list/library/config/tests.cjs diff --git a/packages/react-components/react-list/library/eslint.config.js b/packages/react-components/react-list/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-list/library/eslint.config.js rename to packages/react-components/react-list/library/eslint.config.cjs diff --git a/packages/react-components/react-list/library/jest.config.js b/packages/react-components/react-list/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-list/library/jest.config.js rename to packages/react-components/react-list/library/jest.config.cjs index b8b9f61ddfbf82..ba131e2fb6e90b 100644 --- a/packages/react-components/react-list/library/jest.config.js +++ b/packages/react-components/react-list/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-list/library/package.json b/packages/react-components/react-list/library/package.json index 080a80e809c71a..10758d52519ea6 100644 --- a/packages/react-components/react-list/library/package.json +++ b/packages/react-components/react-list/library/package.json @@ -2,13 +2,14 @@ "name": "@fluentui/react-list", "version": "9.6.15", "description": "React List v9", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -37,10 +38,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -49,5 +54,6 @@ "major", "prerelease" ] - } + }, + "type": "module" } diff --git a/packages/react-components/react-menu-grid-preview/library/.swcrc b/packages/react-components/react-menu-grid-preview/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-menu-grid-preview/library/.swcrc +++ b/packages/react-components/react-menu-grid-preview/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-menu-grid-preview/library/config/tests.js b/packages/react-components/react-menu-grid-preview/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-menu-grid-preview/library/config/tests.js rename to packages/react-components/react-menu-grid-preview/library/config/tests.cjs diff --git a/packages/react-components/react-menu-grid-preview/library/eslint.config.js b/packages/react-components/react-menu-grid-preview/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-menu-grid-preview/library/eslint.config.js rename to packages/react-components/react-menu-grid-preview/library/eslint.config.cjs diff --git a/packages/react-components/react-menu-grid-preview/library/jest.config.js b/packages/react-components/react-menu-grid-preview/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-menu-grid-preview/library/jest.config.js rename to packages/react-components/react-menu-grid-preview/library/jest.config.cjs index 29443c89f9fdbd..4fa045248a02d5 100644 --- a/packages/react-components/react-menu-grid-preview/library/jest.config.js +++ b/packages/react-components/react-menu-grid-preview/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-menu-grid-preview/library/package.json b/packages/react-components/react-menu-grid-preview/library/package.json index 5ddc3fec4c09e5..6212c5767b7897 100644 --- a/packages/react-components/react-menu-grid-preview/library/package.json +++ b/packages/react-components/react-menu-grid-preview/library/package.json @@ -2,13 +2,14 @@ "name": "@fluentui/react-menu-grid-preview", "version": "0.5.2", "description": "New fluentui react package", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -38,10 +39,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -50,5 +55,6 @@ "major", "prerelease" ] - } + }, + "type": "module" } diff --git a/packages/react-components/react-menu/library/.swcrc b/packages/react-components/react-menu/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-menu/library/.swcrc +++ b/packages/react-components/react-menu/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-menu/library/config/tests.js b/packages/react-components/react-menu/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-menu/library/config/tests.js rename to packages/react-components/react-menu/library/config/tests.cjs diff --git a/packages/react-components/react-menu/library/eslint.config.js b/packages/react-components/react-menu/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-menu/library/eslint.config.js rename to packages/react-components/react-menu/library/eslint.config.cjs diff --git a/packages/react-components/react-menu/library/jest.config.js b/packages/react-components/react-menu/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-menu/library/jest.config.js rename to packages/react-components/react-menu/library/jest.config.cjs index 9bc6e63b6603ef..7242b562f98c90 100644 --- a/packages/react-components/react-menu/library/jest.config.js +++ b/packages/react-components/react-menu/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-menu/library/package.json b/packages/react-components/react-menu/library/package.json index 26ff1469b66cca..c456b2b0be52e9 100644 --- a/packages/react-components/react-menu/library/package.json +++ b/packages/react-components/react-menu/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-menu", "version": "9.25.0", "description": "Fluent UI menu component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -42,17 +42,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-message-bar/library/.swcrc b/packages/react-components/react-message-bar/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-message-bar/library/.swcrc +++ b/packages/react-components/react-message-bar/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-message-bar/library/config/tests.js b/packages/react-components/react-message-bar/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-message-bar/library/config/tests.js rename to packages/react-components/react-message-bar/library/config/tests.cjs diff --git a/packages/react-components/react-message-bar/library/eslint.config.js b/packages/react-components/react-message-bar/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-message-bar/library/eslint.config.js rename to packages/react-components/react-message-bar/library/eslint.config.cjs diff --git a/packages/react-components/react-message-bar/library/jest.config.js b/packages/react-components/react-message-bar/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-message-bar/library/jest.config.js rename to packages/react-components/react-message-bar/library/jest.config.cjs index 2669112fea23b8..c060b2660bb090 100644 --- a/packages/react-components/react-message-bar/library/jest.config.js +++ b/packages/react-components/react-message-bar/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-message-bar/library/package.json b/packages/react-components/react-message-bar/library/package.json index 311594e6863f1a..eeb662c5ab30f7 100644 --- a/packages/react-components/react-message-bar/library/package.json +++ b/packages/react-components/react-message-bar/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-message-bar", "version": "9.7.1", "description": "Fluent UI MessageBar component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -32,10 +32,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -48,7 +52,9 @@ "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-migration-v0-v9/library/.swcrc b/packages/react-components/react-migration-v0-v9/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-migration-v0-v9/library/.swcrc +++ b/packages/react-components/react-migration-v0-v9/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-migration-v0-v9/library/config/tests.js b/packages/react-components/react-migration-v0-v9/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-migration-v0-v9/library/config/tests.js rename to packages/react-components/react-migration-v0-v9/library/config/tests.cjs diff --git a/packages/react-components/react-migration-v0-v9/library/eslint.config.js b/packages/react-components/react-migration-v0-v9/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-migration-v0-v9/library/eslint.config.js rename to packages/react-components/react-migration-v0-v9/library/eslint.config.cjs diff --git a/packages/react-components/react-migration-v0-v9/library/jest.config.js b/packages/react-components/react-migration-v0-v9/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-migration-v0-v9/library/jest.config.js rename to packages/react-components/react-migration-v0-v9/library/jest.config.cjs index 3a6e9af089f374..b3a9ec4841d35f 100644 --- a/packages/react-components/react-migration-v0-v9/library/jest.config.js +++ b/packages/react-components/react-migration-v0-v9/library/jest.config.cjs @@ -32,6 +32,6 @@ module.exports = { // https://stackoverflow.com/a/75857711 workerIdleMemoryLimit: '1024MB', coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-migration-v0-v9/library/package.json b/packages/react-components/react-migration-v0-v9/library/package.json index 25dc166e7190ce..9291a199f6a94c 100644 --- a/packages/react-components/react-migration-v0-v9/library/package.json +++ b/packages/react-components/react-migration-v0-v9/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-migration-v0-v9", "version": "9.6.30", "description": "Migration shim components and methods for hybrid v0/v9 applications building on Fluent UI React.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -39,17 +39,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-migration-v8-v9/library/.swcrc b/packages/react-components/react-migration-v8-v9/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-migration-v8-v9/library/.swcrc +++ b/packages/react-components/react-migration-v8-v9/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-migration-v8-v9/library/config/tests.js b/packages/react-components/react-migration-v8-v9/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-migration-v8-v9/library/config/tests.js rename to packages/react-components/react-migration-v8-v9/library/config/tests.cjs diff --git a/packages/react-components/react-migration-v8-v9/library/eslint.config.js b/packages/react-components/react-migration-v8-v9/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-migration-v8-v9/library/eslint.config.js rename to packages/react-components/react-migration-v8-v9/library/eslint.config.cjs diff --git a/packages/react-components/react-migration-v8-v9/library/jest.config.js b/packages/react-components/react-migration-v8-v9/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-migration-v8-v9/library/jest.config.js rename to packages/react-components/react-migration-v8-v9/library/jest.config.cjs index 8f4369d2c78a4c..be3de1876d952e 100644 --- a/packages/react-components/react-migration-v8-v9/library/jest.config.js +++ b/packages/react-components/react-migration-v8-v9/library/jest.config.cjs @@ -32,6 +32,6 @@ module.exports = { // https://stackoverflow.com/a/75857711 workerIdleMemoryLimit: '1024MB', coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-migration-v8-v9/library/package.json b/packages/react-components/react-migration-v8-v9/library/package.json index fa116a8ae3b242..b7b6a93634d118 100644 --- a/packages/react-components/react-migration-v8-v9/library/package.json +++ b/packages/react-components/react-migration-v8-v9/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-migration-v8-v9", "version": "9.10.12", "description": "Migration shim components and methods for hybrid v8/v9 applications building on Fluent UI React.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -34,17 +34,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-motion-components-preview/library/.swcrc b/packages/react-components/react-motion-components-preview/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-motion-components-preview/library/.swcrc +++ b/packages/react-components/react-motion-components-preview/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-motion-components-preview/library/config/tests.js b/packages/react-components/react-motion-components-preview/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-motion-components-preview/library/config/tests.js rename to packages/react-components/react-motion-components-preview/library/config/tests.cjs diff --git a/packages/react-components/react-motion-components-preview/library/eslint.config.js b/packages/react-components/react-motion-components-preview/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-motion-components-preview/library/eslint.config.js rename to packages/react-components/react-motion-components-preview/library/eslint.config.cjs diff --git a/packages/react-components/react-motion-components-preview/library/jest.config.js b/packages/react-components/react-motion-components-preview/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-motion-components-preview/library/jest.config.js rename to packages/react-components/react-motion-components-preview/library/jest.config.cjs index 4b0d5f8d848f16..8122b136dd6eb8 100644 --- a/packages/react-components/react-motion-components-preview/library/jest.config.js +++ b/packages/react-components/react-motion-components-preview/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-motion-components-preview/library/package.json b/packages/react-components/react-motion-components-preview/library/package.json index d6f43c24837633..30510aa1227924 100644 --- a/packages/react-components/react-motion-components-preview/library/package.json +++ b/packages/react-components/react-motion-components-preview/library/package.json @@ -2,13 +2,14 @@ "name": "@fluentui/react-motion-components-preview", "version": "0.15.5", "description": "A preview package for Fluent UI motion components, providing a collection of components", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -30,10 +31,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -42,5 +47,6 @@ "major", "prerelease" ] - } + }, + "type": "module" } diff --git a/packages/react-components/react-motion/library/.swcrc b/packages/react-components/react-motion/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-motion/library/.swcrc +++ b/packages/react-components/react-motion/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-motion/library/config/tests.js b/packages/react-components/react-motion/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-motion/library/config/tests.js rename to packages/react-components/react-motion/library/config/tests.cjs diff --git a/packages/react-components/react-motion/library/eslint.config.js b/packages/react-components/react-motion/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-motion/library/eslint.config.js rename to packages/react-components/react-motion/library/eslint.config.cjs diff --git a/packages/react-components/react-motion/library/jest.config.js b/packages/react-components/react-motion/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-motion/library/jest.config.js rename to packages/react-components/react-motion/library/jest.config.cjs index 5a71c159afce69..27caaa5a4da0e8 100644 --- a/packages/react-components/react-motion/library/jest.config.js +++ b/packages/react-components/react-motion/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-motion/library/package.json b/packages/react-components/react-motion/library/package.json index 3aef2a73721d5e..e9774c3837c92c 100644 --- a/packages/react-components/react-motion/library/package.json +++ b/packages/react-components/react-motion/library/package.json @@ -2,13 +2,14 @@ "name": "@fluentui/react-motion", "version": "9.16.0", "description": "A package with utilities & motion definitions using Web Animations API", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -30,10 +31,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -42,5 +47,6 @@ "major", "prerelease" ] - } + }, + "type": "module" } diff --git a/packages/react-components/react-nav/library/.swcrc b/packages/react-components/react-nav/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-nav/library/.swcrc +++ b/packages/react-components/react-nav/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-nav/library/config/tests.js b/packages/react-components/react-nav/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-nav/library/config/tests.js rename to packages/react-components/react-nav/library/config/tests.cjs diff --git a/packages/react-components/react-nav/library/eslint.config.js b/packages/react-components/react-nav/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-nav/library/eslint.config.js rename to packages/react-components/react-nav/library/eslint.config.cjs diff --git a/packages/react-components/react-nav/library/jest.config.js b/packages/react-components/react-nav/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-nav/library/jest.config.js rename to packages/react-components/react-nav/library/jest.config.cjs index 2732be85a0c0e9..2b038e7bf6b4ab 100644 --- a/packages/react-components/react-nav/library/jest.config.js +++ b/packages/react-components/react-nav/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-nav/library/package.json b/packages/react-components/react-nav/library/package.json index e83c23b4dc4590..721f96ead5bdee 100644 --- a/packages/react-components/react-nav/library/package.json +++ b/packages/react-components/react-nav/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-nav", "version": "9.4.0", "description": "New fluentui react package", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -37,10 +37,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -53,7 +57,9 @@ "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-overflow/library/.swcrc b/packages/react-components/react-overflow/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-overflow/library/.swcrc +++ b/packages/react-components/react-overflow/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-overflow/library/config/tests.js b/packages/react-components/react-overflow/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-overflow/library/config/tests.js rename to packages/react-components/react-overflow/library/config/tests.cjs diff --git a/packages/react-components/react-overflow/library/eslint.config.js b/packages/react-components/react-overflow/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-overflow/library/eslint.config.js rename to packages/react-components/react-overflow/library/eslint.config.cjs diff --git a/packages/react-components/react-overflow/library/jest.config.js b/packages/react-components/react-overflow/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-overflow/library/jest.config.js rename to packages/react-components/react-overflow/library/jest.config.cjs index 2993091e84b413..050be1e7aae9bf 100644 --- a/packages/react-components/react-overflow/library/jest.config.js +++ b/packages/react-components/react-overflow/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-overflow/library/package.json b/packages/react-components/react-overflow/library/package.json index 8306f8188439ea..beac2c7b367ef2 100644 --- a/packages/react-components/react-overflow/library/package.json +++ b/packages/react-components/react-overflow/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-overflow", "version": "9.8.0", "description": "React bindings for @fluentui/priority-overflow", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -33,17 +33,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-persona/library/.swcrc b/packages/react-components/react-persona/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-persona/library/.swcrc +++ b/packages/react-components/react-persona/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-persona/library/config/tests.js b/packages/react-components/react-persona/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-persona/library/config/tests.js rename to packages/react-components/react-persona/library/config/tests.cjs diff --git a/packages/react-components/react-persona/library/eslint.config.js b/packages/react-components/react-persona/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-persona/library/eslint.config.js rename to packages/react-components/react-persona/library/eslint.config.cjs diff --git a/packages/react-components/react-persona/library/jest.config.js b/packages/react-components/react-persona/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-persona/library/jest.config.js rename to packages/react-components/react-persona/library/jest.config.cjs index bad8ac27c7cbe4..914c9ca780c18f 100644 --- a/packages/react-components/react-persona/library/jest.config.js +++ b/packages/react-components/react-persona/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-persona/library/package.json b/packages/react-components/react-persona/library/package.json index cc35a121bf2e94..acad38b0747145 100644 --- a/packages/react-components/react-persona/library/package.json +++ b/packages/react-components/react-persona/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-persona", "version": "9.7.4", "description": "React components for building web experiences", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -35,17 +35,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-popover/library/.swcrc b/packages/react-components/react-popover/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-popover/library/.swcrc +++ b/packages/react-components/react-popover/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-popover/library/config/tests.js b/packages/react-components/react-popover/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-popover/library/config/tests.js rename to packages/react-components/react-popover/library/config/tests.cjs diff --git a/packages/react-components/react-popover/library/eslint.config.js b/packages/react-components/react-popover/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-popover/library/eslint.config.js rename to packages/react-components/react-popover/library/eslint.config.cjs diff --git a/packages/react-components/react-popover/library/jest.config.js b/packages/react-components/react-popover/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-popover/library/jest.config.js rename to packages/react-components/react-popover/library/jest.config.cjs index ae5ce8aeee59a9..c8f3e7daa8e75c 100644 --- a/packages/react-components/react-popover/library/jest.config.js +++ b/packages/react-components/react-popover/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-popover/library/package.json b/packages/react-components/react-popover/library/package.json index 6e814f9d9689f2..1ec0447317bc1b 100644 --- a/packages/react-components/react-popover/library/package.json +++ b/packages/react-components/react-popover/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-popover", "version": "9.14.3", "description": "Popover component for Fluent UI", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -41,17 +41,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-portal-compat-context/.swcrc b/packages/react-components/react-portal-compat-context/.swcrc index d63668e8c987ee..6fc76ab5e07eb0 100644 --- a/packages/react-components/react-portal-compat-context/.swcrc +++ b/packages/react-components/react-portal-compat-context/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-portal-compat-context/config/tests.js b/packages/react-components/react-portal-compat-context/config/tests.cjs similarity index 100% rename from packages/react-components/react-portal-compat-context/config/tests.js rename to packages/react-components/react-portal-compat-context/config/tests.cjs diff --git a/packages/react-components/react-portal-compat-context/eslint.config.js b/packages/react-components/react-portal-compat-context/eslint.config.cjs similarity index 100% rename from packages/react-components/react-portal-compat-context/eslint.config.js rename to packages/react-components/react-portal-compat-context/eslint.config.cjs diff --git a/packages/react-components/react-portal-compat-context/jest.config.js b/packages/react-components/react-portal-compat-context/jest.config.cjs similarity index 96% rename from packages/react-components/react-portal-compat-context/jest.config.js rename to packages/react-components/react-portal-compat-context/jest.config.cjs index 51ee0af9b27e68..de5b8f2114d5a8 100644 --- a/packages/react-components/react-portal-compat-context/jest.config.js +++ b/packages/react-components/react-portal-compat-context/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/react-components/react-portal-compat-context/package.json b/packages/react-components/react-portal-compat-context/package.json index b7304856560378..1c5d8de54f9ebc 100644 --- a/packages/react-components/react-portal-compat-context/package.json +++ b/packages/react-components/react-portal-compat-context/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-portal-compat-context", "version": "9.0.15", "description": "A package that holds React context for compatibility of React Contexts", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -26,18 +26,24 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-amd", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-portal-compat/.swcrc b/packages/react-components/react-portal-compat/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-portal-compat/.swcrc +++ b/packages/react-components/react-portal-compat/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-portal-compat/config/tests.js b/packages/react-components/react-portal-compat/config/tests.cjs similarity index 100% rename from packages/react-components/react-portal-compat/config/tests.js rename to packages/react-components/react-portal-compat/config/tests.cjs diff --git a/packages/react-components/react-portal-compat/eslint.config.js b/packages/react-components/react-portal-compat/eslint.config.cjs similarity index 100% rename from packages/react-components/react-portal-compat/eslint.config.js rename to packages/react-components/react-portal-compat/eslint.config.cjs diff --git a/packages/react-components/react-portal-compat/jest.config.js b/packages/react-components/react-portal-compat/jest.config.cjs similarity index 96% rename from packages/react-components/react-portal-compat/jest.config.js rename to packages/react-components/react-portal-compat/jest.config.cjs index c609a27cf8344a..8c4f6839c63612 100644 --- a/packages/react-components/react-portal-compat/jest.config.js +++ b/packages/react-components/react-portal-compat/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/react-components/react-portal-compat/package.json b/packages/react-components/react-portal-compat/package.json index d335fe0f644d86..5c9715e34346b6 100644 --- a/packages/react-components/react-portal-compat/package.json +++ b/packages/react-components/react-portal-compat/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-portal-compat", "version": "9.2.40", "description": "A package that contains compatibility layer for React Portals", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -29,18 +29,24 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-amd", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-portal/library/.swcrc b/packages/react-components/react-portal/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-portal/library/.swcrc +++ b/packages/react-components/react-portal/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-portal/library/config/tests.js b/packages/react-components/react-portal/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-portal/library/config/tests.js rename to packages/react-components/react-portal/library/config/tests.cjs diff --git a/packages/react-components/react-portal/library/eslint.config.js b/packages/react-components/react-portal/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-portal/library/eslint.config.js rename to packages/react-components/react-portal/library/eslint.config.cjs diff --git a/packages/react-components/react-portal/library/jest.config.js b/packages/react-components/react-portal/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-portal/library/jest.config.js rename to packages/react-components/react-portal/library/jest.config.cjs index 955789b7724bb0..08a95b38ab1f03 100644 --- a/packages/react-components/react-portal/library/jest.config.js +++ b/packages/react-components/react-portal/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-portal/library/package.json b/packages/react-components/react-portal/library/package.json index 9b6a5cb9faa26c..2a4ce60d7c359a 100644 --- a/packages/react-components/react-portal/library/package.json +++ b/packages/react-components/react-portal/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-portal", "version": "9.8.13", "description": "A utility component that creates portals compatible with Fluent UI", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -32,17 +32,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-positioning/library/.swcrc b/packages/react-components/react-positioning/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-positioning/library/.swcrc +++ b/packages/react-components/react-positioning/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-positioning/library/config/tests.js b/packages/react-components/react-positioning/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-positioning/library/config/tests.js rename to packages/react-components/react-positioning/library/config/tests.cjs diff --git a/packages/react-components/react-positioning/library/eslint.config.js b/packages/react-components/react-positioning/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-positioning/library/eslint.config.js rename to packages/react-components/react-positioning/library/eslint.config.cjs diff --git a/packages/react-components/react-positioning/library/jest.config.js b/packages/react-components/react-positioning/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-positioning/library/jest.config.js rename to packages/react-components/react-positioning/library/jest.config.cjs index 049161bc2b8dd5..3d2835110af22f 100644 --- a/packages/react-components/react-positioning/library/jest.config.js +++ b/packages/react-components/react-positioning/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-positioning/library/package.json b/packages/react-components/react-positioning/library/package.json index 9a47caae038ef8..87aef421060c08 100644 --- a/packages/react-components/react-positioning/library/package.json +++ b/packages/react-components/react-positioning/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-positioning", "version": "9.22.2", "description": "A react wrapper around Popper.js for Fluent UI", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -34,17 +34,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-progress/library/.swcrc b/packages/react-components/react-progress/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-progress/library/.swcrc +++ b/packages/react-components/react-progress/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-progress/library/config/tests.js b/packages/react-components/react-progress/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-progress/library/config/tests.js rename to packages/react-components/react-progress/library/config/tests.cjs diff --git a/packages/react-components/react-progress/library/eslint.config.js b/packages/react-components/react-progress/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-progress/library/eslint.config.js rename to packages/react-components/react-progress/library/eslint.config.cjs diff --git a/packages/react-components/react-progress/library/jest.config.js b/packages/react-components/react-progress/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-progress/library/jest.config.js rename to packages/react-components/react-progress/library/jest.config.cjs index a64b452928202e..09c17c55d69acd 100644 --- a/packages/react-components/react-progress/library/jest.config.js +++ b/packages/react-components/react-progress/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-progress/library/package.json b/packages/react-components/react-progress/library/package.json index e73188e63e891f..92e7f63b658921 100644 --- a/packages/react-components/react-progress/library/package.json +++ b/packages/react-components/react-progress/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-progress", "version": "9.5.2", "description": "Progress component for FluentUI v9", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -35,17 +35,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-provider/library/.swcrc b/packages/react-components/react-provider/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-provider/library/.swcrc +++ b/packages/react-components/react-provider/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-provider/library/config/tests.js b/packages/react-components/react-provider/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-provider/library/config/tests.js rename to packages/react-components/react-provider/library/config/tests.cjs diff --git a/packages/react-components/react-provider/library/eslint.config.js b/packages/react-components/react-provider/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-provider/library/eslint.config.js rename to packages/react-components/react-provider/library/eslint.config.cjs diff --git a/packages/react-components/react-provider/library/jest.config.js b/packages/react-components/react-provider/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-provider/library/jest.config.js rename to packages/react-components/react-provider/library/jest.config.cjs index d087946492e97d..fbb3a82ea5d683 100644 --- a/packages/react-components/react-provider/library/jest.config.js +++ b/packages/react-components/react-provider/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-provider/library/package.json b/packages/react-components/react-provider/library/package.json index a87cdfa1f1465a..6211ce4f06bffc 100644 --- a/packages/react-components/react-provider/library/package.json +++ b/packages/react-components/react-provider/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-provider", "version": "9.22.17", "description": "Fluent UI React provider component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -36,17 +36,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-provider/library/rit.config.js b/packages/react-components/react-provider/library/rit.config.cjs similarity index 100% rename from packages/react-components/react-provider/library/rit.config.js rename to packages/react-components/react-provider/library/rit.config.cjs diff --git a/packages/react-components/react-radio/library/.swcrc b/packages/react-components/react-radio/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-radio/library/.swcrc +++ b/packages/react-components/react-radio/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-radio/library/config/tests.js b/packages/react-components/react-radio/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-radio/library/config/tests.js rename to packages/react-components/react-radio/library/config/tests.cjs diff --git a/packages/react-components/react-radio/library/eslint.config.js b/packages/react-components/react-radio/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-radio/library/eslint.config.js rename to packages/react-components/react-radio/library/eslint.config.cjs diff --git a/packages/react-components/react-radio/library/jest.config.js b/packages/react-components/react-radio/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-radio/library/jest.config.js rename to packages/react-components/react-radio/library/jest.config.cjs index 83a890baad907e..05f7f74c73f78c 100644 --- a/packages/react-components/react-radio/library/jest.config.js +++ b/packages/react-components/react-radio/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-radio/library/package.json b/packages/react-components/react-radio/library/package.json index 6f1a0332834600..7b5a007d29daeb 100644 --- a/packages/react-components/react-radio/library/package.json +++ b/packages/react-components/react-radio/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-radio", "version": "9.6.3", "description": "Fluent UI Radio component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -36,17 +36,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-rating/library/.swcrc b/packages/react-components/react-rating/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-rating/library/.swcrc +++ b/packages/react-components/react-rating/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-rating/library/config/tests.js b/packages/react-components/react-rating/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-rating/library/config/tests.js rename to packages/react-components/react-rating/library/config/tests.cjs diff --git a/packages/react-components/react-rating/library/eslint.config.js b/packages/react-components/react-rating/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-rating/library/eslint.config.js rename to packages/react-components/react-rating/library/eslint.config.cjs diff --git a/packages/react-components/react-rating/library/jest.config.js b/packages/react-components/react-rating/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-rating/library/jest.config.js rename to packages/react-components/react-rating/library/jest.config.cjs index 15bd961b60bd06..96284a46d192c3 100644 --- a/packages/react-components/react-rating/library/jest.config.js +++ b/packages/react-components/react-rating/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-rating/library/package.json b/packages/react-components/react-rating/library/package.json index 6340d5dcfc264d..657fb01aad24d0 100644 --- a/packages/react-components/react-rating/library/package.json +++ b/packages/react-components/react-rating/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-rating", "version": "9.4.2", "description": "Rating component for building web experiences", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -29,10 +29,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -45,7 +49,9 @@ "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-search/library/.swcrc b/packages/react-components/react-search/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-search/library/.swcrc +++ b/packages/react-components/react-search/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-search/library/config/tests.js b/packages/react-components/react-search/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-search/library/config/tests.js rename to packages/react-components/react-search/library/config/tests.cjs diff --git a/packages/react-components/react-search/library/eslint.config.js b/packages/react-components/react-search/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-search/library/eslint.config.js rename to packages/react-components/react-search/library/eslint.config.cjs diff --git a/packages/react-components/react-search/library/jest.config.js b/packages/react-components/react-search/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-search/library/jest.config.js rename to packages/react-components/react-search/library/jest.config.cjs index 2a7c6ccd16fbca..6ab0b28da4c42c 100644 --- a/packages/react-components/react-search/library/jest.config.js +++ b/packages/react-components/react-search/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-search/library/package.json b/packages/react-components/react-search/library/package.json index 488f584d4321fa..d43bbfaff6b31d 100644 --- a/packages/react-components/react-search/library/package.json +++ b/packages/react-components/react-search/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-search", "version": "9.4.3", "description": "Search input for Fluent UI v9", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -35,17 +35,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-select/library/.swcrc b/packages/react-components/react-select/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-select/library/.swcrc +++ b/packages/react-components/react-select/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-select/library/config/tests.js b/packages/react-components/react-select/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-select/library/config/tests.js rename to packages/react-components/react-select/library/config/tests.cjs diff --git a/packages/react-components/react-select/library/eslint.config.js b/packages/react-components/react-select/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-select/library/eslint.config.js rename to packages/react-components/react-select/library/eslint.config.cjs diff --git a/packages/react-components/react-select/library/jest.config.js b/packages/react-components/react-select/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-select/library/jest.config.js rename to packages/react-components/react-select/library/jest.config.cjs index 33e62cbe01e3a2..ac0992306c1206 100644 --- a/packages/react-components/react-select/library/jest.config.js +++ b/packages/react-components/react-select/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-select/library/package.json b/packages/react-components/react-select/library/package.json index d31f2053be403a..374a7f616070d3 100644 --- a/packages/react-components/react-select/library/package.json +++ b/packages/react-components/react-select/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-select", "version": "9.5.2", "description": "Fluent UI React Select component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -35,17 +35,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-shared-contexts/library/.swcrc b/packages/react-components/react-shared-contexts/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-shared-contexts/library/.swcrc +++ b/packages/react-components/react-shared-contexts/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-shared-contexts/library/config/tests.js b/packages/react-components/react-shared-contexts/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-shared-contexts/library/config/tests.js rename to packages/react-components/react-shared-contexts/library/config/tests.cjs diff --git a/packages/react-components/react-shared-contexts/library/eslint.config.js b/packages/react-components/react-shared-contexts/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-shared-contexts/library/eslint.config.js rename to packages/react-components/react-shared-contexts/library/eslint.config.cjs diff --git a/packages/react-components/react-shared-contexts/library/jest.config.js b/packages/react-components/react-shared-contexts/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-shared-contexts/library/jest.config.js rename to packages/react-components/react-shared-contexts/library/jest.config.cjs index 62d67b6efdbd6d..7243f54db4b316 100644 --- a/packages/react-components/react-shared-contexts/library/jest.config.js +++ b/packages/react-components/react-shared-contexts/library/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/react-components/react-shared-contexts/library/package.json b/packages/react-components/react-shared-contexts/library/package.json index 818576247a6411..88c8c9026d522a 100644 --- a/packages/react-components/react-shared-contexts/library/package.json +++ b/packages/react-components/react-shared-contexts/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-shared-contexts", "version": "9.26.2", "description": "Fluent UI React Contexts shared by multiple components.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -27,17 +27,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-skeleton/library/.swcrc b/packages/react-components/react-skeleton/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-skeleton/library/.swcrc +++ b/packages/react-components/react-skeleton/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-skeleton/library/config/tests.js b/packages/react-components/react-skeleton/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-skeleton/library/config/tests.js rename to packages/react-components/react-skeleton/library/config/tests.cjs diff --git a/packages/react-components/react-skeleton/library/eslint.config.js b/packages/react-components/react-skeleton/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-skeleton/library/eslint.config.js rename to packages/react-components/react-skeleton/library/eslint.config.cjs diff --git a/packages/react-components/react-skeleton/library/jest.config.js b/packages/react-components/react-skeleton/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-skeleton/library/jest.config.js rename to packages/react-components/react-skeleton/library/jest.config.cjs index a97165fc65d46d..1548e89ec55fe5 100644 --- a/packages/react-components/react-skeleton/library/jest.config.js +++ b/packages/react-components/react-skeleton/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-skeleton/library/package.json b/packages/react-components/react-skeleton/library/package.json index aa8e7000796cee..5f961f212a2a43 100644 --- a/packages/react-components/react-skeleton/library/package.json +++ b/packages/react-components/react-skeleton/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-skeleton", "version": "9.7.3", "description": "Converged v9 Skeleton Component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -34,17 +34,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-slider/library/.swcrc b/packages/react-components/react-slider/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-slider/library/.swcrc +++ b/packages/react-components/react-slider/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-slider/library/config/tests.js b/packages/react-components/react-slider/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-slider/library/config/tests.js rename to packages/react-components/react-slider/library/config/tests.cjs diff --git a/packages/react-components/react-slider/library/eslint.config.js b/packages/react-components/react-slider/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-slider/library/eslint.config.js rename to packages/react-components/react-slider/library/eslint.config.cjs diff --git a/packages/react-components/react-slider/library/jest.config.js b/packages/react-components/react-slider/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-slider/library/jest.config.js rename to packages/react-components/react-slider/library/jest.config.cjs index c33f57566a1f50..e1162996ee7662 100644 --- a/packages/react-components/react-slider/library/jest.config.js +++ b/packages/react-components/react-slider/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-slider/library/package.json b/packages/react-components/react-slider/library/package.json index 53d949ae3327fd..68b01619ddd8a5 100644 --- a/packages/react-components/react-slider/library/package.json +++ b/packages/react-components/react-slider/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-slider", "version": "9.6.3", "description": "Fluent UI React Slider component.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -35,17 +35,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-spinbutton/library/.swcrc b/packages/react-components/react-spinbutton/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-spinbutton/library/.swcrc +++ b/packages/react-components/react-spinbutton/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-spinbutton/library/config/tests.js b/packages/react-components/react-spinbutton/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-spinbutton/library/config/tests.js rename to packages/react-components/react-spinbutton/library/config/tests.cjs diff --git a/packages/react-components/react-spinbutton/library/eslint.config.js b/packages/react-components/react-spinbutton/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-spinbutton/library/eslint.config.js rename to packages/react-components/react-spinbutton/library/eslint.config.cjs diff --git a/packages/react-components/react-spinbutton/library/jest.config.js b/packages/react-components/react-spinbutton/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-spinbutton/library/jest.config.js rename to packages/react-components/react-spinbutton/library/jest.config.cjs index 3e6c92c01b8e6d..b97bfe6cd5d907 100644 --- a/packages/react-components/react-spinbutton/library/jest.config.js +++ b/packages/react-components/react-spinbutton/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-spinbutton/library/package.json b/packages/react-components/react-spinbutton/library/package.json index 1a3be5680b3a9b..8e79d8d0aa7db9 100644 --- a/packages/react-components/react-spinbutton/library/package.json +++ b/packages/react-components/react-spinbutton/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-spinbutton", "version": "9.6.3", "description": "Fluent UI React SpinButton component.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -36,17 +36,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-spinner/library/.swcrc b/packages/react-components/react-spinner/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-spinner/library/.swcrc +++ b/packages/react-components/react-spinner/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-spinner/library/config/tests.js b/packages/react-components/react-spinner/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-spinner/library/config/tests.js rename to packages/react-components/react-spinner/library/config/tests.cjs diff --git a/packages/react-components/react-spinner/library/eslint.config.js b/packages/react-components/react-spinner/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-spinner/library/eslint.config.js rename to packages/react-components/react-spinner/library/eslint.config.cjs diff --git a/packages/react-components/react-spinner/library/jest.config.js b/packages/react-components/react-spinner/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-spinner/library/jest.config.js rename to packages/react-components/react-spinner/library/jest.config.cjs index 0f871616c785f6..fd2cc64741c824 100644 --- a/packages/react-components/react-spinner/library/jest.config.js +++ b/packages/react-components/react-spinner/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-spinner/library/package.json b/packages/react-components/react-spinner/library/package.json index 2686890c7758d3..30b3ad35e4b43e 100644 --- a/packages/react-components/react-spinner/library/package.json +++ b/packages/react-components/react-spinner/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-spinner", "version": "9.8.3", "description": "Spinner component for Fluent UI React", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -34,17 +34,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-storybook-addon-export-to-sandbox/.swcrc b/packages/react-components/react-storybook-addon-export-to-sandbox/.swcrc index 60a8beae823005..ec92c5ba665f63 100644 --- a/packages/react-components/react-storybook-addon-export-to-sandbox/.swcrc +++ b/packages/react-components/react-storybook-addon-export-to-sandbox/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-storybook-addon-export-to-sandbox/package.json b/packages/react-components/react-storybook-addon-export-to-sandbox/package.json index e0d2931b76479d..1882f97d9c99e5 100644 --- a/packages/react-components/react-storybook-addon-export-to-sandbox/package.json +++ b/packages/react-components/react-storybook-addon-export-to-sandbox/package.json @@ -29,8 +29,11 @@ "exports": { ".": { "types": "./dist/index.d.ts", + "node": { + "module": "./lib/index.js", + "default": "./lib-commonjs/index.js" + }, "import": "./lib/index.js", - "node": "./lib-commonjs/index.js", "require": "./lib-commonjs/index.js" }, "./preset": "./preset.js", diff --git a/packages/react-components/react-storybook-addon/.swcrc b/packages/react-components/react-storybook-addon/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-storybook-addon/.swcrc +++ b/packages/react-components/react-storybook-addon/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-storybook-addon/package.json b/packages/react-components/react-storybook-addon/package.json index 4c61dbe48bdf21..4350b533fe7568 100644 --- a/packages/react-components/react-storybook-addon/package.json +++ b/packages/react-components/react-storybook-addon/package.json @@ -47,7 +47,10 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", + "node": { + "module": "./lib/index.js", + "default": "./lib-commonjs/index.js" + }, "import": "./lib/index.js", "require": "./lib-commonjs/index.js" }, diff --git a/packages/react-components/react-swatch-picker/library/.swcrc b/packages/react-components/react-swatch-picker/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-swatch-picker/library/.swcrc +++ b/packages/react-components/react-swatch-picker/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-swatch-picker/library/config/tests.js b/packages/react-components/react-swatch-picker/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-swatch-picker/library/config/tests.js rename to packages/react-components/react-swatch-picker/library/config/tests.cjs diff --git a/packages/react-components/react-swatch-picker/library/eslint.config.js b/packages/react-components/react-swatch-picker/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-swatch-picker/library/eslint.config.js rename to packages/react-components/react-swatch-picker/library/eslint.config.cjs diff --git a/packages/react-components/react-swatch-picker/library/jest.config.js b/packages/react-components/react-swatch-picker/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-swatch-picker/library/jest.config.js rename to packages/react-components/react-swatch-picker/library/jest.config.cjs index 0e90729c7be2e4..b354fe864dfea9 100644 --- a/packages/react-components/react-swatch-picker/library/jest.config.js +++ b/packages/react-components/react-swatch-picker/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-swatch-picker/library/package.json b/packages/react-components/react-swatch-picker/library/package.json index af4fb8cd7ba580..c478104b1af95a 100644 --- a/packages/react-components/react-swatch-picker/library/package.json +++ b/packages/react-components/react-swatch-picker/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-swatch-picker", "version": "9.5.3", "description": "New fluentui react package", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -31,10 +31,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -47,7 +51,9 @@ "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-switch/library/.swcrc b/packages/react-components/react-switch/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-switch/library/.swcrc +++ b/packages/react-components/react-switch/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-switch/library/config/tests.js b/packages/react-components/react-switch/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-switch/library/config/tests.js rename to packages/react-components/react-switch/library/config/tests.cjs diff --git a/packages/react-components/react-switch/library/eslint.config.js b/packages/react-components/react-switch/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-switch/library/eslint.config.js rename to packages/react-components/react-switch/library/eslint.config.cjs diff --git a/packages/react-components/react-switch/library/jest.config.js b/packages/react-components/react-switch/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-switch/library/jest.config.js rename to packages/react-components/react-switch/library/jest.config.cjs index 22b65fd50ab9a6..c3e75b1302ed93 100644 --- a/packages/react-components/react-switch/library/jest.config.js +++ b/packages/react-components/react-switch/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-switch/library/package.json b/packages/react-components/react-switch/library/package.json index a08296a5ba749e..4d3b19335361f5 100644 --- a/packages/react-components/react-switch/library/package.json +++ b/packages/react-components/react-switch/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-switch", "version": "9.7.3", "description": "Fluent UI React Switch component.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -37,17 +37,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-table/library/.swcrc b/packages/react-components/react-table/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-table/library/.swcrc +++ b/packages/react-components/react-table/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-table/library/config/tests.js b/packages/react-components/react-table/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-table/library/config/tests.js rename to packages/react-components/react-table/library/config/tests.cjs diff --git a/packages/react-components/react-table/library/eslint.config.js b/packages/react-components/react-table/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-table/library/eslint.config.js rename to packages/react-components/react-table/library/eslint.config.cjs diff --git a/packages/react-components/react-table/library/jest.config.js b/packages/react-components/react-table/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-table/library/jest.config.js rename to packages/react-components/react-table/library/jest.config.cjs index 9af0d4c3f49857..5ebfea0c830f7e 100644 --- a/packages/react-components/react-table/library/jest.config.js +++ b/packages/react-components/react-table/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-table/library/package.json b/packages/react-components/react-table/library/package.json index 885b4b12339fda..6eeaeca29d96c6 100644 --- a/packages/react-components/react-table/library/package.json +++ b/packages/react-components/react-table/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-table", "version": "9.19.16", "description": "React components for building web experiences", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -40,17 +40,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-tabs/library/.swcrc b/packages/react-components/react-tabs/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-tabs/library/.swcrc +++ b/packages/react-components/react-tabs/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-tabs/library/config/tests.js b/packages/react-components/react-tabs/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-tabs/library/config/tests.js rename to packages/react-components/react-tabs/library/config/tests.cjs diff --git a/packages/react-components/react-tabs/library/eslint.config.js b/packages/react-components/react-tabs/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-tabs/library/eslint.config.js rename to packages/react-components/react-tabs/library/eslint.config.cjs diff --git a/packages/react-components/react-tabs/library/jest.config.js b/packages/react-components/react-tabs/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-tabs/library/jest.config.js rename to packages/react-components/react-tabs/library/jest.config.cjs index 68822c16a55bd8..968b431e755a7d 100644 --- a/packages/react-components/react-tabs/library/jest.config.js +++ b/packages/react-components/react-tabs/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-tabs/library/package.json b/packages/react-components/react-tabs/library/package.json index 0b58c876b07471..5fd2b84f6f6332 100644 --- a/packages/react-components/react-tabs/library/package.json +++ b/packages/react-components/react-tabs/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-tabs", "version": "9.12.2", "description": "Fluent UI React tabs components", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -35,17 +35,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-tabster/.swcrc b/packages/react-components/react-tabster/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-tabster/.swcrc +++ b/packages/react-components/react-tabster/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-tabster/config/tests.js b/packages/react-components/react-tabster/config/tests.cjs similarity index 100% rename from packages/react-components/react-tabster/config/tests.js rename to packages/react-components/react-tabster/config/tests.cjs diff --git a/packages/react-components/react-tabster/eslint.config.js b/packages/react-components/react-tabster/eslint.config.cjs similarity index 100% rename from packages/react-components/react-tabster/eslint.config.js rename to packages/react-components/react-tabster/eslint.config.cjs diff --git a/packages/react-components/react-tabster/jest.config.js b/packages/react-components/react-tabster/jest.config.cjs similarity index 96% rename from packages/react-components/react-tabster/jest.config.js rename to packages/react-components/react-tabster/jest.config.cjs index 153d5076c62352..96c91d1dd79e2a 100644 --- a/packages/react-components/react-tabster/jest.config.js +++ b/packages/react-components/react-tabster/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-tabster/package.json b/packages/react-components/react-tabster/package.json index 3f33d04c12a2b3..6397d5f1c93848 100644 --- a/packages/react-components/react-tabster/package.json +++ b/packages/react-components/react-tabster/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-tabster", "version": "9.26.15", "description": "Utilities for focus management and facade for tabster", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -34,17 +34,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-tag-picker/library/.swcrc b/packages/react-components/react-tag-picker/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-tag-picker/library/.swcrc +++ b/packages/react-components/react-tag-picker/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-tag-picker/library/config/tests.js b/packages/react-components/react-tag-picker/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-tag-picker/library/config/tests.js rename to packages/react-components/react-tag-picker/library/config/tests.cjs diff --git a/packages/react-components/react-tag-picker/library/eslint.config.js b/packages/react-components/react-tag-picker/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-tag-picker/library/eslint.config.js rename to packages/react-components/react-tag-picker/library/eslint.config.cjs diff --git a/packages/react-components/react-tag-picker/library/jest.config.js b/packages/react-components/react-tag-picker/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-tag-picker/library/jest.config.js rename to packages/react-components/react-tag-picker/library/jest.config.cjs index b315ab22e1be2a..842cc9a85f20e3 100644 --- a/packages/react-components/react-tag-picker/library/jest.config.js +++ b/packages/react-components/react-tag-picker/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-tag-picker/library/package.json b/packages/react-components/react-tag-picker/library/package.json index 4b8e9e45864b8d..c907cfc0cc49a7 100644 --- a/packages/react-components/react-tag-picker/library/package.json +++ b/packages/react-components/react-tag-picker/library/package.json @@ -2,13 +2,14 @@ "name": "@fluentui/react-tag-picker", "version": "9.8.8", "description": "FluentUI TagPicker component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -43,10 +44,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -55,5 +60,6 @@ "major", "prerelease" ] - } + }, + "type": "module" } diff --git a/packages/react-components/react-tags/library/.swcrc b/packages/react-components/react-tags/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-tags/library/.swcrc +++ b/packages/react-components/react-tags/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-tags/library/config/tests.js b/packages/react-components/react-tags/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-tags/library/config/tests.js rename to packages/react-components/react-tags/library/config/tests.cjs diff --git a/packages/react-components/react-tags/library/eslint.config.js b/packages/react-components/react-tags/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-tags/library/eslint.config.js rename to packages/react-components/react-tags/library/eslint.config.cjs diff --git a/packages/react-components/react-tags/library/jest.config.js b/packages/react-components/react-tags/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-tags/library/jest.config.js rename to packages/react-components/react-tags/library/jest.config.cjs index 48f5a22a59a58d..a6fb5ba8f761b2 100644 --- a/packages/react-components/react-tags/library/jest.config.js +++ b/packages/react-components/react-tags/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-tags/library/package.json b/packages/react-components/react-tags/library/package.json index 3ef7f024ad0f81..65ab8a405d38f5 100644 --- a/packages/react-components/react-tags/library/package.json +++ b/packages/react-components/react-tags/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-tags", "version": "9.9.1", "description": "Fluent UI Tag component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -38,17 +38,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-teaching-popover/library/.swcrc b/packages/react-components/react-teaching-popover/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-teaching-popover/library/.swcrc +++ b/packages/react-components/react-teaching-popover/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-teaching-popover/library/config/tests.js b/packages/react-components/react-teaching-popover/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-teaching-popover/library/config/tests.js rename to packages/react-components/react-teaching-popover/library/config/tests.cjs diff --git a/packages/react-components/react-teaching-popover/library/eslint.config.js b/packages/react-components/react-teaching-popover/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-teaching-popover/library/eslint.config.js rename to packages/react-components/react-teaching-popover/library/eslint.config.cjs diff --git a/packages/react-components/react-teaching-popover/library/jest.config.js b/packages/react-components/react-teaching-popover/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-teaching-popover/library/jest.config.js rename to packages/react-components/react-teaching-popover/library/jest.config.cjs index a08aeefa78112a..f973c4da7795e6 100644 --- a/packages/react-components/react-teaching-popover/library/jest.config.js +++ b/packages/react-components/react-teaching-popover/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-teaching-popover/library/package.json b/packages/react-components/react-teaching-popover/library/package.json index f092215fc17cd1..94b845edb7261f 100644 --- a/packages/react-components/react-teaching-popover/library/package.json +++ b/packages/react-components/react-teaching-popover/library/package.json @@ -2,13 +2,14 @@ "name": "@fluentui/react-teaching-popover", "version": "9.7.0", "description": "New fluentui react package", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -40,10 +41,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -55,5 +60,6 @@ }, "devDependencies": { "@fluentui/scripts-cypress": "*" - } + }, + "type": "module" } diff --git a/packages/react-components/react-text/library/.swcrc b/packages/react-components/react-text/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-text/library/.swcrc +++ b/packages/react-components/react-text/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-text/library/config/tests.js b/packages/react-components/react-text/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-text/library/config/tests.js rename to packages/react-components/react-text/library/config/tests.cjs diff --git a/packages/react-components/react-text/library/eslint.config.js b/packages/react-components/react-text/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-text/library/eslint.config.js rename to packages/react-components/react-text/library/eslint.config.cjs diff --git a/packages/react-components/react-text/library/jest.config.js b/packages/react-components/react-text/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-text/library/jest.config.js rename to packages/react-components/react-text/library/jest.config.cjs index 695bb6aa25dd9d..e559fe484ec7f1 100644 --- a/packages/react-components/react-text/library/jest.config.js +++ b/packages/react-components/react-text/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-text/library/package.json b/packages/react-components/react-text/library/package.json index 38d7ae6e845abb..526ba8e472ac3b 100644 --- a/packages/react-components/react-text/library/package.json +++ b/packages/react-components/react-text/library/package.json @@ -2,7 +2,8 @@ "name": "@fluentui/react-text", "version": "9.6.17", "description": "Text is a typography and styling abstraction component that can be used to ensure the consistency of all text across your application.", - "main": "lib-commonjs/index.js", + "type": "module", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -33,16 +34,21 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ] diff --git a/packages/react-components/react-textarea/library/.swcrc b/packages/react-components/react-textarea/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-textarea/library/.swcrc +++ b/packages/react-components/react-textarea/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-textarea/library/config/tests.js b/packages/react-components/react-textarea/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-textarea/library/config/tests.js rename to packages/react-components/react-textarea/library/config/tests.cjs diff --git a/packages/react-components/react-textarea/library/eslint.config.js b/packages/react-components/react-textarea/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-textarea/library/eslint.config.js rename to packages/react-components/react-textarea/library/eslint.config.cjs diff --git a/packages/react-components/react-textarea/library/jest.config.js b/packages/react-components/react-textarea/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-textarea/library/jest.config.js rename to packages/react-components/react-textarea/library/jest.config.cjs index aa8f59406eb48e..45a9e60f90870b 100644 --- a/packages/react-components/react-textarea/library/jest.config.js +++ b/packages/react-components/react-textarea/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-textarea/library/package.json b/packages/react-components/react-textarea/library/package.json index 8c259474b8aad1..e156b6c8cc65cf 100644 --- a/packages/react-components/react-textarea/library/package.json +++ b/packages/react-components/react-textarea/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-textarea", "version": "9.7.3", "description": "Fluent UI TextArea component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -34,17 +34,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-theme-sass/.swcrc b/packages/react-components/react-theme-sass/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-theme-sass/.swcrc +++ b/packages/react-components/react-theme-sass/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-theme-sass/config/tests.js b/packages/react-components/react-theme-sass/config/tests.cjs similarity index 100% rename from packages/react-components/react-theme-sass/config/tests.js rename to packages/react-components/react-theme-sass/config/tests.cjs diff --git a/packages/react-components/react-theme-sass/eslint.config.js b/packages/react-components/react-theme-sass/eslint.config.cjs similarity index 100% rename from packages/react-components/react-theme-sass/eslint.config.js rename to packages/react-components/react-theme-sass/eslint.config.cjs diff --git a/packages/react-components/react-theme-sass/jest.config.js b/packages/react-components/react-theme-sass/jest.config.cjs similarity index 96% rename from packages/react-components/react-theme-sass/jest.config.js rename to packages/react-components/react-theme-sass/jest.config.cjs index c3e9d03c9a4c6f..5eaf8ef38c1669 100644 --- a/packages/react-components/react-theme-sass/jest.config.js +++ b/packages/react-components/react-theme-sass/jest.config.cjs @@ -30,6 +30,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-theme-sass/package.json b/packages/react-components/react-theme-sass/package.json index a3315648688fa4..5d0c1171c49a5f 100644 --- a/packages/react-components/react-theme-sass/package.json +++ b/packages/react-components/react-theme-sass/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-theme-sass", "version": "9.0.0-alpha.30", "description": "SASS variables referencing react-theme design tokens injected to DOM by react-provider.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "style": "sass/tokens.scss", @@ -25,18 +25,24 @@ "exports": { ".": { "style": "./sass/tokens.scss", - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs", "sass" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-theme/library/.swcrc b/packages/react-components/react-theme/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-theme/library/.swcrc +++ b/packages/react-components/react-theme/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-theme/library/config/tests.js b/packages/react-components/react-theme/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-theme/library/config/tests.js rename to packages/react-components/react-theme/library/config/tests.cjs diff --git a/packages/react-components/react-theme/library/eslint.config.js b/packages/react-components/react-theme/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-theme/library/eslint.config.js rename to packages/react-components/react-theme/library/eslint.config.cjs diff --git a/packages/react-components/react-theme/library/jest.config.js b/packages/react-components/react-theme/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-theme/library/jest.config.js rename to packages/react-components/react-theme/library/jest.config.cjs index 3dfaedadb6825c..f62964c2d33224 100644 --- a/packages/react-components/react-theme/library/jest.config.js +++ b/packages/react-components/react-theme/library/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/react-components/react-theme/library/package.json b/packages/react-components/react-theme/library/package.json index ebd4308a9890b6..677d6dc544bf38 100644 --- a/packages/react-components/react-theme/library/package.json +++ b/packages/react-components/react-theme/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-theme", "version": "9.2.1", "description": "Fluent UI themes", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -23,17 +23,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-timepicker-compat/library/.swcrc b/packages/react-components/react-timepicker-compat/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-timepicker-compat/library/.swcrc +++ b/packages/react-components/react-timepicker-compat/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-timepicker-compat/library/config/tests.js b/packages/react-components/react-timepicker-compat/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-timepicker-compat/library/config/tests.js rename to packages/react-components/react-timepicker-compat/library/config/tests.cjs diff --git a/packages/react-components/react-timepicker-compat/library/eslint.config.js b/packages/react-components/react-timepicker-compat/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-timepicker-compat/library/eslint.config.js rename to packages/react-components/react-timepicker-compat/library/eslint.config.cjs diff --git a/packages/react-components/react-timepicker-compat/library/jest.config.js b/packages/react-components/react-timepicker-compat/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-timepicker-compat/library/jest.config.js rename to packages/react-components/react-timepicker-compat/library/jest.config.cjs index f95844785fa1fa..f5c44d171c56de 100644 --- a/packages/react-components/react-timepicker-compat/library/jest.config.js +++ b/packages/react-components/react-timepicker-compat/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-timepicker-compat/library/package.json b/packages/react-components/react-timepicker-compat/library/package.json index afc528a1b2846b..01bd902ab74c4e 100644 --- a/packages/react-components/react-timepicker-compat/library/package.json +++ b/packages/react-components/react-timepicker-compat/library/package.json @@ -2,13 +2,14 @@ "name": "@fluentui/react-timepicker-compat", "version": "0.4.35", "description": "Fluent UI TimePicker Compat Component", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -36,10 +37,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -48,5 +53,6 @@ "major", "prerelease" ] - } + }, + "type": "module" } diff --git a/packages/react-components/react-toast/library/.swcrc b/packages/react-components/react-toast/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-toast/library/.swcrc +++ b/packages/react-components/react-toast/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-toast/library/config/tests.js b/packages/react-components/react-toast/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-toast/library/config/tests.js rename to packages/react-components/react-toast/library/config/tests.cjs diff --git a/packages/react-components/react-toast/library/eslint.config.js b/packages/react-components/react-toast/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-toast/library/eslint.config.js rename to packages/react-components/react-toast/library/eslint.config.cjs diff --git a/packages/react-components/react-toast/library/jest.config.js b/packages/react-components/react-toast/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-toast/library/jest.config.js rename to packages/react-components/react-toast/library/jest.config.cjs index 737d10db08c03f..69786d8ee006e7 100644 --- a/packages/react-components/react-toast/library/jest.config.js +++ b/packages/react-components/react-toast/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-toast/library/package.json b/packages/react-components/react-toast/library/package.json index 2330461d4273b2..a1b8a0594adbc3 100644 --- a/packages/react-components/react-toast/library/package.json +++ b/packages/react-components/react-toast/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-toast", "version": "9.8.0", "description": "Toast component for Fluent UI", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -40,17 +40,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-toolbar/library/.swcrc b/packages/react-components/react-toolbar/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-toolbar/library/.swcrc +++ b/packages/react-components/react-toolbar/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-toolbar/library/config/tests.js b/packages/react-components/react-toolbar/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-toolbar/library/config/tests.js rename to packages/react-components/react-toolbar/library/config/tests.cjs diff --git a/packages/react-components/react-toolbar/library/eslint.config.js b/packages/react-components/react-toolbar/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-toolbar/library/eslint.config.js rename to packages/react-components/react-toolbar/library/eslint.config.cjs diff --git a/packages/react-components/react-toolbar/library/jest.config.js b/packages/react-components/react-toolbar/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-toolbar/library/jest.config.js rename to packages/react-components/react-toolbar/library/jest.config.cjs index 6f55a34c260cdc..7753aea86f89c0 100644 --- a/packages/react-components/react-toolbar/library/jest.config.js +++ b/packages/react-components/react-toolbar/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-toolbar/library/package.json b/packages/react-components/react-toolbar/library/package.json index dc22c1f733b852..91bfe7874422d6 100644 --- a/packages/react-components/react-toolbar/library/package.json +++ b/packages/react-components/react-toolbar/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-toolbar", "version": "9.8.1", "description": "React components for building web experiences", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -38,17 +38,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-tooltip/library/.swcrc b/packages/react-components/react-tooltip/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-tooltip/library/.swcrc +++ b/packages/react-components/react-tooltip/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-tooltip/library/config/tests.js b/packages/react-components/react-tooltip/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-tooltip/library/config/tests.js rename to packages/react-components/react-tooltip/library/config/tests.cjs diff --git a/packages/react-components/react-tooltip/library/eslint.config.js b/packages/react-components/react-tooltip/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-tooltip/library/eslint.config.js rename to packages/react-components/react-tooltip/library/eslint.config.cjs diff --git a/packages/react-components/react-tooltip/library/jest.config.js b/packages/react-components/react-tooltip/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-tooltip/library/jest.config.js rename to packages/react-components/react-tooltip/library/jest.config.cjs index 2e1fce8af76ddf..c06a4b1d175b08 100644 --- a/packages/react-components/react-tooltip/library/jest.config.js +++ b/packages/react-components/react-tooltip/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-tooltip/library/package.json b/packages/react-components/react-tooltip/library/package.json index 0a21927409b21c..d7cb4cec604e0a 100644 --- a/packages/react-components/react-tooltip/library/package.json +++ b/packages/react-components/react-tooltip/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-tooltip", "version": "9.10.2", "description": "React components for building web experiences", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -37,17 +37,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-tree/library/.swcrc b/packages/react-components/react-tree/library/.swcrc index 7c60535c03e245..a2c577cb1f91ea 100644 --- a/packages/react-components/react-tree/library/.swcrc +++ b/packages/react-components/react-tree/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "experimental": { "plugins": [["swc-plugin-de-indent-template-literal", {}]] }, diff --git a/packages/react-components/react-tree/library/config/tests.js b/packages/react-components/react-tree/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-tree/library/config/tests.js rename to packages/react-components/react-tree/library/config/tests.cjs diff --git a/packages/react-components/react-tree/library/eslint.config.js b/packages/react-components/react-tree/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-tree/library/eslint.config.js rename to packages/react-components/react-tree/library/eslint.config.cjs diff --git a/packages/react-components/react-tree/library/jest.config.js b/packages/react-components/react-tree/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-tree/library/jest.config.js rename to packages/react-components/react-tree/library/jest.config.cjs index 6bc2ce169094f4..39395667525203 100644 --- a/packages/react-components/react-tree/library/jest.config.js +++ b/packages/react-components/react-tree/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-tree/library/package.json b/packages/react-components/react-tree/library/package.json index 0da8182bb0302b..eef3a9e99dd756 100644 --- a/packages/react-components/react-tree/library/package.json +++ b/packages/react-components/react-tree/library/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-tree", "version": "9.16.1", "description": "Tree component for Fluent UI React", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -38,10 +38,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -54,7 +58,9 @@ "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/react-utilities-compat/library/.swcrc b/packages/react-components/react-utilities-compat/library/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/react-utilities-compat/library/.swcrc +++ b/packages/react-components/react-utilities-compat/library/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-utilities-compat/library/config/tests.js b/packages/react-components/react-utilities-compat/library/config/tests.cjs similarity index 100% rename from packages/react-components/react-utilities-compat/library/config/tests.js rename to packages/react-components/react-utilities-compat/library/config/tests.cjs diff --git a/packages/react-components/react-utilities-compat/library/eslint.config.js b/packages/react-components/react-utilities-compat/library/eslint.config.cjs similarity index 100% rename from packages/react-components/react-utilities-compat/library/eslint.config.js rename to packages/react-components/react-utilities-compat/library/eslint.config.cjs diff --git a/packages/react-components/react-utilities-compat/library/jest.config.js b/packages/react-components/react-utilities-compat/library/jest.config.cjs similarity index 96% rename from packages/react-components/react-utilities-compat/library/jest.config.js rename to packages/react-components/react-utilities-compat/library/jest.config.cjs index 9158bb9620eb9a..ae130a8eaa8905 100644 --- a/packages/react-components/react-utilities-compat/library/jest.config.js +++ b/packages/react-components/react-utilities-compat/library/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/react-utilities-compat/library/package.json b/packages/react-components/react-utilities-compat/library/package.json index c17adf2179c10a..4eef9451dba7ed 100644 --- a/packages/react-components/react-utilities-compat/library/package.json +++ b/packages/react-components/react-utilities-compat/library/package.json @@ -3,13 +3,14 @@ "version": "0.0.0", "private": true, "description": "New fluentui react package", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -34,10 +35,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -46,5 +51,6 @@ "major", "prerelease" ] - } + }, + "type": "module" } diff --git a/packages/react-components/react-utilities/.swcrc b/packages/react-components/react-utilities/.swcrc index 7c60535c03e245..a2c577cb1f91ea 100644 --- a/packages/react-components/react-utilities/.swcrc +++ b/packages/react-components/react-utilities/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "experimental": { "plugins": [["swc-plugin-de-indent-template-literal", {}]] }, diff --git a/packages/react-components/react-utilities/config/tests.js b/packages/react-components/react-utilities/config/tests.cjs similarity index 100% rename from packages/react-components/react-utilities/config/tests.js rename to packages/react-components/react-utilities/config/tests.cjs diff --git a/packages/react-components/react-utilities/eslint.config.js b/packages/react-components/react-utilities/eslint.config.cjs similarity index 100% rename from packages/react-components/react-utilities/eslint.config.js rename to packages/react-components/react-utilities/eslint.config.cjs diff --git a/packages/react-components/react-utilities/jest.config.js b/packages/react-components/react-utilities/jest.config.cjs similarity index 96% rename from packages/react-components/react-utilities/jest.config.js rename to packages/react-components/react-utilities/jest.config.cjs index 5ffa53cf8a960d..a3fba603778978 100644 --- a/packages/react-components/react-utilities/jest.config.js +++ b/packages/react-components/react-utilities/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/react-components/react-utilities/package.json b/packages/react-components/react-utilities/package.json index 6b5eb38e435123..cdf6c91bbdd6b4 100644 --- a/packages/react-components/react-utilities/package.json +++ b/packages/react-components/react-utilities/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/react-utilities", "version": "9.26.4", "description": "A set of general React-specific utilities.", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -28,17 +28,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/react-components/recipes/.storybook/main.js b/packages/react-components/recipes/.storybook/main.cjs similarity index 100% rename from packages/react-components/recipes/.storybook/main.js rename to packages/react-components/recipes/.storybook/main.cjs diff --git a/packages/react-components/recipes/.swcrc b/packages/react-components/recipes/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/recipes/.swcrc +++ b/packages/react-components/recipes/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/recipes/config/tests.js b/packages/react-components/recipes/config/tests.cjs similarity index 100% rename from packages/react-components/recipes/config/tests.js rename to packages/react-components/recipes/config/tests.cjs diff --git a/packages/react-components/recipes/eslint.config.js b/packages/react-components/recipes/eslint.config.cjs similarity index 100% rename from packages/react-components/recipes/eslint.config.js rename to packages/react-components/recipes/eslint.config.cjs diff --git a/packages/react-components/recipes/jest.config.js b/packages/react-components/recipes/jest.config.cjs similarity index 96% rename from packages/react-components/recipes/jest.config.js rename to packages/react-components/recipes/jest.config.cjs index fbe85e6c18c366..b32464e7303f42 100644 --- a/packages/react-components/recipes/jest.config.js +++ b/packages/react-components/recipes/jest.config.cjs @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/packages/react-components/recipes/package.json b/packages/react-components/recipes/package.json index 1c09729ded11fa..a07d1c3378670a 100644 --- a/packages/react-components/recipes/package.json +++ b/packages/react-components/recipes/package.json @@ -3,13 +3,14 @@ "version": "0.0.0", "private": true, "description": "New fluentui react package", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -35,10 +36,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, @@ -47,5 +52,6 @@ "major", "prerelease" ] - } + }, + "type": "module" } diff --git a/packages/react-components/theme-designer/.swcrc b/packages/react-components/theme-designer/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/react-components/theme-designer/.swcrc +++ b/packages/react-components/theme-designer/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/theme-designer/package.json b/packages/react-components/theme-designer/package.json index 467236e207fca1..6115e3141dba26 100644 --- a/packages/react-components/theme-designer/package.json +++ b/packages/react-components/theme-designer/package.json @@ -39,7 +39,10 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", + "node": { + "module": "./lib/index.js", + "default": "./lib-commonjs/index.js" + }, "import": "./lib/index.js", "require": "./lib-commonjs/index.js" }, diff --git a/packages/react-examples/tsconfig.json b/packages/react-examples/tsconfig.json index fe13d94ef30918..660767853f4f87 100644 --- a/packages/react-examples/tsconfig.json +++ b/packages/react-examples/tsconfig.json @@ -24,5 +24,6 @@ "@fluentui/react-examples": ["./src"] } }, - "include": ["src"] + "include": ["src"], + "exclude": ["src/**/*.e2e.ts", "src/**/*.e2e.tsx"] } diff --git a/packages/tokens/config/tests.js b/packages/tokens/config/tests.cjs similarity index 100% rename from packages/tokens/config/tests.js rename to packages/tokens/config/tests.cjs diff --git a/packages/tokens/eslint.config.js b/packages/tokens/eslint.config.cjs similarity index 100% rename from packages/tokens/eslint.config.js rename to packages/tokens/eslint.config.cjs diff --git a/packages/tokens/jest.config.js b/packages/tokens/jest.config.cjs similarity index 96% rename from packages/tokens/jest.config.js rename to packages/tokens/jest.config.cjs index de65df8acd43f2..d96e973ebc02eb 100644 --- a/packages/tokens/jest.config.js +++ b/packages/tokens/jest.config.cjs @@ -29,5 +29,5 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], }; diff --git a/packages/tokens/package.json b/packages/tokens/package.json index bbe00140f1d928..958eac4d14b456 100644 --- a/packages/tokens/package.json +++ b/packages/tokens/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/tokens", "version": "1.0.0-alpha.23", "description": "Fluent UI Theme Tokens", - "main": "lib-commonjs/index.js", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, @@ -23,17 +23,23 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" - ] + ], + "type": "module" } diff --git a/packages/tokens/playwright.config.ts b/packages/tokens/playwright.config.ts index 83dee12790dc5a..d7c8e2c09b152c 100644 --- a/packages/tokens/playwright.config.ts +++ b/packages/tokens/playwright.config.ts @@ -32,7 +32,7 @@ const config: PlaywrightTestConfig = { // }, ], webServer: { - command: `node scripts/server.js --port 6006`, + command: `node scripts/server.cjs --port 6006`, port: 6006, reuseExistingServer: process.env.CI ? false : true, }, diff --git a/packages/tokens/scripts/server.js b/packages/tokens/scripts/server.cjs similarity index 100% rename from packages/tokens/scripts/server.js rename to packages/tokens/scripts/server.cjs diff --git a/packages/web-components/package.json b/packages/web-components/package.json index 9e4d33a40592f0..16f38b6a1e6db1 100644 --- a/packages/web-components/package.json +++ b/packages/web-components/package.json @@ -26,6 +26,7 @@ "dist/esm/", "dist/*.js", "dist/*.d.ts", + "dist/*.d.cts", "custom-elements.json" ], "exports": { diff --git a/packages/web-components/scripts/generate-tokens.js b/packages/web-components/scripts/generate-tokens.js index 9e420ce18eec9c..ccabc13719b4a1 100644 --- a/packages/web-components/scripts/generate-tokens.js +++ b/packages/web-components/scripts/generate-tokens.js @@ -12,7 +12,7 @@ import { mkdirSync, writeFileSync } from 'node:fs'; import { join } from 'node:path'; -import tokensPackage from '@fluentui/tokens'; +import * as tokensPackage from '@fluentui/tokens'; import prettier from 'prettier'; const { tokens, webLightTheme, webDarkTheme, teamsLightTheme, teamsDarkTheme } = tokensPackage; diff --git a/scripts/cypress/eslint.config.js b/scripts/cypress/eslint.config.cjs similarity index 100% rename from scripts/cypress/eslint.config.js rename to scripts/cypress/eslint.config.cjs diff --git a/scripts/cypress/jest.config.js b/scripts/cypress/jest.config.cjs similarity index 100% rename from scripts/cypress/jest.config.js rename to scripts/cypress/jest.config.cjs diff --git a/scripts/cypress/package.json b/scripts/cypress/package.json index 64bd55f953e551..94e990379226dd 100644 --- a/scripts/cypress/package.json +++ b/scripts/cypress/package.json @@ -1,5 +1,6 @@ { "name": "@fluentui/scripts-cypress", + "type": "module", "version": "0.0.1", "private": true, "main": "src/index.ts", diff --git a/scripts/cypress/src/base.config.ts b/scripts/cypress/src/base.config.ts deleted file mode 100644 index 0f7cc2b1ccb7ef..00000000000000 --- a/scripts/cypress/src/base.config.ts +++ /dev/null @@ -1,123 +0,0 @@ -import * as crypto from 'crypto'; -import * as path from 'path'; - -import { defineConfig } from 'cypress'; -import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin'; -import type { Configuration } from 'webpack'; - -const projectRoot = process.cwd(); - -// Use a high port range unlikely to collide with other services: 20000-29999 -const deterministicPort = 20000 + (hashToInt(projectRoot) % 10000); - -export const baseWebpackConfig: Configuration = { - resolve: { - extensions: ['.js', '.ts', '.jsx', '.tsx'], - }, - mode: 'development', - devtool: 'eval', - // Ensure parallel Cypress component runs don't collide on a fixed port (8080 is webpack-dev-server default). - // Pick a deterministic port per project (can be overridden) since some CI setups ignore 'auto'. - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - devServer is provided by webpack-dev-server typings - devServer: { - port: process.env.WEBPACK_DEV_SERVER_PORT ? Number(process.env.WEBPACK_DEV_SERVER_PORT) : deterministicPort, - host: '127.0.0.1', - }, - output: { - publicPath: '/', - chunkFilename: '[name].bundle.js', - }, - module: { - rules: [], - }, -}; - -const cypressWebpackConfig = (): Configuration => { - if (baseWebpackConfig.module) { - baseWebpackConfig.module.rules?.push({ - test: /\.(ts|tsx)$/, - loader: 'esbuild-loader', - options: { - tsconfig: './tsconfig.cy.json', - }, - }); - } - - // TODO: remove this once esbuild-loader properly handles module loading https://github.com/privatenumber/esbuild-loader/issues/343#issuecomment-1845836603 - baseWebpackConfig.ignoreWarnings = [ - ...(baseWebpackConfig.ignoreWarnings ?? []), - { - module: /[esbuild-loader]/, - message: - /The specified tsconfig at\s+"[/a-z0-9-/.\s]+"\s+was applied to the file\s+"[/a-z0-9-.\s]+"\s+but does not match its "include" patterns/i, - }, - ]; - - baseWebpackConfig.resolve ??= {}; - baseWebpackConfig.resolve.plugins ??= []; - baseWebpackConfig.resolve.plugins.push( - new TsconfigPathsPlugin({ - configFile: path.resolve(__dirname, '../../../tsconfig.base.json'), - }), - ); - - return baseWebpackConfig; -}; - -interface BaseConfig extends Cypress.ConfigOptions { - component: Cypress.Config['component'] & { - devServer: { - bundler: 'webpack'; - framework: 'react'; - webpackConfig: Configuration; - }; - }; -} - -/** - * Programmatically create relative support support path, because Cypress bug - * @see https://github.com/cypress-io/cypress/issues/31819 - * - * This is a workaround for the issue where Cypress does not resolve the paths correctly, as it - * internally prepend the __dirname, making them invalid - * - */ -const sharedConfigSupportRootDir = path.join(__dirname, './support'); -const projectSupportDir = path.relative(projectRoot, sharedConfigSupportRootDir); - -export const baseConfig = defineConfig({ - video: false, - component: { - specPattern: [path.join(projectRoot, '**/*.e2e.tsx'), path.join(projectRoot, '**/*.cy.tsx')], - devServer: { - framework: 'react', - bundler: 'webpack', - webpackConfig: cypressWebpackConfig(), - }, - supportFile: path.join(projectSupportDir, './component.js'), - indexHtmlFile: path.join(projectSupportDir, './component-index.html'), - defaultCommandTimeout: 8000, - }, - retries: { - runMode: 4, - openMode: 0, - }, - // Screenshots go under /cypress/screenshots and can be useful to look at after failures in - // local headless runs (especially if the failure is specific to headless runs) - // screenshotOnRunFailure: isLocalRun && argv.mode === 'run', - fixturesFolder: path.join(__dirname, './fixtures'), -}) as BaseConfig; - -/** - * use this as base webpack config if you need to customize devServer webpack configuration - * - * Generate a deterministic, project-scoped port to avoid collisions when multiple Cypress component - * test servers start in parallel on the same machine/agent. Allows override via WEBPACK_DEV_SERVER_PORT. - */ -function hashToInt(str: string) { - // Use Node.js crypto module for better hashing - const hash = crypto.createHash('sha256').update(str).digest('hex'); - // Convert first 8 hex characters to integer - return parseInt(hash.slice(0, 8), 16); -} diff --git a/scripts/cypress/src/browser/index.ts b/scripts/cypress/src/browser/index.ts index b14e496984a283..5c3f2addd5a959 100644 --- a/scripts/cypress/src/browser/index.ts +++ b/scripts/cypress/src/browser/index.ts @@ -1,2 +1,2 @@ // Browser-only entry: expose just the custom mount used in Component Testing -export { mount } from './mount'; +export { mount } from './mount.js'; diff --git a/scripts/cypress/src/index.ts b/scripts/cypress/src/index.ts index 54f6d609d26ba9..cd873a19e2c8ce 100644 --- a/scripts/cypress/src/index.ts +++ b/scripts/cypress/src/index.ts @@ -1,7 +1,136 @@ -export { baseConfig, baseWebpackConfig } from './base.config'; +import * as crypto from 'crypto'; +import * as path from 'path'; + +import { defineConfig } from 'cypress'; +import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin'; +import type { Configuration } from 'webpack'; + +const projectRoot = process.cwd(); + +// Use a high port range unlikely to collide with other services: 20000-29999 +const deterministicPort = 20000 + (hashToInt(projectRoot) % 10000); + +export const baseWebpackConfig: Configuration = { + resolve: { + extensions: ['.js', '.ts', '.jsx', '.tsx'], + // Allow ESM-style `.js` import specifiers to resolve to their TS source counterparts. + // Required because `@fluentui/scripts-cypress` is `type: module`, which makes webpack + // enforce fully-specified imports (e.g. `./mount.js`) when bundling its support/browser files. + extensionAlias: { + '.js': ['.ts', '.tsx', '.js'], + '.jsx': ['.tsx', '.jsx'], + }, + }, + mode: 'development', + devtool: 'eval', + // Ensure parallel Cypress component runs don't collide on a fixed port (8080 is webpack-dev-server default). + // Pick a deterministic port per project (can be overridden) since some CI setups ignore 'auto'. + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore - devServer is provided by webpack-dev-server typings + devServer: { + port: process.env.WEBPACK_DEV_SERVER_PORT ? Number(process.env.WEBPACK_DEV_SERVER_PORT) : deterministicPort, + host: '127.0.0.1', + }, + output: { + publicPath: '/', + chunkFilename: '[name].bundle.js', + }, + module: { + rules: [], + }, +}; + +const cypressWebpackConfig = (): Configuration => { + if (baseWebpackConfig.module) { + baseWebpackConfig.module.rules?.push({ + test: /\.(ts|tsx)$/, + loader: 'esbuild-loader', + options: { + tsconfig: './tsconfig.cy.json', + }, + }); + } + + // TODO: remove this once esbuild-loader properly handles module loading https://github.com/privatenumber/esbuild-loader/issues/343#issuecomment-1845836603 + baseWebpackConfig.ignoreWarnings = [ + ...(baseWebpackConfig.ignoreWarnings ?? []), + { + module: /[esbuild-loader]/, + message: + /The specified tsconfig at\s+"[/a-z0-9-/.\s]+"\s+was applied to the file\s+"[/a-z0-9-.\s]+"\s+but does not match its "include" patterns/i, + }, + ]; + + baseWebpackConfig.resolve ??= {}; + baseWebpackConfig.resolve.plugins ??= []; + baseWebpackConfig.resolve.plugins.push( + new TsconfigPathsPlugin({ + configFile: path.resolve(import.meta.dirname, '../../../tsconfig.base.json'), + }), + ); + + return baseWebpackConfig; +}; + +interface BaseConfig extends Cypress.ConfigOptions { + component: Cypress.Config['component'] & { + devServer: { + bundler: 'webpack'; + framework: 'react'; + webpackConfig: Configuration; + }; + }; +} + +/** + * Programmatically create relative support support path, because Cypress bug + * @see https://github.com/cypress-io/cypress/issues/31819 + * + * This is a workaround for the issue where Cypress does not resolve the paths correctly, as it + * internally prepend the __dirname, making them invalid + * + */ +const sharedConfigSupportRootDir = path.join(import.meta.dirname, './support'); +const projectSupportDir = path.relative(projectRoot, sharedConfigSupportRootDir); + +export const baseConfig = defineConfig({ + video: false, + component: { + specPattern: [path.join(projectRoot, '**/*.e2e.tsx'), path.join(projectRoot, '**/*.cy.tsx')], + devServer: { + framework: 'react', + bundler: 'webpack', + webpackConfig: cypressWebpackConfig(), + }, + supportFile: path.join(projectSupportDir, './component.js'), + indexHtmlFile: path.join(projectSupportDir, './component-index.html'), + defaultCommandTimeout: 8000, + }, + retries: { + runMode: 4, + openMode: 0, + }, + // Screenshots go under /cypress/screenshots and can be useful to look at after failures in + // local headless runs (especially if the failure is specific to headless runs) + // screenshotOnRunFailure: isLocalRun && argv.mode === 'run', + fixturesFolder: path.join(import.meta.dirname, './fixtures'), +}) as BaseConfig; + +/** + * use this as base webpack config if you need to customize devServer webpack configuration + * + * Generate a deterministic, project-scoped port to avoid collisions when multiple Cypress component + * test servers start in parallel on the same machine/agent. Allows override via WEBPACK_DEV_SERVER_PORT. + */ +function hashToInt(str: string) { + // Use Node.js crypto module for better hashing + const hash = crypto.createHash('sha256').update(str).digest('hex'); + // Convert first 8 hex characters to integer + return parseInt(hash.slice(0, 8), 16); +} // =========== BROWSER APIs ================== // TODO: Browser related APIs should be exposed via export maps or moved to separate package // Expose Browser specific API under same barrel -export declare const mount: typeof import('./browser').mount; +export declare const mount: typeof import('./browser/index.js').mount; diff --git a/scripts/cypress/src/support/commands.js b/scripts/cypress/src/support/commands.js index 860efb5728624c..554dc82ed8139e 100644 --- a/scripts/cypress/src/support/commands.js +++ b/scripts/cypress/src/support/commands.js @@ -1,4 +1,5 @@ /* eslint-disable no-undef */ +import { realPress } from 'cypress-real-events/commands/realPress.js'; // *********************************************** // This example commands.js shows you how to // create various custom commands and overwrite @@ -37,5 +38,5 @@ const CYPRESS_MAJOR_VERSION = typeof Cypress !== 'undefined' && Cypress.version ? Number(String(Cypress.version).split('.')[0]) : undefined; if (CYPRESS_MAJOR_VERSION === 13) { - Cypress.Commands.add('press', /** @type {any} */ (require('cypress-real-events/commands/realPress').realPress)); + Cypress.Commands.add('press', /** @type {any} */ (realPress)); } diff --git a/scripts/cypress/src/support/component.js b/scripts/cypress/src/support/component.js index 55f84fff391330..837d01d704c7b9 100644 --- a/scripts/cypress/src/support/component.js +++ b/scripts/cypress/src/support/component.js @@ -14,8 +14,8 @@ // *********************************************************** // Import commands.js using ES2015 syntax: -import 'cypress-real-events/support'; -import './commands'; +import 'cypress-real-events/support.js'; +import './commands.js'; // Alternatively you can use CommonJS syntax: // require('./commands') diff --git a/scripts/cypress/tsconfig.lib.json b/scripts/cypress/tsconfig.lib.json index 2cd7456061fb19..0574f17e768329 100644 --- a/scripts/cypress/tsconfig.lib.json +++ b/scripts/cypress/tsconfig.lib.json @@ -1,9 +1,8 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "noEmit": false, + "noEmit": true, "lib": ["ES2019"], - "outDir": "../../dist/out-tsc", "types": ["node", "cypress"] }, "exclude": ["**/*.spec.ts", "**/*.test.ts"], diff --git a/scripts/monorepo/src/getDependencies.spec.js b/scripts/monorepo/src/getDependencies.spec.js index 985a36743bcc32..4563c9972b972e 100644 --- a/scripts/monorepo/src/getDependencies.spec.js +++ b/scripts/monorepo/src/getDependencies.spec.js @@ -10,62 +10,66 @@ describe(`#getDependencies`, () => { it(`should return package/s dependency tree array for all,devDeps and production dependencies`, async () => { const deps = await getDependencies(packageName); - expect(deps.dependencies).toMatchInlineSnapshot(` + // graph traversal order is not deterministic across machines; sort by name for a stable snapshot + /** @type {(a: { name: string }, b: { name: string }) => number} */ + const byName = (a, b) => a.name.localeCompare(b.name); + + expect([...deps.dependencies].sort(byName)).toMatchInlineSnapshot(` Array [ Object { "dependencyType": "dependencies", - "isTopLevel": true, - "name": "react-shared-contexts", + "isTopLevel": false, + "name": "keyboard-keys", }, Object { "dependencyType": "dependencies", "isTopLevel": true, - "name": "react-theme", + "name": "react-jsx-runtime", }, Object { "dependencyType": "dependencies", "isTopLevel": true, - "name": "react-utilities", + "name": "react-shared-contexts", }, Object { "dependencyType": "dependencies", "isTopLevel": true, - "name": "react-jsx-runtime", + "name": "react-theme", }, Object { "dependencyType": "dependencies", - "isTopLevel": false, - "name": "tokens", + "isTopLevel": true, + "name": "react-utilities", }, Object { "dependencyType": "dependencies", "isTopLevel": false, - "name": "keyboard-keys", + "name": "tokens", }, ] `); - expect(deps.devDependencies).toMatchInlineSnapshot(` + expect([...deps.devDependencies].sort(byName)).toMatchInlineSnapshot(` Array [ Object { "dependencyType": "devDependencies", - "isTopLevel": true, - "name": "react-conformance", + "isTopLevel": false, + "name": "eslint-plugin", }, Object { "dependencyType": "devDependencies", - "isTopLevel": true, - "name": "react-conformance-griffel", + "isTopLevel": false, + "name": "eslint-plugin-react-components", }, Object { "dependencyType": "devDependencies", - "isTopLevel": false, - "name": "eslint-plugin", + "isTopLevel": true, + "name": "react-conformance", }, Object { "dependencyType": "devDependencies", - "isTopLevel": false, - "name": "eslint-plugin-react-components", + "isTopLevel": true, + "name": "react-conformance-griffel", }, Object { "dependencyType": "devDependencies", @@ -82,7 +86,7 @@ describe(`#getDependencies`, () => { expect(packageInfo.absoluteRootPath).toEqual(expect.stringContaining('packages/react-components/react-text')); expect(packageInfo?.dependencies).toEqual(expect.any(Object)); - expect(packageInfo?.main).toEqual('lib-commonjs/index.js'); + expect(packageInfo?.main).toEqual('lib-commonjs/index.cjs'); expect(packageInfo?.module).toEqual('lib/index.js'); const depResultWithoutProjectScope = await getDependencies('react-text'); diff --git a/tools/react-integration-tester/src/__tests__/cli.e2e.test.ts b/tools/react-integration-tester/src/__tests__/cli.e2e.test.ts index cd8bdeddc910d3..af2e546bb6ff8b 100644 --- a/tools/react-integration-tester/src/__tests__/cli.e2e.test.ts +++ b/tools/react-integration-tester/src/__tests__/cli.e2e.test.ts @@ -360,8 +360,11 @@ describe('rit CLI e2e', () => { "import { join, resolve } from 'node:path'; import baseConfig from '../../../../proj/cypress.config.ts'; - // Resolve dependencies from the shared react-version root folder (injected by CLI) - const usedNodeModulesPath = join(__dirname, '..', 'node_modules'); + // Resolve dependencies from the shared react-version root folder (injected by CLI). + // Cypress executes this config with \`cwd\` set to the prepared project root (where this file lives), + // so \`process.cwd()\` is equivalent to the config directory and works in both CommonJS and ESM + // (\`type: module\`) sandboxes — unlike \`__dirname\`, which is undefined under native ESM. + const usedNodeModulesPath = join(process.cwd(), '..', 'node_modules'); const config = { ...baseConfig }; diff --git a/tools/react-integration-tester/src/args.ts b/tools/react-integration-tester/src/args.ts index 6193116264cd67..f598bc1a8164ca 100644 --- a/tools/react-integration-tester/src/args.ts +++ b/tools/react-integration-tester/src/args.ts @@ -131,7 +131,10 @@ export function parseArgs(processArgs: string[]): Required { } satisfies Required; function resolveConfigPath(projectRoot: string): string | undefined { - const defaultConfigPath = resolve(projectRoot, 'rit.config.js'); + // web packages ship as `type: module`, so their CommonJS rit config uses `.cjs`; fall back to `.js` + const defaultConfigPath = [resolve(projectRoot, 'rit.config.cjs'), resolve(projectRoot, 'rit.config.js')].find( + candidate => existsSync(candidate), + ); if (argv.config) { const userProvidedConfigPath = resolve(projectRoot, argv.config); @@ -141,6 +144,6 @@ export function parseArgs(processArgs: string[]): Required { return userProvidedConfigPath; } - return existsSync(defaultConfigPath) ? defaultConfigPath : undefined; + return defaultConfigPath; } } diff --git a/tools/react-integration-tester/src/files/cypress.config.ts.template b/tools/react-integration-tester/src/files/cypress.config.ts.template index cf2b5523a08628..b743cada6754e7 100644 --- a/tools/react-integration-tester/src/files/cypress.config.ts.template +++ b/tools/react-integration-tester/src/files/cypress.config.ts.template @@ -1,8 +1,11 @@ import { join, resolve } from 'node:path'; import baseConfig from '<%= relativePathToProjectRoot %>/<%= cypress.pathToProjectConfig %>'; -// Resolve dependencies from the shared react-version root folder (injected by CLI) -const usedNodeModulesPath = join(__dirname, '<%= usedNodeModulesDirRelative %>', 'node_modules'); +// Resolve dependencies from the shared react-version root folder (injected by CLI). +// Cypress executes this config with `cwd` set to the prepared project root (where this file lives), +// so `process.cwd()` is equivalent to the config directory and works in both CommonJS and ESM +// (`type: module`) sandboxes — unlike `__dirname`, which is undefined under native ESM. +const usedNodeModulesPath = join(process.cwd(), '<%= usedNodeModulesDirRelative %>', 'node_modules'); const config = { ...baseConfig }; diff --git a/tools/workspace-plugin/src/executors/build/executor.ts b/tools/workspace-plugin/src/executors/build/executor.ts index fddb58be2f1467..6f7d1bace5ee78 100644 --- a/tools/workspace-plugin/src/executors/build/executor.ts +++ b/tools/workspace-plugin/src/executors/build/executor.ts @@ -4,6 +4,7 @@ import { compileSwc } from './lib/swc'; import { compileWithGriffelStylesAOT, compileWithReactCompiler, hasStylesFilesToProcess } from './lib/babel'; import { assetGlobsToFiles, copyAssets } from './lib/assets'; import { cleanOutput } from './lib/clean'; +import { postprocessCjsExtension, copyCjsTypes } from './lib/cjs-extension'; import { NormalizedOptions, normalizeOptions, processAsyncQueue, runInParallel, runSerially } from './lib/shared'; import { measureEnd, measureStart } from '../../utils'; @@ -33,6 +34,8 @@ const runExecutor: PromiseExecutor = async (schema, context }, ), () => copyAssets(assetFiles), + () => postprocessCjsExtension(options), + () => copyCjsTypes(options), ); measureEnd('BuildExecutor'); diff --git a/tools/workspace-plugin/src/executors/build/lib/cjs-extension.ts b/tools/workspace-plugin/src/executors/build/lib/cjs-extension.ts new file mode 100644 index 00000000000000..b211c5b1b8394f --- /dev/null +++ b/tools/workspace-plugin/src/executors/build/lib/cjs-extension.ts @@ -0,0 +1,125 @@ +import { readFile, writeFile, rm, readdir, access, copyFile } from 'node:fs/promises'; +import { join } from 'node:path'; + +import { readJsonFile, logger } from '@nx/devkit'; + +import { type NormalizedOptions } from './shared'; + +// rewrite only RELATIVE specifiers (./ or ../) ending in .js -> .cjs +const RELATIVE_REQUIRE = /(require\(\s*["'])(\.[^"']+?)\.js(["']\s*\))/g; +const RELATIVE_SOURCEMAP = /(\/\/#\s*sourceMappingURL=)(\.?[^\s]+?)\.js\.map/g; + +async function exists(path: string) { + try { + await access(path); + return true; + } catch { + return false; + } +} + +async function* walk(dir: string): AsyncGenerator { + for (const entry of await readdir(dir, { withFileTypes: true })) { + const p = join(dir, entry.name); + if (entry.isDirectory()) { + yield* walk(p); + } else { + yield p; + } + } +} + +/** + * When a package ships as `"type": "module"`, the CommonJS output (`lib-commonjs`) must use the + * `.cjs` extension - otherwise Node would parse those `.js` files as ESM and fail. + * + * This renames every `lib-commonjs/**\/*.js` -> `*.cjs` (incl. `*.styles.raw.js`), rewrites relative + * `require("./x.js")` -> `require("./x.cjs")`, and renames the adjacent `*.js.map` -> `*.cjs.map`. + * + * No-op for packages that are not `"type": "module"`. + */ +export async function postprocessCjsExtension(options: NormalizedOptions): Promise { + const pkgJson = readJsonFile<{ type?: string }>(join(options.absoluteProjectRoot, 'package.json')); + if (pkgJson.type !== 'module') { + return true; + } + + const commonjsOutput = options.moduleOutput.find(output => output.module === 'commonjs'); + if (!commonjsOutput) { + return true; + } + + const cjsDir = join(options.absoluteProjectRoot, commonjsOutput.outputPath); + if (!(await exists(cjsDir))) { + return true; + } + + let renamedFiles = 0; + let renamedMaps = 0; + + for await (const file of walk(cjsDir)) { + if (file.endsWith('.js')) { + const code = (await readFile(file, 'utf-8')) + .replace(RELATIVE_REQUIRE, '$1$2.cjs$3') + .replace(RELATIVE_SOURCEMAP, '$1$2.cjs.map'); + await writeFile(file.replace(/\.js$/, '.cjs'), code); + await rm(file); + renamedFiles++; + } + } + + for await (const file of walk(cjsDir)) { + if (file.endsWith('.js.map')) { + const map = JSON.parse(await readFile(file, 'utf-8')); + if (typeof map.file === 'string') { + map.file = map.file.replace(/\.js$/, '.cjs'); + } + await writeFile(file.replace(/\.js\.map$/, '.cjs.map'), JSON.stringify(map)); + await rm(file); + renamedMaps++; + } + } + + logger.log( + `📦 CJS extension: ${renamedFiles} *.js → *.cjs (${renamedMaps} source maps) in ${commonjsOutput.outputPath}`, + ); + + return true; +} + +/** + * `type: module` packages expose CommonJS types under a `.d.cts` so that `require`-path consumers + * (TypeScript `node16`/`nodenext`) get a CommonJS-flavoured declaration matching the `.cjs` runtime + * file, instead of the ESM-flavoured `.d.ts` (which `@arethetypeswrong/cli` flags as "masquerading"). + * + * Our `dist/*.d.ts` are rolled single-file declarations (api-extractor) using only `export`/`export + * declare` syntax, so a verbatim copy to `.d.cts` is valid in a CommonJS declaration context. + * + * No-op for packages that are not `"type": "module"`. + */ +export async function copyCjsTypes(options: NormalizedOptions): Promise { + const pkgJson = readJsonFile<{ type?: string }>(join(options.absoluteProjectRoot, 'package.json')); + if (pkgJson.type !== 'module') { + return true; + } + + const distDir = join(options.absoluteProjectRoot, 'dist'); + if (!(await exists(distDir))) { + return true; + } + + let copied = 0; + for await (const file of walk(distDir)) { + // copy rolled declarations only (e.g. `index.d.ts`, `unstable.d.ts`), skip `.d.cts`/maps + if (file.endsWith('.d.ts')) { + await copyFile(file, file.replace(/\.d\.ts$/, '.d.cts')); + copied++; + } + } + + if (copied > 0) { + logger.log(`📦 CJS types: ${copied} *.d.ts → *.d.cts in dist`); + } + + return true; +} diff --git a/tools/workspace-plugin/src/executors/generate-api/lib/utils.ts b/tools/workspace-plugin/src/executors/generate-api/lib/utils.ts index bc169d7fabb7b5..ae526525a0645c 100644 --- a/tools/workspace-plugin/src/executors/generate-api/lib/utils.ts +++ b/tools/workspace-plugin/src/executors/generate-api/lib/utils.ts @@ -8,17 +8,38 @@ import type { PackageJson } from '../../../types'; import type { NormalizedOptions } from '../executor'; import { verboseLog } from './shared'; -function isTypedEntry(exportValue: unknown): exportValue is { types: string } & Record { - return typeof exportValue === 'object' && exportValue !== null && 'types' in exportValue; +/** + * Resolves the declaration (`.d.ts`) types path from an export entry, supporting both the legacy flat + * shape (`{ types }`) and the ESM-first nested shape (`{ import: { types } }`). The `import` condition + * always points at the ESM `.d.ts` rollup, which is what api-extractor consumes. + */ +function getEntryTypes(exportValue: unknown): string | undefined { + if (typeof exportValue !== 'object' || exportValue === null) { + return undefined; + } + const value = exportValue as Record; + if (typeof value.types === 'string') { + return value.types; + } + const importCondition = value.import; + if ( + typeof importCondition === 'object' && + importCondition !== null && + typeof (importCondition as Record).types === 'string' + ) { + return (importCondition as Record).types as string; + } + return undefined; +} + +function isTypedEntry(exportValue: unknown): exportValue is Record { + return getEntryTypes(exportValue) !== undefined; } /** * Checks whether a single export map entry is a wildcard entry with a `types` field. */ -function isWildcardTypedEntry( - exportKey: string, - exportValue: unknown, -): exportValue is { types: string } & Record { +function isWildcardTypedEntry(exportKey: string, exportValue: unknown): exportValue is Record { return exportKey.includes('*') && isTypedEntry(exportValue); } @@ -26,10 +47,7 @@ function isWildcardTypedEntry( * Checks whether a single export map entry is a named (non-wildcard, non-root) entry with a `types` field. * Skips `"."` and `"./package.json"`. */ -function isNamedTypedEntry( - exportKey: string, - exportValue: unknown, -): exportValue is { types: string } & Record { +function isNamedTypedEntry(exportKey: string, exportValue: unknown): exportValue is Record { if (exportKey === '.' || exportKey === './package.json' || exportKey.includes('*')) { return false; } @@ -61,7 +79,7 @@ export function getExportSubpathConfigs(options: NormalizedOptions): IConfigFile for (const [exportKey, exportValue] of Object.entries(exports)) { // Wildcard entries: expand into sub-directories if (isWildcardTypedEntry(exportKey, exportValue)) { - const pathPrefixes = parseWildcardTypesPattern(exportValue.types); + const pathPrefixes = parseWildcardTypesPattern(getEntryTypes(exportValue)!); if (!pathPrefixes) { continue; } @@ -88,7 +106,7 @@ export function getExportSubpathConfigs(options: NormalizedOptions): IConfigFile // Named entries: create config directly from types field if (isNamedTypedEntry(exportKey, exportValue)) { - const parsed = parseNamedTypesPattern(exportValue.types); + const parsed = parseNamedTypesPattern(getEntryTypes(exportValue)!); if (!parsed) { continue; } diff --git a/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts b/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts index 9ddbc96b6aa064..f7bca1a4331142 100644 --- a/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts +++ b/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts @@ -413,7 +413,11 @@ describe('migrate-converged-pkg generator', () => { describe(`jest config updates`, () => { function getProjectJestConfig(projectConfig: ReadProjectConfiguration) { - return tree.read(`${projectConfig.root}/jest.config.js`)?.toString('utf-8'); + // web packages emit `.cjs` (type:module); fall back to legacy `.js` + return ( + tree.read(`${projectConfig.root}/jest.config.cjs`)?.toString('utf-8') ?? + tree.read(`${projectConfig.root}/jest.config.js`)?.toString('utf-8') + ); } it(`should setup new local jest config which extends from root `, async () => { @@ -447,7 +451,7 @@ describe('migrate-converged-pkg generator', () => { ], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; " @@ -479,12 +483,14 @@ describe('migrate-converged-pkg generator', () => { it(`should create local ./config/tests.js file if missing that is used for "setupFilesAfterEnv"`, async () => { const projectConfig = readProjectConfiguration(tree, options.name); - const jestSetupFilePath = `${projectConfig.root}/config/tests.js`; + // web packages emit the setup file as `.cjs` (type:module) + const legacyJestSetupFilePath = `${projectConfig.root}/config/tests.js`; + const jestSetupFilePath = `${projectConfig.root}/config/tests.cjs`; function getJestSetupFile() { return tree.read(jestSetupFilePath)?.toString('utf-8'); } - tree.delete(jestSetupFilePath); + tree.delete(legacyJestSetupFilePath); expect(tree.exists(jestSetupFilePath)).toBeFalsy(); await generator(tree, options); @@ -930,17 +936,35 @@ describe('migrate-converged-pkg generator', () => { expect(pkgJson.exports).toMatchInlineSnapshot(` Object { ".": Object { - "import": "./lib/index.js", - "node": "./lib-commonjs/index.js", - "require": "./lib-commonjs/index.js", + "import": Object { + "default": "./lib/index.js", + "types": "./dist/index.d.ts", + }, + "require": Object { + "default": "./lib-commonjs/index.cjs", + "types": "./dist/index.d.cts", + }, "style": "./css/index.css", - "types": "./dist/index.d.ts", }, "./package.json": "./package.json", } `); }); + it(`should set type:module and a .cjs main for web packages`, async () => { + const { getPackageJson } = updatePackageJson(tree, { + projectName: options.name, + jsonUpdates: { module: './lib/index.js' }, + }); + + await generator(tree, options); + + const pkgJson = getPackageJson(); + expect(pkgJson.type).toBe('module'); + expect(pkgJson.main).toBe('./lib-commonjs/index.cjs'); + expect((pkgJson.exports?.['.'] as { node?: unknown }).node).toBeUndefined(); + }); + it(`should update exports map based on main,module fields`, async () => { const { getPackageJson } = updatePackageJson(tree, { projectName: options.name, @@ -989,6 +1013,7 @@ describe('migrate-converged-pkg generator', () => { expect(pkgJson.files).toMatchInlineSnapshot(` Array [ "*.md", + "dist/*.d.cts", "dist/*.d.ts", "lib-commonjs", ] @@ -1089,6 +1114,7 @@ describe('migrate-converged-pkg generator', () => { '/**/*.test.tsx', ], jsc: { + baseUrl: '.', parser: { syntax: 'typescript', tsx: true, @@ -1447,7 +1473,10 @@ describe('migrate-converged-pkg generator', () => { expect(pkgJson.exports['./unstable']).toMatchInlineSnapshot(` Object { "import": "./lib/unstable/index.js", - "node": "./lib-commonjs/unstable/index.js", + "node": Object { + "default": "./lib-commonjs/unstable/index.js", + "module": "./lib/unstable/index.js", + }, "require": "./lib-commonjs/unstable/index.js", "types": "./dist/unstable.d.ts", } diff --git a/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.ts b/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.ts index bc798ab216deb1..585035278aff0d 100644 --- a/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.ts +++ b/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.ts @@ -381,6 +381,7 @@ const templates = { '/**/*.test.tsx', ], jsc: { + baseUrl: '.', parser: { syntax: 'typescript', tsx: true, @@ -630,7 +631,13 @@ function setupUnstableApi(tree: Tree, options: NormalizedSchemaWithTsConfigs) { Object.assign(stableJson.exports, { './unstable': { types: unstableJson.typings?.replace(/\.\.\//g, ''), - ...(packageJson.main ? { node: './lib-commonjs/unstable/index.js' } : null), + ...(packageJson.main + ? { + node: packageJson.module + ? { module: './lib/unstable/index.js', default: './lib-commonjs/unstable/index.js' } + : './lib-commonjs/unstable/index.js', + } + : null), ...(packageJson.module ? { import: './lib/unstable/index.js' } : null), require: './lib-commonjs/unstable/index.js', }, @@ -685,13 +692,43 @@ function updatePackageJson(tree: Tree, options: NormalizedSchemaWithTsConfigs) { } function setupExportMaps(json: PackageJson) { + const isWeb = getPackageType(tree, options) === 'web'; + const commonjs = json.main ? normalizePackageEntryPointPaths(json.main) : null; + const esm = json.module ? normalizePackageEntryPointPaths(json.module) : null; + const commonjsCjs = commonjs ? commonjs.replace(/\.js$/, '.cjs') : null; + + if (isWeb) { + // Web packages ship ESM-first as `type: module`: bare Node `import` resolves to valid ESM (`lib/`), + // `require` resolves to CommonJS (`lib-commonjs/*.cjs`). No `node` condition is needed. + // Per-condition `types` point `require` at a `.d.cts` so `node16`/`nodenext` CJS consumers get a + // CommonJS-flavoured declaration (keeps `@arethetypeswrong/cli` green). + json.type = 'module'; + if (commonjsCjs) { + json.main = commonjsCjs; + } + const esmTypes = json.typings; + const cjsTypes = json.typings ? json.typings.replace(/\.d\.ts$/, '.d.cts') : undefined; + json.exports = { + '.': { + ...(json.style ? { style: normalizePackageEntryPointPaths(json.style) } : null), + ...(esm && esmTypes ? { import: { types: esmTypes, default: esm } } : null), + ...(commonjsCjs && cjsTypes ? { require: { types: cjsTypes, default: commonjsCjs } } : null), + }, + './package.json': './package.json', + }; + + return json; + } + + // node / CJS-first packages keep the module-condition shape (no `type: module`): + // bundlers tree-shake via `module`, bare Node stays CommonJS via `default`. json.exports = { '.': { types: json.typings, ...(json.style ? { style: normalizePackageEntryPointPaths(json.style) } : null), - ...(json.main ? { node: normalizePackageEntryPointPaths(json.main) } : null), - ...(json.module ? { import: normalizePackageEntryPointPaths(json.module) } : null), - ...(json.main ? { require: normalizePackageEntryPointPaths(json.main) } : null), + ...(commonjs ? { node: esm ? { module: esm, default: commonjs } : commonjs } : null), + ...(esm ? { import: esm } : null), + ...(commonjs ? { require: commonjs } : null), }, './package.json': './package.json', }; @@ -719,6 +756,8 @@ function updatePackageJson(tree: Tree, options: NormalizedSchemaWithTsConfigs) { const typesPath = getTypes(json); const storybookPath = getStorybookPath(json); const amdPath = options.projectConfig.tags?.includes('ships-amd') ? 'lib-amd' : null; + // `type: module` packages also ship `.d.cts` declarations for the `require` types condition + const cjsTypesPath = json.type === 'module' && typesPath ? typesPath.replace(/\.d\.ts$/, '.d.cts') : null; const filesDefinition = [ rootMarkdownPath, mainPath, @@ -726,6 +765,7 @@ function updatePackageJson(tree: Tree, options: NormalizedSchemaWithTsConfigs) { ...(binPath ?? []), stylesPath, typesPath, + cjsTypesPath, storybookPath, amdPath, ] @@ -970,20 +1010,38 @@ function updateLocalJestConfig(tree: Tree, options: NormalizedSchema) { const packageJson = readJson(tree, options.paths.packageJson); packageJson.dependencies = packageJson.dependencies ?? {}; + // Web packages ship as `type: module`, so their CommonJS configs must use the `.cjs` extension. + const isWeb = packageType === 'web'; + const testSetupExtension = isWeb ? 'cjs' : 'js'; + const jestConfigPath = isWeb ? options.paths.jestConfig.replace(/\.js$/, '.cjs') : options.paths.jestConfig; + const resolvedJestSetupFilePath = isWeb ? jestSetupFilePath.replace(/\.js$/, '.cjs') : jestSetupFilePath; + const config = { pkgName: options.normalizedPkgName, addSnapshotSerializers: packageType === 'web' && Object.keys(packageJson.dependencies).some(pkgDepName => packagesThatTriggerAddingSnapshots.includes(pkgDepName)), - testSetupFilePath: `./${path.basename(options.paths.configRoot)}/tests.js`, + testSetupFilePath: `./${path.basename(options.paths.configRoot)}/tests.${testSetupExtension}`, platform: packageType, projectConfig: options.projectConfig, } as const; - tree.write(options.paths.jestConfig, templates.jest(config)); + // drop the legacy `.js` variants when emitting `.cjs` (type:module web packages) + if (isWeb) { + if (tree.exists(options.paths.jestConfig)) { + tree.delete(options.paths.jestConfig); + } + if (tree.exists(jestSetupFilePath) && !tree.exists(resolvedJestSetupFilePath)) { + const existingSetup = tree.read(jestSetupFilePath, 'utf-8') as string; + tree.write(resolvedJestSetupFilePath, existingSetup); + tree.delete(jestSetupFilePath); + } + } + + tree.write(jestConfigPath, templates.jest(config)); - if (!tree.exists(jestSetupFilePath)) { - tree.write(jestSetupFilePath, templates.jestSetup); + if (!tree.exists(resolvedJestSetupFilePath)) { + tree.write(resolvedJestSetupFilePath, templates.jestSetup); } return tree; @@ -1075,8 +1133,12 @@ function createTsSolutionConfig(tree: Tree, options: NormalizedSchema) { function updateTsGlobalTypes(tree: Tree, options: NormalizedSchema) { // update test TS config updateJson(tree, options.paths.tsconfig.test, (json: TsConfig) => { - if (tree.exists(options.paths.jestSetupFile)) { - const jestSetupFile = tree.read(options.paths.jestSetupFile, 'utf8')!; + // web packages emit the jest setup as `.cjs` (type:module); fall back to the legacy `.js` path + const jestSetupFilePath = [options.paths.jestSetupFile.replace(/\.js$/, '.cjs'), options.paths.jestSetupFile].find( + candidate => tree.exists(candidate), + ); + if (jestSetupFilePath) { + const jestSetupFile = tree.read(jestSetupFilePath, 'utf8')!; if (jestSetupFile.includes(`require('@testing-library/jest-dom')`)) { json.compilerOptions.types = json.compilerOptions.types ?? []; diff --git a/tools/workspace-plugin/src/generators/react-library/files/.storybook/main.js__tmpl__ b/tools/workspace-plugin/src/generators/react-library/files/.storybook/main.cjs__tmpl__ similarity index 100% rename from tools/workspace-plugin/src/generators/react-library/files/.storybook/main.js__tmpl__ rename to tools/workspace-plugin/src/generators/react-library/files/.storybook/main.cjs__tmpl__ diff --git a/tools/workspace-plugin/src/generators/react-library/files/config/tests.js__tmpl__ b/tools/workspace-plugin/src/generators/react-library/files/config/tests.cjs__tmpl__ similarity index 100% rename from tools/workspace-plugin/src/generators/react-library/files/config/tests.js__tmpl__ rename to tools/workspace-plugin/src/generators/react-library/files/config/tests.cjs__tmpl__ diff --git a/tools/workspace-plugin/src/generators/react-library/files/eslint.config.js__tmpl__ b/tools/workspace-plugin/src/generators/react-library/files/eslint.config.cjs__tmpl__ similarity index 100% rename from tools/workspace-plugin/src/generators/react-library/files/eslint.config.js__tmpl__ rename to tools/workspace-plugin/src/generators/react-library/files/eslint.config.cjs__tmpl__ diff --git a/tools/workspace-plugin/src/generators/react-library/files/jest.config.js__tmpl__ b/tools/workspace-plugin/src/generators/react-library/files/jest.config.cjs__tmpl__ similarity index 96% rename from tools/workspace-plugin/src/generators/react-library/files/jest.config.js__tmpl__ rename to tools/workspace-plugin/src/generators/react-library/files/jest.config.cjs__tmpl__ index 5e06cc7e423dd2..bc2630204c1c2f 100644 --- a/tools/workspace-plugin/src/generators/react-library/files/jest.config.js__tmpl__ +++ b/tools/workspace-plugin/src/generators/react-library/files/jest.config.cjs__tmpl__ @@ -29,6 +29,6 @@ module.exports = { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], }, coverageDirectory: './coverage', - setupFilesAfterEnv: ['./config/tests.js'], + setupFilesAfterEnv: ['./config/tests.cjs'], snapshotSerializers: ['@griffel/jest-serializer'], }; diff --git a/tools/workspace-plugin/src/generators/react-library/files/package.json__tmpl__ b/tools/workspace-plugin/src/generators/react-library/files/package.json__tmpl__ index d0ea3466ca829f..9bd237dc83b1cc 100644 --- a/tools/workspace-plugin/src/generators/react-library/files/package.json__tmpl__ +++ b/tools/workspace-plugin/src/generators/react-library/files/package.json__tmpl__ @@ -3,13 +3,15 @@ "version": "0.0.0", "private": true, "description": "New fluentui react package", - "main": "lib-commonjs/index.js", + "type": "module", + "main": "lib-commonjs/index.cjs", "module": "lib/index.js", "typings": "./dist/index.d.ts", "sideEffects": false, "files": [ "*.md", "dist/*.d.ts", + "dist/*.d.cts", "lib", "lib-commonjs" ], @@ -34,10 +36,14 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./lib-commonjs/index.js", - "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./lib/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./lib-commonjs/index.cjs" + } }, "./package.json": "./package.json" }, diff --git a/tools/workspace-plugin/src/generators/react-library/index.spec.ts b/tools/workspace-plugin/src/generators/react-library/index.spec.ts index 75af512ec0a54c..68c31956f33a2a 100644 --- a/tools/workspace-plugin/src/generators/react-library/index.spec.ts +++ b/tools/workspace-plugin/src/generators/react-library/index.spec.ts @@ -59,9 +59,9 @@ describe('react-library generator', () => { "README.md", "config", "docs", - "eslint.config.js", + "eslint.config.cjs", "etc", - "jest.config.js", + "jest.config.cjs", "package.json", "src", "tsconfig.json", @@ -72,7 +72,7 @@ describe('react-library generator', () => { expect(tree.children(joinPathFragments(library.root, 'docs'))).toEqual(['Spec.md']); expect(tree.children(joinPathFragments(library.root, 'src'))).toEqual(['index.ts', 'testing']); expect(tree.exists(joinPathFragments(library.root, 'src', 'testing', 'isConformant.ts'))).toEqual(true); - expect(tree.children(joinPathFragments(library.root, 'config'))).toEqual(['api-extractor.json', 'tests.js']); + expect(tree.children(joinPathFragments(library.root, 'config'))).toEqual(['api-extractor.json', 'tests.cjs']); expect(tree.children(joinPathFragments(library.root, 'etc'))).toEqual(['react-one-preview.api.md']); expect(library).toMatchInlineSnapshot(` @@ -103,7 +103,7 @@ describe('react-library generator', () => { name: '@proj/react-one-preview', private: true, version: '0.0.0', - files: ['*.md', 'dist/*.d.ts', 'lib', 'lib-commonjs'], + files: ['*.md', 'dist/*.d.ts', 'dist/*.d.cts', 'lib', 'lib-commonjs'], dependencies: { '@proj/react-jsx-runtime': '^9.0.0', '@proj/react-shared-contexts': '^9.0.0', @@ -155,7 +155,7 @@ describe('react-library generator', () => { expect.objectContaining({ extends: '../../../../.babelrc-v9.json' }), ); - const jestConfig = tree.read(`${library.root}/jest.config.js`, 'utf-8'); + const jestConfig = tree.read(`${library.root}/jest.config.cjs`, 'utf-8'); expect(jestConfig).toEqual(expect.stringContaining(`displayName: 'react-one-preview',`)); expect(jestConfig).toEqual(expect.stringContaining(`'^.+\\\\.tsx?$': ['@swc/jest', swcJestConfig],`)); expect(tree.read(`${library.root}/README.md`, 'utf-8')).toEqual( @@ -260,9 +260,9 @@ describe('react-library generator', () => { "README.md", "config", "docs", - "eslint.config.js", + "eslint.config.cjs", "etc", - "jest.config.js", + "jest.config.cjs", "package.json", "src", "tsconfig.json", diff --git a/tools/workspace-plugin/src/plugins/workspace-plugin.ts b/tools/workspace-plugin/src/plugins/workspace-plugin.ts index 7af58ba2f027ef..92cf0d8cc4e54b 100644 --- a/tools/workspace-plugin/src/plugins/workspace-plugin.ts +++ b/tools/workspace-plugin/src/plugins/workspace-plugin.ts @@ -276,6 +276,11 @@ function buildWorkspaceProjectConfiguration( targets[options.verifyPackaging.targetName] = verifyPackagingTarget; } + const attwTarget = buildAttwTarget(projectRoot, config); + if (attwTarget) { + targets.attw = attwTarget; + } + let metadata: WorkspaceTargets['metadata']; if (isReactProject) { @@ -405,7 +410,11 @@ function buildTestTarget( context: CreateNodesContextV2, config: TaskBuilderConfig, ): TargetConfiguration> | null { - if (!existsSync(join(projectRoot, 'jest.config.js')) && !existsSync(join(projectRoot, 'jest.config.ts'))) { + if ( + !existsSync(join(projectRoot, 'jest.config.js')) && + !existsSync(join(projectRoot, 'jest.config.cjs')) && + !existsSync(join(projectRoot, 'jest.config.ts')) + ) { return null; } @@ -430,6 +439,28 @@ function buildTestTarget( }; } +function buildAttwTarget(projectRoot: string, config: TaskBuilderConfig): TargetConfiguration | null { + // optional, published-library-only types/exports validation. Not part of `build` or CI gates. + if (!config.packageJSON.exports) { + return null; + } + + return { + executor: 'nx:run-commands', + cache: true, + dependsOn: ['build'], + options: { + cwd: projectRoot, + command: `${config.pmc.exec} attw --pack --profile node16`, + }, + inputs: ['default', { externalDependencies: ['@arethetypeswrong/cli'] }], + metadata: { + description: 'Validate package types & export map with @arethetypeswrong/cli (optional)', + technologies: ['typescript'], + }, + }; +} + function buildLintTarget( projectRoot: string, options: Required, @@ -864,16 +895,22 @@ function buildReactIntegrationTesterProjectConfiguration( hasTypeCheck: storybookAdjacent || libraryWithStoriesAdj, hasE2E: existsSync(join(projectRootPath, 'cypress.config.ts')) && !storybookAdjacent, hasTest: - (existsSync(join(projectRootPath, 'jest.config.js')) || existsSync(join(projectRootPath, 'jest.config.ts'))) && + (existsSync(join(projectRootPath, 'jest.config.js')) || + existsSync(join(projectRootPath, 'jest.config.cjs')) || + existsSync(join(projectRootPath, 'jest.config.ts'))) && !storybookAdjacent, }; - const ritConfigPathLocal = join(projectRootPath, 'rit.config.js'); + // web packages ship as `type: module`, so their CommonJS rit config uses `.cjs`; fall back to `.js` + const ritConfigPathLocal = [ + resolve(projectRootPath, 'rit.config.cjs'), + resolve(projectRootPath, 'rit.config.js'), + ].find(candidate => existsSync(candidate)); - if (existsSync(ritConfigPathLocal)) { + if (ritConfigPathLocal) { try { type RITConfig = { react: Record }> }; - const loaded = require(resolve(projectRootPath, 'rit.config.js')); + const loaded = require(ritConfigPathLocal); const rit: RITConfig = loaded?.default ?? loaded; if (rit && typeof rit === 'object' && rit.react && rit.react[reactVersion]) { diff --git a/tools/workspace-plugin/src/types.ts b/tools/workspace-plugin/src/types.ts index 1b0e524daf29fb..3fb7f43d0099c9 100644 --- a/tools/workspace-plugin/src/types.ts +++ b/tools/workspace-plugin/src/types.ts @@ -21,6 +21,7 @@ export interface TsConfig { export interface PackageJson { bin?: string | Record; + type?: 'module' | 'commonjs'; types?: string; typings?: string; private?: boolean; @@ -47,7 +48,17 @@ export interface PackageJson { dependencies?: Record; devDependencies?: Record; peerDependencies?: Record; - exports?: Record>; + exports?: Record< + string, + | string + | Partial<{ + types: string; + style: string; + node: string | { module: string; default: string }; + import: string | { types: string; default: string }; + require: string | { types: string; default: string }; + }> + >; } export interface PackageJsonWithBeachball extends PackageJson { diff --git a/yarn.lock b/yarn.lock index 8fb3ef306d2a5b..e29f623796a8a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32,6 +32,38 @@ resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.4.4.tgz#2856c55443d3d461693f32d2b96fb6ea92e1ffa9" integrity sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg== +"@andrewbranch/untar.js@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@andrewbranch/untar.js/-/untar.js-1.0.3.tgz#ba9494f85eb83017c5c855763969caf1d0adea00" + integrity sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw== + +"@arethetypeswrong/cli@0.18.3": + version "0.18.3" + resolved "https://registry.yarnpkg.com/@arethetypeswrong/cli/-/cli-0.18.3.tgz#c63921709886a0772d3ea75673c61c5b39a5bdfe" + integrity sha512-GeAlc+lUD4gKHD/LDQNvQY30FfQ+xAXg2inbQKUjFZgTOdI5ygEweaOnGHGBPSKXSLGQC7VLhpXu9zMnYk/4sQ== + dependencies: + "@arethetypeswrong/core" "0.18.3" + chalk "^4.1.2" + cli-table3 "^0.6.3" + commander "^10.0.1" + marked "^9.1.2" + marked-terminal "^7.1.0" + semver "^7.5.4" + +"@arethetypeswrong/core@0.18.3": + version "0.18.3" + resolved "https://registry.yarnpkg.com/@arethetypeswrong/core/-/core-0.18.3.tgz#9dbf9ae33f4a9ea975533ad3200d98d591bbfbcb" + integrity sha512-sWBB/tdIktaT5xMq0Dz6CJyqcf6oMNdmiKiuPU1lWoJLTL6gjRSsksBuSgqot21hylkklBQY1wiSu+PkZhW7sw== + dependencies: + "@andrewbranch/untar.js" "^1.0.3" + "@loaderkit/resolve" "^1.0.2" + cjs-module-lexer "^1.2.3" + fflate "^0.8.3" + lru-cache "^11.0.1" + semver "^7.5.4" + typescript "5.6.1-rc" + validate-npm-package-name "^5.0.0" + "@asamuzakjp/css-color@^3.2.0": version "3.2.0" resolved "https://registry.yarnpkg.com/@asamuzakjp/css-color/-/css-color-3.2.0.tgz#cc42f5b85c593f79f1fa4f25d2b9b321e61d1794" @@ -1359,6 +1391,11 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@braidai/lang@^1.0.0": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@braidai/lang/-/lang-1.1.2.tgz#65bc2bc1db6d00e153b95ac7006f4573e289e9be" + integrity sha512-qBcknbBufNHlui137Hft8xauQMTZDKdophmLFv05r2eNmdIv/MlPuP4TdUknHG68UdWLgVZwgxVe735HzJNIwA== + "@cactuslab/usepubsub@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@cactuslab/usepubsub/-/usepubsub-1.0.2.tgz#08877905242d2e1b6053ffc6d0efbb097dd5a32b" @@ -2537,6 +2574,13 @@ resolved "https://registry.yarnpkg.com/@linaria/utils/-/utils-3.0.0-beta.20.tgz#0965df816120a1973c4559b746571c01c6cb9bef" integrity sha512-SKRC9dBApzu0kTksVtGZ7eJz1vMu7xew/JEAjQj6XTQDblzWpTPyKQHBOGXNkqXjIB8PwAqWfvKzKapzaOwQaQ== +"@loaderkit/resolve@^1.0.2": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@loaderkit/resolve/-/resolve-1.0.6.tgz#8d45341e688faecc25b3ae919c0f45d94c4e26c9" + integrity sha512-G8FdIoF5CypfwmD9rl8BXod5HDn8JqB0CCNBXDTaRZ+yRYhARrrSToX1zg1zy9jX3zLqigsELwhT4gNtkdQAUg== + dependencies: + "@braidai/lang" "^1.0.0" + "@mdn/browser-compat-data@^5.5.35", "@mdn/browser-compat-data@^5.6.19": version "5.6.36" resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-5.6.36.tgz#209c3a37aa1b2cbd503cfa7bb0755084a50cc1ff" @@ -3732,6 +3776,11 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.34.41.tgz#aa51a6c1946df2c5a11494a2cdb9318e026db16c" integrity sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g== +"@sindresorhus/is@^4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" + integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== + "@sindresorhus/is@^5.2.0": version "5.6.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-5.6.0.tgz#41dd6093d34652cddb5d5bdeee04eafc33826668" @@ -5973,6 +6022,11 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== +ansi-regex@^6.1.0: + version "6.2.2" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.2.2.tgz#60216eea464d864597ce2832000738a0589650c1" + integrity sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -6002,6 +6056,11 @@ ansicolors@~0.3.2: resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" integrity sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk= +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== + anymatch@^3.0.0, anymatch@^3.1.3, anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" @@ -7236,6 +7295,11 @@ chalk@^5.1.2, chalk@^5.2.0: resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== +chalk@^5.4.1: + version "5.6.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.6.2.tgz#b1238b6e23ea337af71c7f8a295db5af0c158aea" + integrity sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA== + change-case@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.1.0.tgz#0e611b7edc9952df2e8513b27b42de72647dd17e" @@ -7517,6 +7581,18 @@ cli-cursor@^2.1.0: dependencies: restore-cursor "^2.0.0" +cli-highlight@^2.1.11: + version "2.1.11" + resolved "https://registry.yarnpkg.com/cli-highlight/-/cli-highlight-2.1.11.tgz#49736fa452f0aaf4fae580e30acb26828d2dc1bf" + integrity sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg== + dependencies: + chalk "^4.0.0" + highlight.js "^10.7.1" + mz "^2.4.0" + parse5 "^5.1.1" + parse5-htmlparser2-tree-adapter "^6.0.0" + yargs "^16.0.0" + cli-spinners@2.6.1, cli-spinners@^2.0.0, cli-spinners@^2.5.0: version "2.6.1" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" @@ -9166,6 +9242,11 @@ emoji-regex@~6.1.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.1.tgz#c6cd0ec1b0642e2a3c67a1137efc5e796da4f88e" integrity sha1-xs0OwbBkLio8Z6ETfvxeeW2k+I4= +emojilib@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/emojilib/-/emojilib-2.4.0.tgz#ac518a8bb0d5f76dda57289ccb2fdf9d39ae721e" + integrity sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw== + emojis-list@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" @@ -10446,6 +10527,11 @@ fetch-blob@^3.1.2, fetch-blob@^3.1.4: node-domexception "^1.0.0" web-streams-polyfill "^3.0.3" +fflate@^0.8.3: + version "0.8.3" + resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.8.3.tgz#bc27d8eb30343d4d512abb03480202ce65d825fc" + integrity sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA== + figures@3.2.0, figures@^3.0.0, figures@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -11583,6 +11669,11 @@ hermes-parser@^0.25.1: dependencies: hermes-estree "0.25.1" +highlight.js@^10.7.1: + version "10.7.3" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" + integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== + highlight.js@~9.13.0: version "9.13.1" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.13.1.tgz#054586d53a6863311168488a0f58d6c505ce641e" @@ -14207,6 +14298,11 @@ lru-cache@^11.0.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.0.2.tgz#fbd8e7cf8211f5e7e5d91905c415a3f55755ca39" integrity sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA== +lru-cache@^11.0.1: + version "11.5.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.5.1.tgz#f3daa3540847b9737ebc02499ddb36765e54db4a" + integrity sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A== + lru-cache@^4.0.1: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" @@ -14352,11 +14448,29 @@ marked-terminal@^4.1.0: node-emoji "^1.10.0" supports-hyperlinks "^2.1.0" +marked-terminal@^7.1.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-7.3.0.tgz#7a86236565f3dd530f465ffce9c3f8b62ef270e8" + integrity sha512-t4rBvPsHc57uE/2nJOLmMbZCQ4tgAccAED3ngXQqW6g+TxA488JzJ+FK3lQkzBQOI1mRV/r/Kq+1ZlJ4D0owQw== + dependencies: + ansi-escapes "^7.0.0" + ansi-regex "^6.1.0" + chalk "^5.4.1" + cli-highlight "^2.1.11" + cli-table3 "^0.6.5" + node-emoji "^2.2.0" + supports-hyperlinks "^3.1.0" + marked@^4.0.12: version "4.0.12" resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.12.tgz#2262a4e6fd1afd2f13557726238b69a48b982f7d" integrity sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ== +marked@^9.1.2: + version "9.1.6" + resolved "https://registry.yarnpkg.com/marked/-/marked-9.1.6.tgz#5d2a3f8180abfbc5d62e3258a38a1c19c0381695" + integrity sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q== + math-intrinsics@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" @@ -15510,6 +15624,15 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +mz@^2.4.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + n-readlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/n-readlines/-/n-readlines-1.0.0.tgz#c353797f216c253fdfef7e91da4e8b17c29a91a6" @@ -15641,6 +15764,16 @@ node-emoji@^1.10.0: dependencies: lodash.toarray "^4.4.0" +node-emoji@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-2.2.0.tgz#1d000e3c76e462577895be1b436f4aa2d6760eb0" + integrity sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw== + dependencies: + "@sindresorhus/is" "^4.6.0" + char-regex "^1.0.2" + emojilib "^2.4.0" + skin-tone "^2.0.0" + node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -16373,6 +16506,13 @@ parse-url@^8.1.0: dependencies: parse-path "^7.0.0" +parse5-htmlparser2-tree-adapter@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" + integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== + dependencies: + parse5 "^6.0.1" + parse5-htmlparser2-tree-adapter@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz#b5a806548ed893a43e24ccb42fbb78069311e81b" @@ -16388,11 +16528,16 @@ parse5-parser-stream@^7.1.2: dependencies: parse5 "^7.0.0" -parse5@^5.1.0: +parse5@^5.1.0, parse5@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== +parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + parse5@^7.0.0, parse5@^7.2.1, parse5@^7.3.0: version "7.3.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.3.0.tgz#d7e224fa72399c7a175099f45fc2ad024b05ec05" @@ -18453,6 +18598,13 @@ sisteransi@^1.0.5: resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== +skin-tone@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/skin-tone/-/skin-tone-2.0.0.tgz#4e3933ab45c0d4f4f781745d64b9f4c208e41237" + integrity sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA== + dependencies: + unicode-emoji-modifier-base "^1.0.0" + slash@3.0.0, slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -19159,6 +19311,14 @@ supports-hyperlinks@^2.1.0: has-flag "^4.0.0" supports-color "^7.0.0" +supports-hyperlinks@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-3.2.0.tgz#b8e485b179681dea496a1e7abdf8985bd3145461" + integrity sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig== + dependencies: + has-flag "^4.0.0" + supports-color "^7.0.0" + supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" @@ -19418,6 +19578,20 @@ textextensions@^2.5.0: resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.6.0.tgz#d7e4ab13fe54e32e08873be40d51b74229b00fc4" integrity sha512-49WtAWS+tcsy93dRt6P0P3AMD2m5PvXRhuEA0kaXos5ZLlujtYmpmFsB+QvWUSxE1ZsstmYXfQ7L40+EcQgpAQ== +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== + dependencies: + any-promise "^1.0.0" + throttleit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" @@ -19930,6 +20104,11 @@ typescript-eslint@8.46.2, typescript-eslint@^8.0.0, typescript-eslint@^8.46.2: "@typescript-eslint/typescript-estree" "8.46.2" "@typescript-eslint/utils" "8.46.2" +typescript@5.6.1-rc: + version "5.6.1-rc" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.1-rc.tgz#d5e4d7d8170174fed607b74cc32aba3d77018e02" + integrity sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ== + typescript@5.7.3: version "5.7.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e" @@ -20042,6 +20221,11 @@ unicode-canonical-property-names-ecmascript@^2.0.0: resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== +unicode-emoji-modifier-base@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unicode-emoji-modifier-base/-/unicode-emoji-modifier-base-1.0.0.tgz#dbbd5b54ba30f287e2a8d5a249da6c0cef369459" + integrity sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g== + unicode-match-property-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" @@ -21236,6 +21420,19 @@ yargs@^15.3.1: y18n "^4.0.0" yargs-parser "^18.1.2" +yargs@^16.0.0: + version "16.2.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.2.tgz#c56731dca0d2788ae0866dd3c83907d6bab85f7d" + integrity sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"