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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ coverage
dist
dist-storybook
screenshots
.cache
!tools/**/lib

*.tar.gz
Expand Down Expand Up @@ -123,9 +122,6 @@ package-deps.json

common/temp

# Gulp cache
gulp-cache

# NPM debug logs
npm-debug.log.*
shrinkwrap.yaml
Expand Down Expand Up @@ -153,13 +149,13 @@ rush.json
# Copied monaco-editor files
/packages/monaco-editor/esm

.eslintcache

# Rollup cache
.rollupcache

# tsdoc
tsdoc-metadata.json

# swc cache
# tools cache
gulp-cache
.cache
.eslintcache
.rollupcache
.swc
.nx/cache
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ packages/web-components/src/default-palette.ts
*.hbs

CODEOWNERS

/.nx/cache
84 changes: 21 additions & 63 deletions migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,83 +2,41 @@
"migrations": [
{
"cli": "nx",
"version": "16.2.0-beta.0",
"description": "Remove outputPath from run commands",
"implementation": "./src/migrations/update-16-2-0/remove-run-commands-output-path",
"version": "17.0.0-beta.1",
"description": "Updates the default cache directory to .nx/cache",
"implementation": "./src/migrations/update-17-0-0/move-cache-directory",
"package": "nx",
"name": "16.2.0-remove-output-path-from-run-commands"
"name": "17.0.0-move-cache-directory"
},
{
"cli": "nx",
"version": "16.6.0-beta.6",
"description": "Prefix outputs with {workspaceRoot}/{projectRoot} if needed",
"implementation": "./src/migrations/update-15-0-0/prefix-outputs",
"version": "17.0.0-beta.3",
"description": "Use minimal config for tasksRunnerOptions",
"implementation": "./src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options",
"package": "nx",
"name": "16.6.0-prefix-outputs"
"name": "17.0.0-use-minimal-config-for-tasks-runner-options"
},
{
"cli": "nx",
"version": "16.8.0-beta.3",
"description": "Escape $ in env variables",
"implementation": "./src/migrations/update-16-8-0/escape-dollar-sign-env-variables",
"version": "17.0.0-rc.1",
"description": "Migration for v17.0.0-rc.1",
"implementation": "./src/migrations/update-17-0-0/rm-default-collection-npm-scope",
"package": "nx",
"name": "16.8.0-escape-dollar-sign-env"
},
{
"cli": "nx",
"version": "16.3.1-beta.0",
"description": "Replace @nrwl/node:webpack and @nx/node:webpack with @nx/webpack:webpack for all project targets",
"implementation": "./src/migrations/update-16-3-1/update-webpack-executor",
"package": "@nx/node",
"name": "update-16-3-1-update-executor"
},
{
"cli": "nx",
"version": "16.4.0-beta.8",
"description": "Replace @nx/node:node with @nx/js:node for all project targets",
"implementation": "./src/migrations/update-16-4-0/replace-node-executor",
"package": "@nx/node",
"name": "update-16-4-0-replace-node-executor"
},
{
"cli": "nx",
"version": "16.6.0-beta.0",
"description": "Explicitly set 'updateBuildableProjectDepsInPackageJson' to 'true' in targets that rely on that value as the default.",
"factory": "./src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps",
"package": "@nx/js",
"name": "explicitly-set-projects-to-update-buildable-deps"
},
{
"cli": "nx",
"version": "16.8.2-beta.0",
"description": "Remove invalid options (strict, noInterop) for ES6 type modules.",
"factory": "./src/migrations/update-16-8-2/update-swcrc",
"package": "@nx/js",
"name": "16-8-2-update-swcrc"
"name": "rm-default-collection-npm-scope"
},
{
"cli": "nx",
"version": "16.9.0-beta.1",
"description": "Replace imports of Module Federation utils frm @nx/devkit to @nx/webpack",
"implementation": "./src/migrations/update-16-9-0/migrate-mf-util-usage",
"package": "@nx/devkit",
"name": "update-16-9-0-migrate-mf-usage-to-webpack"
},
{
"cli": "nx",
"version": "16.5.0-beta.2",
"description": "Add test-setup.ts to ignored files in production input",
"implementation": "./src/migrations/update-16-5-0/add-test-setup-to-inputs-ignore",
"version": "17.1.0-beta.2",
"description": "Move jest executor options to nx.json targetDefaults",
"implementation": "./src/migrations/update-17-1-0/move-options-to-target-defaults",
"package": "@nx/jest",
"name": "add-test-setup-to-inputs-ignore"
"name": "move-options-to-target-defaults"
},
{
"cli": "nx",
"version": "16.2.0-beta.0",
"description": "Replace @nx/plugin:e2e with @nx/jest",
"implementation": "./src/migrations/update-16-2-0/replace-e2e-executor",
"package": "@nx/plugin",
"name": "update-16-2-0-replace-e2e-executor"
"version": "17.0.2",
"description": "Remove deprecated build options",
"implementation": "./src/migrations/update-17-0-0/remove-deprecated-build-options",
"package": "@nx/js",
"name": "update-17-0-0-remove-deprecated-build-options"
}
]
}
43 changes: 25 additions & 18 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"npmScope": "fluentui",
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "test", "lint", "package", "prepare"],
"parallel": 1,
"useDaemonProcess": false
}
}
},
"workspaceLayout": {
"libsDir": "packages",
"appsDir": "apps"
Expand All @@ -26,16 +15,32 @@
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"package": {
"dependsOn": ["^package"]
"inputs": ["production", "^production"],
"cache": true
},
"prepare": {
"dependsOn": ["^prepare"]
"dependsOn": ["^prepare"],
"cache": true
},
"test": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"cache": true
},
"lint": {
"cache": true
},
"@nx/jest:jest": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"cache": true,
"options": {
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
}
},
"namedInputs": {
Expand All @@ -48,5 +53,7 @@
"!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/src/test-setup.[jt]s"
]
}
},
"useDaemonProcess": false,
"parallel": 1
}
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@
"@microsoft/load-themed-styles": "1.10.26",
"@microsoft/loader-load-themed-styles": "2.0.17",
"@microsoft/tsdoc": "0.14.1",
"@nx/devkit": "16.10.0",
"@nx/jest": "16.10.0",
"@nx/js": "16.10.0",
"@nx/node": "16.10.0",
"@nx/plugin": "16.10.0",
"@nx/workspace": "16.10.0",
"@nx/devkit": "17.2.8",
"@nx/jest": "17.2.8",
"@nx/js": "17.2.8",
"@nx/node": "17.2.8",
"@nx/plugin": "17.2.8",
"@nx/workspace": "17.2.8",
"@octokit/rest": "18.12.0",
"@phenomnomnominal/tsquery": "6.1.2",
"@storybook/addon-a11y": "6.5.15",
Expand Down Expand Up @@ -214,7 +214,7 @@
"enquirer": "2.3.6",
"enzyme": "3.10.0",
"enzyme-to-json": "3.6.2",
"esbuild": "0.14.51",
"esbuild": "0.19.11",
"esbuild-loader": "3.2.0",
"eslint": "7.25.0",
"eslint-config-airbnb": "18.2.1",
Expand Down Expand Up @@ -260,7 +260,7 @@
"jsonc-eslint-parser": "2.3.0",
"just-scripts": "1.8.2",
"lage": "1.8.8",
"lerna": "7.1.3",
"lerna": "8.0.1",
"license-webpack-plugin": "2.3.10",
"lint-staged": "10.2.10",
"loader-utils": "2.0.4",
Expand All @@ -272,7 +272,7 @@
"monosize-storage-azure": "0.0.3",
"node-plop": "0.25.0",
"node-polyfill-webpack-plugin": "1.0.2",
"nx": "16.10.0",
"nx": "17.2.8",
"p-queue": "6.6.2",
"parallel-webpack": "2.6.0",
"parse-diff": "0.7.1",
Expand Down
8 changes: 5 additions & 3 deletions scripts/bundle-size-auditor/bin/bundle-size-auditor.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env node

const path = require('path');
const { registerTsProject } = require('nx/src/utils/register');
// @ts-check

registerTsProject(path.join(__dirname, '..'), 'tsconfig.lib.json');
const { joinPathFragments } = require('@nx/devkit');
const { registerTsProject } = require('@nx/js/src/internal');

registerTsProject(joinPathFragments(__dirname, '..', 'tsconfig.lib.json'));

const { cli } = require('../src/cli');
cli().catch(err => {
Expand Down
8 changes: 5 additions & 3 deletions scripts/bundle-size-auditor/src/index.dev.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const path = require('path');
const { registerTsProject } = require('nx/src/utils/register');
// @ts-check

registerTsProject(path.join(__dirname, '..'), 'tsconfig.lib.json');
const { joinPathFragments } = require('@nx/devkit');
const { registerTsProject } = require('@nx/js/src/internal');

registerTsProject(joinPathFragments(__dirname, '..', 'tsconfig.lib.json'));

/**
* @typedef {import('./index').Config} Config
Expand Down
4 changes: 2 additions & 2 deletions scripts/fluentui-publish/cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { joinPathFragments } = require('@nx/devkit');
const { registerTsProject } = require('nx/src/utils/register');
const { registerTsProject } = require('@nx/js/src/internal');

registerTsProject(joinPathFragments(__dirname, '.'), 'tsconfig.lib.json');
registerTsProject(joinPathFragments(__dirname, '.', 'tsconfig.lib.json'));

require('./index');
2 changes: 1 addition & 1 deletion scripts/storybook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function managerEntries(entry = []) {

```diff
+ const { registerTsPaths } = require('@fluentui/scripts-storybook');
+ const { registerTsProject } = require('nx/src/utils/register');
+ const { registerTsProject } = require('@nx/js/src/internal');

+ registerTsProject('/Users/martinhochel/Projects/msft/fluentui/tsconfig.base.json') (A)

Expand Down
4 changes: 2 additions & 2 deletions scripts/storybook/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ function loadWorkspaceAddon(addonName, options) {

const inMemoryTsTranspilationTemplate = stripIndents`
function registerInMemoryTsTranspilation(){
const { registerTsProject } = require('nx/src/utils/register');
const { registerTsProject } = require('@nx/js/src/internal');
const { joinPathFragments } = require('@nx/devkit');
registerTsProject(joinPathFragments(__dirname, '..'), 'tsconfig.lib.json');
registerTsProject(joinPathFragments(__dirname, '..', 'tsconfig.lib.json'));
}

registerInMemoryTsTranspilation();
Expand Down
4 changes: 2 additions & 2 deletions scripts/storybook/src/utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ describe(`utils`, () => {
"// @ts-nocheck

function registerInMemoryTsTranspilation(){
const { registerTsProject } = require('nx/src/utils/register');
const { registerTsProject } = require('@nx/js/src/internal');
const { joinPathFragments } = require('@nx/devkit');
registerTsProject(joinPathFragments(__dirname, '..'), 'tsconfig.lib.json');
registerTsProject(joinPathFragments(__dirname, '..', 'tsconfig.lib.json'));
}

registerInMemoryTsTranspilation();
Expand Down
8 changes: 5 additions & 3 deletions scripts/test-ssr/bin/test-ssr.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/usr/bin/env node

// @ts-check

const { joinPathFragments } = require('@nx/devkit');
const { registerTsProject } = require('nx/src/utils/register');
const { registerTsProject } = require('@nx/js/src/internal');

registerTsProject(joinPathFragments(__dirname, '..'), 'tsconfig.lib.json');
registerTsProject(joinPathFragments(__dirname, '..', 'tsconfig.lib.json'));

require('../src/cli.ts');
require('../src/cli');
6 changes: 5 additions & 1 deletion scripts/test-ssr/src/commands/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ function interceptConsoleLogs() {
}

export async function main(params: MainParams) {
const distDirectory = path.resolve(process.cwd(), 'node_modules', '.cache', 'ssr-tests');
/**
* dist directory cannot be under node_modules in order to make TS path aliases work.
* @see https://github.com/evanw/esbuild/blob/main/CHANGELOG.md#0180
*/
const distDirectory = path.resolve(process.cwd(), 'dist', 'ssr-tests');

if (!fs.existsSync(distDirectory)) {
await fs.promises.mkdir(distDirectory, { recursive: true });
Expand Down
12 changes: 2 additions & 10 deletions tools/workspace-plugin/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
"glob": "executors.json",
"output": "."
}
],
"updateBuildableProjectDepsInPackageJson": true
]
}
},
"lint": {
Expand All @@ -54,14 +53,7 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "tools/workspace-plugin/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
"jestConfig": "tools/workspace-plugin/jest.config.ts"
}
},
"type-check": {
Expand Down
Loading