зеркало из https://github.com/microsoft/griffel.git
chore: bump Nx to 19.3.2 (#574)
This commit is contained in:
Родитель
c20560331a
Коммит
daf28f1c95
|
@ -20,7 +20,12 @@
|
|||
"prefer": "type-imports"
|
||||
}
|
||||
],
|
||||
"import/no-extraneous-dependencies": ["error", { "devDependencies": false }],
|
||||
"import/no-extraneous-dependencies": [
|
||||
"error",
|
||||
{
|
||||
"devDependencies": false
|
||||
}
|
||||
],
|
||||
"jest/no-focused-tests": "error"
|
||||
},
|
||||
"overrides": [
|
||||
|
@ -49,13 +54,18 @@
|
|||
"rules": {
|
||||
"@typescript-eslint/no-inferrable-types": "off",
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"@typescript-eslint/no-unused-vars": "error"
|
||||
"@typescript-eslint/no-unused-vars": "error",
|
||||
"@typescript-eslint/no-extra-semi": "error",
|
||||
"no-extra-semi": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"extends": ["plugin:@nx/javascript"],
|
||||
"rules": {}
|
||||
"rules": {
|
||||
"@typescript-eslint/no-extra-semi": "error",
|
||||
"no-extra-semi": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
|
@ -64,7 +74,8 @@
|
|||
"**/*.stories.tsx",
|
||||
"**/*.test.ts",
|
||||
"**/*.test.tsx",
|
||||
"**/jest.setup.js"
|
||||
"**/jest.setup.js",
|
||||
"**/jest.setup.ts"
|
||||
],
|
||||
"rules": {
|
||||
"import/no-extraneous-dependencies": "off"
|
||||
|
|
|
@ -44,4 +44,5 @@ testem.log
|
|||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
.nx/cache
|
||||
.nx/cache
|
||||
.nx/workspace-data
|
|
@ -3,4 +3,5 @@
|
|||
/dist
|
||||
/coverage
|
||||
|
||||
/.nx/cache
|
||||
/.nx/cache
|
||||
/.nx/workspace-data
|
|
@ -1,50 +0,0 @@
|
|||
const esbuild = require('esbuild');
|
||||
const ImportGlobPlugin = require('esbuild-plugin-import-glob').default;
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const yargs = require('yargs');
|
||||
|
||||
const argv = yargs(process.argv)
|
||||
.options({
|
||||
watch: { type: 'boolean', default: false },
|
||||
})
|
||||
.parseSync();
|
||||
|
||||
const outDir = path.resolve(__dirname, '../../dist/apps/benchmark/');
|
||||
|
||||
/** @type {esbuild.Plugin} */
|
||||
const WatchRebuildPlugin = {
|
||||
name: 'watch-rebuild',
|
||||
setup(build) {
|
||||
build.onEnd(result => {
|
||||
if (result.errors.length === 0) {
|
||||
console.log('Rebuild was successful, watching for changes...');
|
||||
}
|
||||
|
||||
console.log(`Reuild ended with ${result.errors.length} errors`);
|
||||
console.log(
|
||||
[result.errors, result.warnings]
|
||||
.flat()
|
||||
.map(e => e.text)
|
||||
.join('\n'),
|
||||
);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
esbuild
|
||||
.build({
|
||||
entryPoints: ['./src/index.tsx'],
|
||||
outfile: path.join(outDir, 'bundle.js'),
|
||||
minify: true,
|
||||
bundle: true,
|
||||
|
||||
plugins: /** @type {esbuild.Plugin[]} */ ([argv.watch && WatchRebuildPlugin, ImportGlobPlugin()].filter(Boolean)),
|
||||
})
|
||||
.then(() => {
|
||||
if (argv.watch) {
|
||||
console.log('watching');
|
||||
}
|
||||
fs.copyFileSync(path.resolve(__dirname, './index.html'), path.join(outDir, 'index.html'));
|
||||
})
|
||||
.catch(() => process.exit(1));
|
|
@ -0,0 +1,66 @@
|
|||
import esbuild from 'esbuild';
|
||||
import ImportGlobPlugin from 'esbuild-plugin-import-glob';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import yargs from 'yargs';
|
||||
|
||||
const CURRENT_DIR = path.dirname(fileURLToPath(import.meta.url));
|
||||
const OUT_DIR = path.resolve(CURRENT_DIR, '../../dist/apps/benchmark/');
|
||||
|
||||
const argv = yargs(process.argv)
|
||||
.options({
|
||||
watch: { type: 'boolean', default: false },
|
||||
})
|
||||
.parseSync();
|
||||
|
||||
/** @type {esbuild.Plugin} */
|
||||
const WatchRebuildPlugin = {
|
||||
name: 'watch-rebuild',
|
||||
setup(build) {
|
||||
build.onEnd(result => {
|
||||
if (result.errors.length === 0) {
|
||||
console.log('Rebuild was successful, watching for changes...');
|
||||
}
|
||||
|
||||
console.log(`Rebuild ended with ${result.errors.length} errors`);
|
||||
console.log(
|
||||
[result.errors, result.warnings]
|
||||
.flat()
|
||||
.map(e => e.text)
|
||||
.join('\n'),
|
||||
);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
/** @type {esbuild.BuildOptions} */
|
||||
const esbuildConfig = {
|
||||
entryPoints: ['./src/index.tsx'],
|
||||
outfile: path.join(OUT_DIR, 'bundle.js'),
|
||||
minify: true,
|
||||
bundle: true,
|
||||
|
||||
plugins: /** @type {esbuild.Plugin[]} */ (
|
||||
[argv.watch && WatchRebuildPlugin, ImportGlobPlugin.default()].filter(Boolean)
|
||||
),
|
||||
};
|
||||
|
||||
async function copyIndexHtml() {
|
||||
await fs.promises.copyFile(path.resolve(CURRENT_DIR, './index.html'), path.join(OUT_DIR, 'index.html'));
|
||||
}
|
||||
|
||||
if (argv.watch) {
|
||||
const context = await esbuild.context(esbuildConfig);
|
||||
|
||||
await copyIndexHtml();
|
||||
await context.watch();
|
||||
} else {
|
||||
try {
|
||||
await esbuild.build(esbuildConfig);
|
||||
await copyIndexHtml();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "apps/benchmark",
|
||||
"commands": [{ "command": "node ./build.js" }]
|
||||
"commands": [{ "command": "node ./build.mjs" }]
|
||||
},
|
||||
"outputs": ["{workspaceRoot}/dist/apps/benchmark"]
|
||||
},
|
||||
|
@ -16,7 +16,7 @@
|
|||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "apps/benchmark",
|
||||
"commands": [{ "command": "node ./build.js --watch" }],
|
||||
"commands": [{ "command": "node ./build.mjs --watch" }],
|
||||
"outputPath": ["dist/apps/benchmark"]
|
||||
}
|
||||
},
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "chore: bump Nx to 19.3.2",
|
||||
"packageName": "@griffel/jest-serializer",
|
||||
"email": "olfedias@microsoft.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
45
package.json
45
package.json
|
@ -36,25 +36,25 @@
|
|||
"@docusaurus/preset-classic": "^3.4.0",
|
||||
"@docusaurus/theme-mermaid": "^3.4.0",
|
||||
"@emotion/css": "^11.9.0",
|
||||
"@nx/eslint": "18.3.5",
|
||||
"@nx/eslint-plugin": "18.3.5",
|
||||
"@nx/jest": "18.3.5",
|
||||
"@nx/js": "18.3.5",
|
||||
"@nx/node": "18.3.5",
|
||||
"@nx/react": "18.3.5",
|
||||
"@nx/rollup": "18.3.5",
|
||||
"@nx/storybook": "18.3.5",
|
||||
"@nx/web": "18.3.5",
|
||||
"@nx/webpack": "18.3.5",
|
||||
"@nx/workspace": "18.3.5",
|
||||
"@nx/eslint": "19.3.2",
|
||||
"@nx/eslint-plugin": "19.3.2",
|
||||
"@nx/jest": "19.3.2",
|
||||
"@nx/js": "19.3.2",
|
||||
"@nx/node": "19.3.2",
|
||||
"@nx/react": "19.3.2",
|
||||
"@nx/rollup": "19.3.2",
|
||||
"@nx/storybook": "19.3.2",
|
||||
"@nx/web": "19.3.2",
|
||||
"@nx/webpack": "19.3.2",
|
||||
"@nx/workspace": "19.3.2",
|
||||
"@rspack/cli": "0.7.5",
|
||||
"@rspack/core": "0.7.5",
|
||||
"@storybook/addon-essentials": "7.6.8",
|
||||
"@storybook/core-server": "7.6.8",
|
||||
"@storybook/react-webpack5": "7.6.8",
|
||||
"@swc/core": "1.3.102",
|
||||
"@testing-library/jest-dom": "5.16.1",
|
||||
"@testing-library/react": "13.4.0",
|
||||
"@swc/core": "1.5.29",
|
||||
"@testing-library/jest-dom": "6.4.6",
|
||||
"@testing-library/react": "15.0.6",
|
||||
"@types/babel__helper-module-imports": "7.18.0",
|
||||
"@types/babel__helper-plugin-utils": "7.10.0",
|
||||
"@types/chrome": "0.0.180",
|
||||
|
@ -66,8 +66,8 @@
|
|||
"@types/mini-css-extract-plugin": "2.5.1",
|
||||
"@types/node": "18.19.9",
|
||||
"@types/prettier": "2.7.3",
|
||||
"@types/react": "18.2.24",
|
||||
"@types/react-dom": "18.2.9",
|
||||
"@types/react": "18.3.1",
|
||||
"@types/react-dom": "18.3.0",
|
||||
"@types/styled-components": "5.1.26",
|
||||
"@types/stylis": "4.2.0",
|
||||
"@types/tmp": "0.2.3",
|
||||
|
@ -77,7 +77,6 @@
|
|||
"@typescript-eslint/parser": "7.14.1",
|
||||
"@uifabric/merge-styles": "7.19.1",
|
||||
"babel-jest": "29.4.3",
|
||||
"babel-loader": "8.1.0",
|
||||
"babel-plugin-annotate-pure-calls": "0.4.0",
|
||||
"babel-plugin-tester": "11.0.0",
|
||||
"beachball": "2.31.5",
|
||||
|
@ -86,7 +85,7 @@
|
|||
"css-loader": "^6.4.0",
|
||||
"d3-scale-chromatic": "^3.0.0",
|
||||
"doctoc": "2.2.1",
|
||||
"esbuild": "0.19.11",
|
||||
"esbuild": "0.21.5",
|
||||
"esbuild-plugin-alias": "0.2.1",
|
||||
"esbuild-plugin-import-glob": "0.1.1",
|
||||
"eslint": "8.57.0",
|
||||
|
@ -117,13 +116,13 @@
|
|||
"monosize-storage-upstash": "0.0.8",
|
||||
"nano-staged": "0.5.0",
|
||||
"next": "14.1.1",
|
||||
"nx": "18.3.5",
|
||||
"postcss": "^8.4.31",
|
||||
"nx": "19.3.2",
|
||||
"postcss": "8.4.38",
|
||||
"prettier": "2.8.2",
|
||||
"prism-react-renderer": "2.3.1",
|
||||
"raw-loader": "4.0.2",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"react-fela": "12.2.0",
|
||||
"react-refresh": "^0.10.0",
|
||||
"react-shadow": "^20.2.0",
|
||||
|
@ -137,7 +136,7 @@
|
|||
"ts-node": "10.9.1",
|
||||
"tsconfig-paths": "4.1.1",
|
||||
"typescript": "5.4.5",
|
||||
"vite": "^4.5.3",
|
||||
"vite": "^5.3.2",
|
||||
"webpack": "5.89.0",
|
||||
"webpack-merge": "5.10.0",
|
||||
"yargs": "^17.5.1"
|
||||
|
|
|
@ -14,5 +14,5 @@ export default {
|
|||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
coverageDirectory: '../../coverage/packages/jest-serializer',
|
||||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
||||
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
||||
};
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"declaration": true,
|
||||
"types": ["node", "environment"]
|
||||
},
|
||||
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"],
|
||||
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts", "jest.setup.ts"],
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"jsx": "react",
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"module": "commonjs",
|
||||
"types": ["jest", "node", "environment", "@testing-library/jest-dom"]
|
||||
"types": ["jest", "node", "environment"]
|
||||
},
|
||||
"include": [
|
||||
"**/*.test.ts",
|
||||
|
@ -16,6 +16,7 @@
|
|||
"**/*.test.jsx",
|
||||
"**/*.spec.jsx",
|
||||
"**/*.d.ts",
|
||||
"jest.config.ts"
|
||||
"jest.config.ts",
|
||||
"jest.setup.ts"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ function getRollupOptions(/** @type {import('rollup').RollupOptions} */ options)
|
|||
preserveModulesRoot: 'src',
|
||||
// Enables sourcemaps
|
||||
sourcemap: true,
|
||||
// Add interop for CJS
|
||||
...(output.format === 'cjs' && { interop: 'compat' }),
|
||||
}));
|
||||
|
||||
return options;
|
||||
|
|
1631
yarn.lock
1631
yarn.lock
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче