diff --git a/.changeset/long-ideas-flow.md b/.changeset/long-ideas-flow.md new file mode 100644 index 0000000000..6b309d48d6 --- /dev/null +++ b/.changeset/long-ideas-flow.md @@ -0,0 +1,84 @@ +--- +'@uifabricshared/foundation-composable': patch +'@fluentui-react-native/experimental-appearance-additions': patch +'@uifabricshared/theming-react-native': patch +'@uifabricshared/foundation-settings': patch +'@fluentui-react-native/experimental-activity-indicator': patch +'@fluentui-react-native/experimental-native-font-metrics': patch +'@uifabricshared/foundation-compose': patch +'@fluentui-react-native/experimental-native-date-picker': patch +'@uifabricshared/foundation-tokens': patch +'@fluentui-react-native/eslint-config-rules': patch +'@fluentui-react-native/themed-stylesheet': patch +'@uifabricshared/themed-settings': patch +'@fluentui-react-native/contextual-menu': patch +'@uifabricshared/theme-registry': patch +'@fluentui-react-native/vibrancy-view': patch +'@fluentui-react-native/immutable-merge': patch +'@fluentui-react-native/focus-trap-zone': patch +'@fluentui-react-native/notification': patch +'@uifabricshared/theming-ramp': patch +'@fluentui-react-native/experimental-menu-button': patch +'@fluentui-react-native/interactive-hooks': patch +'@fluentui-react-native/persona-coin': patch +'@fluentui-react-native/menu-button': patch +'@fluentui-react-native/radio-group': patch +'@fluentui-react-native/experimental-checkbox': patch +'@fluentui-react-native/dropdown': patch +'@fluentui-react-native/experimental-expander': patch +'@fluentui-react-native/overflow': patch +'@fluentui-react-native/composition': patch +'@fluentui-react-native/merge-props': patch +'@fluentui-react-native/use-styling': patch +'@fluentui-react-native/android-theme': patch +'@fluentui-react-native/default-theme': patch +'@fluentui-react-native/theming-utils': patch +'@fluentui-react-native/focus-zone': patch +'@fluentui-react-native/pressable': patch +'@fluentui-react-native/separator': patch +'@fluentui-react-native/popover': patch +'@fluentui-react-native/experimental-shimmer': patch +'@fluentui-react-native/spinner': patch +'@fluentui-react-native/tooltip': patch +'@fluentui-react-native/memo-cache': patch +'@fluentui-react-native/use-tokens': patch +'@fluentui-react-native/theme-tokens': patch +'@fluentui-react-native/checkbox': patch +'@fluentui-react-native/jest-config': patch +'@fluentui-react-native/experimental-avatar': patch +'@fluentui-react-native/drawer': patch +'@fluentui-react-native/experimental-shadow': patch +'@fluentui-react-native/framework': patch +'@fluentui-react-native/use-slots': patch +'@fluentui-react-native/apple-theme': patch +'@fluentui-react-native/theme-types': patch +'@fluentui-react-native/win32-theme': patch +'@fluentui-react-native/callout': patch +'@fluentui-react-native/divider': patch +'@fluentui-react-native/persona': patch +'@fluentui-react-native/tablist': patch +'@fluentui-react-native/kit-config': patch +'@fluentui-react-native/experimental-stack': patch +'@fluentui-react-native/use-slot': patch +'@fluentui-react-native/avatar': patch +'@fluentui-react-native/button': patch +'@fluentui-react-native/switch': patch +'@fluentui-react-native/badge': patch +'@fluentui-react-native/input': patch +'@fluentui-react-native/stack': patch +'@fluentui-react-native/chip': patch +'@fluentui-react-native/icon': patch +'@fluentui-react-native/link': patch +'@fluentui-react-native/menu': patch +'@fluentui-react-native/text': patch +'@fluentui-react-native/theme': patch +'@fluentui-react-native/framework-base': patch +'@fluentui/react-native': patch +'@fluentui-react-native/adapters': patch +'@fluentui-react-native/styling-utils': patch +'@fluentui-react-native/tokens': patch +'@fluentui-react-native/codemods': patch +'@fluentui-react-native/scripts': patch +--- + +Ensure packages have a default export that references the typescript entrypoint and clean up build dependency ordering diff --git a/apps/E2E/package.json b/apps/E2E/package.json index 9738dec15f..26be4851aa 100644 --- a/apps/E2E/package.json +++ b/apps/E2E/package.json @@ -19,13 +19,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "e2eprep:android": "cross-env APPIUM_HOME=.appium yarn exec appium driver install uiautomator2", "e2eprep:ios": "cross-env APPIUM_HOME=.appium yarn exec appium driver install xcuitest", "e2eprep:macos": "cross-env APPIUM_HOME=.appium yarn exec appium driver install mac2", diff --git a/apps/fluent-tester/package.json b/apps/fluent-tester/package.json index 813bd0e473..2f75270529 100644 --- a/apps/fluent-tester/package.json +++ b/apps/fluent-tester/package.json @@ -17,14 +17,15 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "android": "rnx-cli run --platform android", "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "bundle": "rnx-cli bundle --dev false", "bundle:android": "rnx-cli bundle --dev false --platform android", "bundle:ios": "rnx-cli bundle --dev false --platform ios", diff --git a/apps/tester-core/package.json b/apps/tester-core/package.json index 3d5c8b06f5..09159e985e 100644 --- a/apps/tester-core/package.json +++ b/apps/tester-core/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/apps/win32-81/package.json b/apps/win32-81/package.json index 9226b9240a..382891b401 100644 --- a/apps/win32-81/package.json +++ b/apps/win32-81/package.json @@ -14,13 +14,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "bundle": "rnx-cli bundle --dev false", "bundle-dev": "rnx-cli bundle", "clean": "fluentui-scripts clean", diff --git a/apps/win32/package.json b/apps/win32/package.json index 3dfad10f52..72e242ac32 100644 --- a/apps/win32/package.json +++ b/apps/win32/package.json @@ -14,13 +14,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "bundle": "rnx-cli bundle --dev false", "bundle-dev": "rnx-cli bundle", "clean": "fluentui-scripts clean", diff --git a/lage.config.js b/lage.config.js index 826f3b8d6f..43b23a6c63 100644 --- a/lage.config.js +++ b/lage.config.js @@ -3,21 +3,24 @@ const config = { npmClient: 'yarn', pipeline: { 'build-cjs': { - dependsOn: ['^build-cjs'], + // cjs builds need to wait for the esm builds to produce the type definitions + dependsOn: ['^build-core', '^build-cjs'], inputs: ['*', 'src/**/*', 'assets/**/*'], outputs: ['lib-commonjs/**/*'], }, - 'build-esm': { - dependsOn: ['^build-esm'], + 'build-core': { + // the core build does esm builds (which produce type definitions used by both cjs and esm builds) + // this also handles noEmit packages which should be run in sequence with other packages + dependsOn: ['^build-core'], inputs: ['*', 'src/**/*', 'assets/**/*'], outputs: ['lib/**/*'], }, - 'build-dual': { - dependsOn: ['build-cjs', 'build-esm'], + 'build-all': { + dependsOn: ['build-core', 'build-cjs'], inputs: ['*', 'src/**/*', 'assets/**/*'], outputs: ['lib/**/*', 'lib-commonjs/**/*'], }, - buildci: ['build-dual', 'test', 'lint', 'lint-package'], + buildci: ['build-all', 'test', 'lint', 'lint-package'], bundle: { inputs: ['**/*', '!node_modules/**/*', '!dist/**/*', '!lib/**/*', '!lib-commonjs/**/*'], outputs: ['dist/**/*'], @@ -39,7 +42,7 @@ const config = { }, 'pr-check': ['buildci', 'lint-package', 'lint-lockfile', 'format:check'], test: { - dependsOn: ['build-dual'], + dependsOn: ['build-all'], inputs: [], outputs: [], }, diff --git a/package.json b/package.json index c310811530..01d6cdc940 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "scripts" ], "scripts": { - "build": "lage build-dual", + "build": "lage build-all", "buildci": "lage buildci", "clean-all": "node ./scripts/src/preinstall/clean-all.js", "docs": "yarn workspace fluent-rn-website start", diff --git a/packages/codemods/package.json b/packages/codemods/package.json index b267c79f18..f442edda7d 100644 --- a/packages/codemods/package.json +++ b/packages/codemods/package.json @@ -20,13 +20,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Avatar/package.json b/packages/components/Avatar/package.json index 84130e3b42..e975cab2f0 100644 --- a/packages/components/Avatar/package.json +++ b/packages/components/Avatar/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Badge/package.json b/packages/components/Badge/package.json index e2493d2c30..8f5df7f9a6 100644 --- a/packages/components/Badge/package.json +++ b/packages/components/Badge/package.json @@ -13,13 +13,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Button/package.json b/packages/components/Button/package.json index 139b12f4fa..7ab57bc646 100644 --- a/packages/components/Button/package.json +++ b/packages/components/Button/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Callout/package.json b/packages/components/Callout/package.json index 201be310b6..8aaeae7ab6 100644 --- a/packages/components/Callout/package.json +++ b/packages/components/Callout/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Checkbox/package.json b/packages/components/Checkbox/package.json index 10d0a8c0af..5cb7b55652 100644 --- a/packages/components/Checkbox/package.json +++ b/packages/components/Checkbox/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Chip/package.json b/packages/components/Chip/package.json index 92f3e300f5..4cae32ec40 100644 --- a/packages/components/Chip/package.json +++ b/packages/components/Chip/package.json @@ -12,13 +12,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/ContextualMenu/package.json b/packages/components/ContextualMenu/package.json index ee17ecf5dc..e42adf2d5a 100644 --- a/packages/components/ContextualMenu/package.json +++ b/packages/components/ContextualMenu/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Divider/package.json b/packages/components/Divider/package.json index 7e83526727..ff85f13fdb 100644 --- a/packages/components/Divider/package.json +++ b/packages/components/Divider/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/FocusTrapZone/package.json b/packages/components/FocusTrapZone/package.json index 0b03a76a09..24af75e5ba 100644 --- a/packages/components/FocusTrapZone/package.json +++ b/packages/components/FocusTrapZone/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/FocusZone/package.json b/packages/components/FocusZone/package.json index 5ce985292f..e2a375ff04 100644 --- a/packages/components/FocusZone/package.json +++ b/packages/components/FocusZone/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Icon/package.json b/packages/components/Icon/package.json index 33d2f63f30..b62f5a40f1 100644 --- a/packages/components/Icon/package.json +++ b/packages/components/Icon/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Input/package.json b/packages/components/Input/package.json index 26d8bce01a..adb5811deb 100644 --- a/packages/components/Input/package.json +++ b/packages/components/Input/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Link/package.json b/packages/components/Link/package.json index 6378072e44..e9d8e3a62d 100644 --- a/packages/components/Link/package.json +++ b/packages/components/Link/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Menu/package.json b/packages/components/Menu/package.json index bf6708501f..aa0e4a92be 100644 --- a/packages/components/Menu/package.json +++ b/packages/components/Menu/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/MenuButton/package.json b/packages/components/MenuButton/package.json index d454536e6a..ffc466dbb5 100644 --- a/packages/components/MenuButton/package.json +++ b/packages/components/MenuButton/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Notification/package.json b/packages/components/Notification/package.json index cca24daa2b..580bf2681f 100644 --- a/packages/components/Notification/package.json +++ b/packages/components/Notification/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Persona/package.json b/packages/components/Persona/package.json index 0eb267f342..8dc2aa0c65 100644 --- a/packages/components/Persona/package.json +++ b/packages/components/Persona/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/PersonaCoin/package.json b/packages/components/PersonaCoin/package.json index 9e02ebb03c..e35085c5e9 100644 --- a/packages/components/PersonaCoin/package.json +++ b/packages/components/PersonaCoin/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Pressable/package.json b/packages/components/Pressable/package.json index ebba551bbc..6bc311e5c2 100644 --- a/packages/components/Pressable/package.json +++ b/packages/components/Pressable/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/RadioGroup/package.json b/packages/components/RadioGroup/package.json index d2c07a76b6..0fecc669b2 100644 --- a/packages/components/RadioGroup/package.json +++ b/packages/components/RadioGroup/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Separator/package.json b/packages/components/Separator/package.json index bd895d1850..1916b919ed 100644 --- a/packages/components/Separator/package.json +++ b/packages/components/Separator/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Stack/package.json b/packages/components/Stack/package.json index df8d426d84..cc916aa886 100644 --- a/packages/components/Stack/package.json +++ b/packages/components/Stack/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Switch/package.json b/packages/components/Switch/package.json index 6b6828c258..6d325031f8 100644 --- a/packages/components/Switch/package.json +++ b/packages/components/Switch/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/TabList/package.json b/packages/components/TabList/package.json index 4f2da8dfdc..cbb93e42ba 100644 --- a/packages/components/TabList/package.json +++ b/packages/components/TabList/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Text/package.json b/packages/components/Text/package.json index d26ff703b9..022c030d36 100644 --- a/packages/components/Text/package.json +++ b/packages/components/Text/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/configs/eslint-config-rules/package.json b/packages/configs/eslint-config-rules/package.json index 46be6d3b09..98e445cc91 100644 --- a/packages/configs/eslint-config-rules/package.json +++ b/packages/configs/eslint-config-rules/package.json @@ -14,9 +14,8 @@ "./eslint.config.js": "./eslint.config.js" }, "scripts": { - "build": "fluentui-scripts build", - "build-cjs": "tsgo", - "build-esm": "tsgo", + "build": "tsgo", + "build-core": "tsgo", "lint-package": "fluentui-scripts lint-package" }, "dependencies": { diff --git a/packages/configs/jest-config/package.json b/packages/configs/jest-config/package.json index ee6d64f835..d4ec751eef 100644 --- a/packages/configs/jest-config/package.json +++ b/packages/configs/jest-config/package.json @@ -21,9 +21,8 @@ "./package.json": "./package.json" }, "scripts": { - "build": "fluentui-scripts build", - "build-cjs": "tsgo", - "build-esm": "tsgo", + "build": "tsgo", + "build-core": "tsgo", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", "lint-package": "fluentui-scripts lint-package" diff --git a/packages/configs/kit-config/package.json b/packages/configs/kit-config/package.json index 09a79e3b8f..cac852e084 100644 --- a/packages/configs/kit-config/package.json +++ b/packages/configs/kit-config/package.json @@ -17,8 +17,7 @@ }, "scripts": { "build": "tsgo", - "build-cjs": "tsgo", - "build-esm": "tsgo" + "build-core": "tsgo" }, "dependencies": { "@rnx-kit/align-deps": "^3.4.0", diff --git a/packages/deprecated/foundation-composable/package.json b/packages/deprecated/foundation-composable/package.json index 5e7f22e01a..12a5c06e84 100644 --- a/packages/deprecated/foundation-composable/package.json +++ b/packages/deprecated/foundation-composable/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/foundation-compose/package.json b/packages/deprecated/foundation-compose/package.json index 83bebd0066..f4e98b6e63 100644 --- a/packages/deprecated/foundation-compose/package.json +++ b/packages/deprecated/foundation-compose/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/foundation-settings/package.json b/packages/deprecated/foundation-settings/package.json index e1f11e39c6..66e579c5a8 100644 --- a/packages/deprecated/foundation-settings/package.json +++ b/packages/deprecated/foundation-settings/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/foundation-tokens/package.json b/packages/deprecated/foundation-tokens/package.json index ed4bb1e591..647c66a76f 100644 --- a/packages/deprecated/foundation-tokens/package.json +++ b/packages/deprecated/foundation-tokens/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/theme-registry/package.json b/packages/deprecated/theme-registry/package.json index 51b76eb17e..ab6716c584 100644 --- a/packages/deprecated/theme-registry/package.json +++ b/packages/deprecated/theme-registry/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/themed-settings/package.json b/packages/deprecated/themed-settings/package.json index d85f979840..ccff58faa3 100644 --- a/packages/deprecated/themed-settings/package.json +++ b/packages/deprecated/themed-settings/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/theming-ramp/package.json b/packages/deprecated/theming-ramp/package.json index 6c41060b8e..b0ac082372 100644 --- a/packages/deprecated/theming-ramp/package.json +++ b/packages/deprecated/theming-ramp/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/theming-react-native/package.json b/packages/deprecated/theming-react-native/package.json index 8f0047c41e..4a391c6182 100644 --- a/packages/deprecated/theming-react-native/package.json +++ b/packages/deprecated/theming-react-native/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/ActivityIndicator/package.json b/packages/experimental/ActivityIndicator/package.json index 8cc40165b8..c8c212b8aa 100644 --- a/packages/experimental/ActivityIndicator/package.json +++ b/packages/experimental/ActivityIndicator/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/AppearanceAdditions/package.json b/packages/experimental/AppearanceAdditions/package.json index 7f1ea278d6..4167b4ebb0 100644 --- a/packages/experimental/AppearanceAdditions/package.json +++ b/packages/experimental/AppearanceAdditions/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Avatar/package.json b/packages/experimental/Avatar/package.json index 609ec4eec3..11d96dc52a 100644 --- a/packages/experimental/Avatar/package.json +++ b/packages/experimental/Avatar/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Checkbox/package.json b/packages/experimental/Checkbox/package.json index abd80ff38c..12ad8f5db0 100644 --- a/packages/experimental/Checkbox/package.json +++ b/packages/experimental/Checkbox/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Drawer/package.json b/packages/experimental/Drawer/package.json index 19d6ce0d6c..6da5b71812 100644 --- a/packages/experimental/Drawer/package.json +++ b/packages/experimental/Drawer/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Dropdown/package.json b/packages/experimental/Dropdown/package.json index c9ddfbb4b9..b39dc0c55c 100644 --- a/packages/experimental/Dropdown/package.json +++ b/packages/experimental/Dropdown/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Expander/package.json b/packages/experimental/Expander/package.json index 5cf0172eb8..2364519174 100644 --- a/packages/experimental/Expander/package.json +++ b/packages/experimental/Expander/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/MenuButton/package.json b/packages/experimental/MenuButton/package.json index 474b802367..55ed9ab131 100644 --- a/packages/experimental/MenuButton/package.json +++ b/packages/experimental/MenuButton/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/NativeDatePicker/package.json b/packages/experimental/NativeDatePicker/package.json index 6aa635eda7..ca13ea0b1e 100644 --- a/packages/experimental/NativeDatePicker/package.json +++ b/packages/experimental/NativeDatePicker/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/NativeFontMetrics/package.json b/packages/experimental/NativeFontMetrics/package.json index a6f2799cca..009667ef2c 100644 --- a/packages/experimental/NativeFontMetrics/package.json +++ b/packages/experimental/NativeFontMetrics/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Overflow/package.json b/packages/experimental/Overflow/package.json index 4b98022e0b..176b1be674 100644 --- a/packages/experimental/Overflow/package.json +++ b/packages/experimental/Overflow/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Popover/package.json b/packages/experimental/Popover/package.json index 160f7093a1..157b32e165 100644 --- a/packages/experimental/Popover/package.json +++ b/packages/experimental/Popover/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Shadow/package.json b/packages/experimental/Shadow/package.json index cb4c9a0c41..52b024f095 100644 --- a/packages/experimental/Shadow/package.json +++ b/packages/experimental/Shadow/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Shimmer/package.json b/packages/experimental/Shimmer/package.json index 012936e45b..b0633e670c 100644 --- a/packages/experimental/Shimmer/package.json +++ b/packages/experimental/Shimmer/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Spinner/package.json b/packages/experimental/Spinner/package.json index 9e7a71a314..24214876fa 100644 --- a/packages/experimental/Spinner/package.json +++ b/packages/experimental/Spinner/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Stack/package.json b/packages/experimental/Stack/package.json index 2973cc1326..f42e756156 100644 --- a/packages/experimental/Stack/package.json +++ b/packages/experimental/Stack/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Tooltip/package.json b/packages/experimental/Tooltip/package.json index 13cf27c6a2..6dea1f3dce 100644 --- a/packages/experimental/Tooltip/package.json +++ b/packages/experimental/Tooltip/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/VibrancyView/package.json b/packages/experimental/VibrancyView/package.json index fba9600404..08a793fe1b 100644 --- a/packages/experimental/VibrancyView/package.json +++ b/packages/experimental/VibrancyView/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework-base/package.json b/packages/framework-base/package.json index 00719bd223..2f1e11adf3 100644 --- a/packages/framework-base/package.json +++ b/packages/framework-base/package.json @@ -17,18 +17,20 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" }, "./jsx-runtime": { "types": "./lib/jsx-runtime.d.ts", "import": "./lib/jsx-runtime.js", - "require": "./lib-commonjs/jsx-runtime.js" + "require": "./lib-commonjs/jsx-runtime.js", + "default": "./src/jsx-runtime.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/composition/package.json b/packages/framework/composition/package.json index a1bfe1524e..fbd51a084d 100644 --- a/packages/framework/composition/package.json +++ b/packages/framework/composition/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/framework/package.json b/packages/framework/framework/package.json index 017b374ed9..55c1372c22 100644 --- a/packages/framework/framework/package.json +++ b/packages/framework/framework/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/immutable-merge/package.json b/packages/framework/immutable-merge/package.json index 2554e1f1d0..ff3a11462a 100644 --- a/packages/framework/immutable-merge/package.json +++ b/packages/framework/immutable-merge/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/memo-cache/package.json b/packages/framework/memo-cache/package.json index 7f4c699b43..a9fe2feb8c 100644 --- a/packages/framework/memo-cache/package.json +++ b/packages/framework/memo-cache/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/merge-props/package.json b/packages/framework/merge-props/package.json index 2c8fa440f5..41201ae016 100644 --- a/packages/framework/merge-props/package.json +++ b/packages/framework/merge-props/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/theme/package.json b/packages/framework/theme/package.json index eb38dac8fc..024bea2c2d 100644 --- a/packages/framework/theme/package.json +++ b/packages/framework/theme/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/themed-stylesheet/package.json b/packages/framework/themed-stylesheet/package.json index f52daf432f..f7c04e7a6c 100644 --- a/packages/framework/themed-stylesheet/package.json +++ b/packages/framework/themed-stylesheet/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/use-slot/package.json b/packages/framework/use-slot/package.json index 49946ed185..6902809675 100644 --- a/packages/framework/use-slot/package.json +++ b/packages/framework/use-slot/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/use-slots/package.json b/packages/framework/use-slots/package.json index 25ddef7fe1..e1e214a7d3 100644 --- a/packages/framework/use-slots/package.json +++ b/packages/framework/use-slots/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/use-styling/package.json b/packages/framework/use-styling/package.json index 0e2451efb5..f62ddb42cc 100644 --- a/packages/framework/use-styling/package.json +++ b/packages/framework/use-styling/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/use-tokens/package.json b/packages/framework/use-tokens/package.json index 0f0d7043f9..8b7a7cdb6b 100644 --- a/packages/framework/use-tokens/package.json +++ b/packages/framework/use-tokens/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/libraries/core/package.json b/packages/libraries/core/package.json index b712c1973e..787e17ac07 100644 --- a/packages/libraries/core/package.json +++ b/packages/libraries/core/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/android-theme/package.json b/packages/theming/android-theme/package.json index 940a2b0d03..71b36805df 100644 --- a/packages/theming/android-theme/package.json +++ b/packages/theming/android-theme/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/apple-theme/package.json b/packages/theming/apple-theme/package.json index 989a6af6e0..c97629f78b 100644 --- a/packages/theming/apple-theme/package.json +++ b/packages/theming/apple-theme/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/default-theme/package.json b/packages/theming/default-theme/package.json index 94313dfe5d..08f947020c 100644 --- a/packages/theming/default-theme/package.json +++ b/packages/theming/default-theme/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/theme-tokens/package.json b/packages/theming/theme-tokens/package.json index 3638da2418..dccaef1ac1 100644 --- a/packages/theming/theme-tokens/package.json +++ b/packages/theming/theme-tokens/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/theme-types/package.json b/packages/theming/theme-types/package.json index 95d9fb5bae..aff9032e1f 100644 --- a/packages/theming/theme-types/package.json +++ b/packages/theming/theme-types/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/theming-utils/package.json b/packages/theming/theming-utils/package.json index 8a27bb233f..194ff04ca5 100644 --- a/packages/theming/theming-utils/package.json +++ b/packages/theming/theming-utils/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/win32-theme/package.json b/packages/theming/win32-theme/package.json index eaf3626d3a..4524c26711 100644 --- a/packages/theming/win32-theme/package.json +++ b/packages/theming/win32-theme/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/utils/adapters/package.json b/packages/utils/adapters/package.json index 90e163debd..22f52433a0 100644 --- a/packages/utils/adapters/package.json +++ b/packages/utils/adapters/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/utils/interactive-hooks/package.json b/packages/utils/interactive-hooks/package.json index 16171cd787..0d26989abe 100644 --- a/packages/utils/interactive-hooks/package.json +++ b/packages/utils/interactive-hooks/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/utils/styling/package.json b/packages/utils/styling/package.json index 125d194f23..d171f9fb3c 100644 --- a/packages/utils/styling/package.json +++ b/packages/utils/styling/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/utils/test-tools/package.json b/packages/utils/test-tools/package.json index 8549608fc8..cbb4f2ac07 100644 --- a/packages/utils/test-tools/package.json +++ b/packages/utils/test-tools/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/utils/tokens/package.json b/packages/utils/tokens/package.json index 5ac058aca0..74dd60fcdc 100644 --- a/packages/utils/tokens/package.json +++ b/packages/utils/tokens/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/scripts/package.json b/scripts/package.json index 68f4d49e1b..acca5d88d5 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -14,9 +14,8 @@ "type": "module", "main": "./src/index.js", "scripts": { - "build": "node ./src/cli.mjs build", - "build-cjs": "tsgo", - "build-esm": "tsgo", + "build": "tsgo", + "build-core": "tsgo", "bundlesize": "bundlesize --debug", "depcheck": "node ./src/cli.mjs depcheck", "lint": "node ./src/cli.mjs lint", diff --git a/scripts/src/tasks/lintPackage.ts b/scripts/src/tasks/lintPackage.ts index 2ea4c95732..c36c45c0e2 100644 --- a/scripts/src/tasks/lintPackage.ts +++ b/scripts/src/tasks/lintPackage.ts @@ -314,6 +314,10 @@ export class LintPackageCommand extends Command { } private validateExportsGroup(manifest: PackageManifest, groupName: string, isDefault: boolean, buildConfig: ResolvedBuildConfig) { + const noExportsRequired = Boolean(manifest.private || buildConfig.typescript.checkScript); + this.errorIf(!manifest.exports && !noExportsRequired, 'Missing exports field for package with no build script', () => { + this.projRoot.setManifestEntry('exports', {}); + }); const exports = manifest.exports; if (!exports) { return; @@ -358,6 +362,14 @@ export class LintPackageCommand extends Command { if (updated.default && keys[keys.length - 1] !== 'default') { errors.push(`'default' entry should be last in exports for ${groupName}`); } + if (updated.import) { + const importInSrc = updated.import.startsWith('./src'); + const defaultExport = importInSrc ? updated.import : updated.import.replace(esmDir, 'src').replace(/\.js$/, '.ts'); + if (!updated.default || updated.default !== defaultExport) { + errors.push(`'default' entry in exports does not match the expected default export`); + updated.default = defaultExport; + } + } this.errorIf(errors.length > 0, errors.join('\n'), () => { const { types, import: imp, require: req, default: def, ...rest } = updated; // restructure the group to have types, , import, require, default in order @@ -401,11 +413,12 @@ export class LintPackageCommand extends Command { } private checkBuildConfig(buildConfig: ResolvedBuildConfig) { - const { cjsScript, esmScript } = buildConfig.typescript; - const hasBuilds = Boolean(cjsScript || esmScript); + const { cjsScript, esmScript, checkScript } = buildConfig.typescript; + const hasJsBuilds = Boolean(cjsScript || esmScript); + const hasBuilds = hasJsBuilds || Boolean(checkScript); const scripts = this.projRoot.manifest.scripts || {}; - const buildScriptText = this.getFluentScriptsText('build'); + const buildScriptText = hasJsBuilds ? this.getFluentScriptsText('build') : checkScript; this.errorIf(hasBuilds && scripts.build !== buildScriptText, 'Missing or incorrect build script', () => { this.projRoot.updateRecordEntry('scripts', 'build', buildScriptText); }); @@ -418,13 +431,14 @@ export class LintPackageCommand extends Command { this.projRoot.updateRecordEntry('scripts', 'build-cjs', undefined); }); } - if (esmScript) { - this.errorIf(scripts['build-esm'] !== esmScript, 'Missing or incorrect build-esm script', () => { - this.projRoot.updateRecordEntry('scripts', 'build-esm', esmScript); + const coreScript = esmScript || checkScript; + if (esmScript || checkScript) { + this.errorIf(scripts['build-core'] !== coreScript, 'Missing or incorrect build-core script', () => { + this.projRoot.updateRecordEntry('scripts', 'build-core', coreScript); }); } else { - this.errorIf(scripts['build-esm'] !== undefined, 'Extraneous build-esm script', () => { - this.projRoot.updateRecordEntry('scripts', 'build-esm', undefined); + this.errorIf(scripts['build-core'] !== undefined, 'Extraneous build-core script', () => { + this.projRoot.updateRecordEntry('scripts', 'build-core', undefined); }); } } diff --git a/scripts/src/utils/buildConfig.ts b/scripts/src/utils/buildConfig.ts index 0532b2f726..6d32cf04e9 100644 --- a/scripts/src/utils/buildConfig.ts +++ b/scripts/src/utils/buildConfig.ts @@ -29,17 +29,19 @@ function getTypescriptBuildConfig( const scripts = projRoot.manifest.scripts || {}; let cjsScript = scripts['build-cjs'] ?? buildTsConfig.cjsScript ?? ''; let esmScript = scripts['build-esm'] ?? buildTsConfig.esmScript ?? ''; + let checkScript = scripts['build-check'] ?? buildTsConfig.checkScript ?? ''; if (analyze) { // helper to build up the correct build command function getScript(options: ts.CompilerOptions, outDir: string, isDefaultType: boolean, moduleType: 'commonjs' | 'esnext'): string { const parts: string[] = [engine]; - if (!options.noEmit) { - if (outDir !== options.outDir) { - parts.push('--outDir', outDir); - } - if (!isDefaultType) { - parts.push('--module', moduleType, '--moduleResolution', 'bundler'); - } + if (options.noEmit) { + return ''; + } + if (outDir !== options.outDir) { + parts.push('--outDir', outDir); + } + if (!isDefaultType) { + parts.push('--module', moduleType, '--moduleResolution', 'bundler'); } if (extraArgs) { parts.push(extraArgs); @@ -51,6 +53,7 @@ function getTypescriptBuildConfig( // no tsconfig.json means no TypeScript build cjsScript = ''; esmScript = ''; + checkScript = ''; } else { const pkgInfo = getPackageInfoFromPath(projRoot.root); const tsConfig = readTypeScriptConfig(pkgInfo); @@ -58,7 +61,8 @@ function getTypescriptBuildConfig( const isModule = pkgInfo.manifest.type === 'module'; cjsScript = getScript(options, cjsDir, !isModule, 'commonjs'); esmScript = getScript(options, esmDir, isModule, 'esnext'); + checkScript = options.noEmit ? engine : ''; } } - return { engine, cjsDir, esmDir, cjsScript, esmScript, extraArgs }; + return { engine, cjsDir, esmDir, cjsScript, esmScript, checkScript, extraArgs }; } diff --git a/scripts/src/utils/projectRoot.ts b/scripts/src/utils/projectRoot.ts index b87215e2de..2412cdfb9b 100644 --- a/scripts/src/utils/projectRoot.ts +++ b/scripts/src/utils/projectRoot.ts @@ -32,6 +32,8 @@ export type ResolvedBuildConfig = { cjsScript: string; /** script to run for esm build */ esmScript: string; + /** check script */ + checkScript: string; }; depcheck: { ignoreMatches?: string[];