Skip to content

Commit

Permalink
chore: bump Nx to 18.3.5 (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter authored Jun 28, 2024
1 parent 82ce7a8 commit c205603
Show file tree
Hide file tree
Showing 23 changed files with 1,082 additions and 1,092 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "error"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: bump @typescript-eslint/utils",
"packageName": "@griffel/eslint-plugin",
"email": "[email protected]",
"dependentChangeType": "patch"
}
15 changes: 7 additions & 8 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"extends": "nx/presets/core.json",
"affected": {
"defaultBase": "main"
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"cache": true
},
"lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true
},
"test": {
"cache": true
},
Expand All @@ -34,11 +27,17 @@
"codeCoverage": true
}
}
},
"@nx/eslint:lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true
}
},
"pluginsConfig": {
"@nx/js": {
"analyzeSourceFiles": true
}
}
},
"useInferencePlugins": false,
"defaultBase": "main"
}
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@
"@docusaurus/preset-classic": "^3.4.0",
"@docusaurus/theme-mermaid": "^3.4.0",
"@emotion/css": "^11.9.0",
"@nx/eslint": "17.2.8",
"@nx/eslint-plugin": "17.2.8",
"@nx/jest": "17.2.8",
"@nx/js": "17.2.8",
"@nx/node": "17.2.8",
"@nx/react": "17.2.8",
"@nx/rollup": "17.2.8",
"@nx/storybook": "17.2.8",
"@nx/web": "17.2.8",
"@nx/webpack": "17.2.8",
"@nx/workspace": "17.2.8",
"@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",
"@rspack/cli": "0.7.5",
"@rspack/core": "0.7.5",
"@storybook/addon-essentials": "7.6.8",
Expand All @@ -64,7 +64,7 @@
"@types/js-beautify": "^1.13.3",
"@types/lz-string": "1.3.34",
"@types/mini-css-extract-plugin": "2.5.1",
"@types/node": "18.16.9",
"@types/node": "18.19.9",
"@types/prettier": "2.7.3",
"@types/react": "18.2.24",
"@types/react-dom": "18.2.9",
Expand All @@ -73,8 +73,8 @@
"@types/tmp": "0.2.3",
"@types/webpack-env": "1.18.4",
"@types/yargs": "^17.0.10",
"@typescript-eslint/eslint-plugin": "6.18.1",
"@typescript-eslint/parser": "6.18.1",
"@typescript-eslint/eslint-plugin": "7.14.1",
"@typescript-eslint/parser": "7.14.1",
"@uifabric/merge-styles": "7.19.1",
"babel-jest": "29.4.3",
"babel-loader": "8.1.0",
Expand All @@ -89,7 +89,7 @@
"esbuild": "0.19.11",
"esbuild-plugin-alias": "0.2.1",
"esbuild-plugin-import-glob": "0.1.1",
"eslint": "8.48.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-typescript": "2.5.0",
"eslint-plugin-import": "2.26.0",
Expand Down Expand Up @@ -117,7 +117,7 @@
"monosize-storage-upstash": "0.0.8",
"nano-staged": "0.5.0",
"next": "14.1.1",
"nx": "17.2.8",
"nx": "18.3.5",
"postcss": "^8.4.31",
"prettier": "2.8.2",
"prism-react-renderer": "2.3.1",
Expand All @@ -136,7 +136,7 @@
"ts-jest": "29.1.1",
"ts-node": "10.9.1",
"tsconfig-paths": "4.1.1",
"typescript": "5.2.2",
"typescript": "5.4.5",
"vite": "^4.5.3",
"webpack": "5.89.0",
"webpack-merge": "5.10.0",
Expand All @@ -152,7 +152,7 @@
"@emotion/hash": "^0.9.0",
"@linaria/babel-preset": "^3.0.0-beta.24",
"@linaria/shaker": "^3.0.0-beta.22",
"@typescript-eslint/utils": "^6.18.1",
"@typescript-eslint/utils": "^7.9.0",
"@wyw-in-js/processor-utils": "^0.2.3",
"@wyw-in-js/vite": "^0.2.3",
"ajv": "^8.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/microsoft/griffel"
},
"dependencies": {
"@typescript-eslint/utils": "^6.18.1",
"@typescript-eslint/utils": "^7.9.0",
"csstype": "^3.1.3",
"tslib": "^2.1.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const RULE_NAME = 'no-invalid-shorthand-argument';
/**
* Check if the node represents is a shorthand and return the name.
*/
function getShorthandName(node: TSESTree.LeftHandSideExpression): string | undefined {
function getShorthandName(node: TSESTree.LeftHandSideExpression | TSESTree.Expression): string | undefined {
if (
isMemberExpression(node) &&
isIdentifier(node.object) &&
Expand All @@ -20,6 +20,7 @@ function getShorthandName(node: TSESTree.LeftHandSideExpression): string | undef
) {
return node.property.name;
}

return undefined;
}

Expand All @@ -42,13 +43,17 @@ export const noInvalidShorthandArgumentRule = ESLintUtils.RuleCreator(getDocsUrl

create(context) {
const sourceCode = context.getSourceCode();

return {
CallExpression(node) {
const shorthandName = getShorthandName(node.callee);

if (shorthandName && node.arguments.length === 1) {
const shorthandLiteral = getShorthandValue(node.arguments[0], sourceCode);

if (shorthandLiteral) {
const autoFixArguments = shorthandToArguments(shorthandName, shorthandLiteral.value);

if (autoFixArguments != null && autoFixArguments.length > 1) {
context.report({
node,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { __css as _css } from '@griffel/react';
import { __styles as _styles } from '@griffel/react';
import { __styles as _styles, __css as _css } from '@griffel/react';
export const useStyles = /*#__PURE__*/ _css({
root: {
sj55zd: 'fe3e8s9',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { __css as _css } from '@griffel/react';
import { __styles } from '@griffel/react';
import { __styles, __css as _css } from '@griffel/react';
export const styles = _css({
root: {
sj55zd: 'fe3e8s9',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { __css as _css } from '@griffel/react';
import { __resetCSS as _resetCSS } from '@griffel/react';
import { __resetStyles, __styles } from '@griffel/react';
import { __resetStyles, __styles, __resetCSS as _resetCSS, __css as _css } from '@griffel/react';
export const useClasses = _css({
root: {
sj55zd: 'fe3e8s9',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { __css as _css } from '@griffel/react';
import { __styles } from '@griffel/react';
import { __styles, __css as _css } from '@griffel/react';
export const stylesA = _css({
root: {
sj55zd: 'fe3e8s9',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import { __resetCSS as _resetCSS } from '@griffel/react';
import { __resetStyles } from '@griffel/react';
import { __resetStyles, __resetCSS as _resetCSS } from '@griffel/react';
export const useClassName = _resetCSS('rjefjbm', 'r7z97ji');
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { __css as _css } from '@griffel/react';
import { __styles } from '@griffel/react';
import { __styles, __css as _css } from '@griffel/react';
export const useStyles = _css({
root: {
Bcmaq0h: ['ftcbn0w', 'f37sp7w'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { __css as _css } from '@griffel/react';
import { __styles } from '@griffel/react';
import { __styles, __css as _css } from '@griffel/react';
export const useStyles = _css({
root: {
Bcmaq0h: 'fp00rh9',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { __css as _css } from '@griffel/react';
import { __styles } from '@griffel/react';
import { __styles, __css as _css } from '@griffel/react';
export const useStyles = _css({
root: {
Bcmaq0h: 'fnwsaxv',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { __css as _css } from '@griffel/react';
import { __styles } from '@griffel/react';
import { __styles, __css as _css } from '@griffel/react';
export const styles = _css({
root: {
sj55zd: 'fe3e8s9',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { __css as _css } from '@griffel/react';
import { __styles } from '@griffel/react';
import { __styles, __css as _css } from '@griffel/react';
export const useStyles = _css({
root: {},
});
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { __css as _css } from '@griffel/react';
import { __resetCSS as _resetCSS } from '@griffel/react';
import { __resetStyles, __styles } from '@griffel/react';
import { __resetStyles, __styles, __resetCSS as _resetCSS, __css as _css } from '@griffel/react';
export const useClasses = _css({
root: {
sj55zd: 'fe3e8s9',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { __css as _css } from '@griffel/react';
import { __styles } from '@griffel/react';
import { __styles, __css as _css } from '@griffel/react';
export const stylesA = _css({
root: {
sj55zd: 'fe3e8s9',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { __resetCSS as _resetCSS } from '@griffel/react';
import { __resetStyles } from '@griffel/react';
import { __resetStyles, __resetCSS as _resetCSS } from '@griffel/react';
export const useClassName = _resetCSS('rjefjbm', 'r7z97ji');

import './code.griffel.css!=!../../../virtual-loader/index.js!./code.ts';
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { __css as _css } from '@griffel/react';
import { __styles } from '@griffel/react';
import { __styles, __css as _css } from '@griffel/react';
export const useClasses = _css({
root: {
sj55zd: 'fe3e8s9',
Expand Down
22 changes: 11 additions & 11 deletions tools/getRollupOptions.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
function getRollupOptions(/** @type {import('rollup').RollupOptions} */ options) {
if (Array.isArray(options.output)) {
throw new Error('"options.output" cannot be an array');
}
options.output = options.output.map(output => ({
...output,
// Stops bundling to a single file and prevents bundle size issues
preserveModules: true,
preserveModulesRoot: 'src',
// Enables sourcemaps
sourcemap: true,
}));

options.output = {
...options.output,
// Stops bundling to a single file and prevents bundle size issues
preserveModules: true,
preserveModulesRoot: 'src',
// Enables sourcemaps
sourcemap: true,
};
return options;
}

return options;
throw new Error('"options.output" should be an array');
}

module.exports = getRollupOptions;
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"@griffel/tag-processor": ["packages/tag-processor/src/index.ts"],
"@griffel/tag-processor/make-reset-styles": ["packages/tag-processor/src/MakeResetStylesProcessor.ts"],
"@griffel/tag-processor/make-styles": ["packages/tag-processor/src/MakeStylesProcessor.ts"],
"@griffel/vite-plugin": ["packages/vite-plugin/src/index.ts"],
"@griffel/update-shorthands": ["tools/update-shorthands/src/index.ts"],
"@griffel/vite-plugin": ["packages/vite-plugin/src/index.ts"],
"@griffel/webpack-extraction-plugin": ["packages/webpack-extraction-plugin/src/index.ts"],
"@griffel/webpack-loader": ["packages/webpack-loader/src/index.ts"]
},
Expand Down
Loading

0 comments on commit c205603

Please sign in to comment.