From 318567781d302f76ec33b7b192bcd80c548d1125 Mon Sep 17 00:00:00 2001 From: Chau Tran Date: Tue, 9 May 2023 09:17:12 -0500 Subject: [PATCH 1/3] feat: upgrade nx --- .eslintrc.json | 11 +- jest.config.ts | 2 +- jest.preset.js | 2 +- libs/angular-three-soba/.eslintrc.json | 4 +- libs/angular-three-soba/.storybook/main.js | 46 +- .../.storybook/preview-body.html | 9 +- .../public/soba/draco/draco_decoder.wasm | Bin 194983 -> 209286 bytes libs/angular-three-soba/ng-package.json | 2 +- libs/angular-three-soba/package.json | 4 +- libs/angular-three-soba/project.json | 6 +- libs/plugin/.eslintrc.json | 2 +- libs/plugin/project.json | 6 +- libs/plugin/src/generators/init/compat.ts | 2 +- libs/plugin/src/generators/init/init.spec.ts | 4 +- libs/plugin/src/generators/init/init.ts | 2 +- migrations.json | 237 +- nx.json | 6 +- package.json | 88 +- pnpm-lock.yaml | 46704 ++++++---------- storybook-migration-summary.md | 62 + 20 files changed, 18019 insertions(+), 29180 deletions(-) create mode 100644 storybook-migration-summary.md diff --git a/.eslintrc.json b/.eslintrc.json index a5f3bdb..1e3271c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,12 +1,12 @@ { "root": true, "ignorePatterns": ["**/*"], - "plugins": ["@nrwl/nx"], + "plugins": ["@nx"], "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/enforce-module-boundaries": [ "error", { "enforceBuildableLibDependency": true, @@ -23,12 +23,12 @@ }, { "files": ["*.ts", "*.tsx"], - "extends": ["plugin:@nrwl/nx/typescript"], + "extends": ["plugin:@nx/typescript"], "rules": {} }, { "files": ["*.js", "*.jsx"], - "extends": ["plugin:@nrwl/nx/javascript"], + "extends": ["plugin:@nx/javascript"], "rules": {} }, { @@ -43,5 +43,6 @@ "parser": "jsonc-eslint-parser", "rules": {} } - ] + ], + "extends": [null, "plugin:storybook/recommended"] } diff --git a/jest.config.ts b/jest.config.ts index 9ec4b72..db8006b 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -1,4 +1,4 @@ -import { getJestProjects } from '@nrwl/jest'; +import { getJestProjects } from '@nx/jest'; export default { projects: getJestProjects(), diff --git a/jest.preset.js b/jest.preset.js index f107058..f830f7f 100644 --- a/jest.preset.js +++ b/jest.preset.js @@ -1,4 +1,4 @@ -const nxPreset = require('@nrwl/jest/preset').default; +const nxPreset = require('@nx/jest/preset').default; module.exports = { ...nxPreset, diff --git a/libs/angular-three-soba/.eslintrc.json b/libs/angular-three-soba/.eslintrc.json index 511b053..eab12cc 100644 --- a/libs/angular-three-soba/.eslintrc.json +++ b/libs/angular-three-soba/.eslintrc.json @@ -17,11 +17,11 @@ "@typescript-eslint/member-ordering": "off", "@typescript-eslint/no-non-null-assertion": "off" }, - "extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"] + "extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"] }, { "files": ["*.html"], - "extends": ["plugin:@nrwl/nx/angular-template"], + "extends": ["plugin:@nx/angular-template"], "rules": {} } ] diff --git a/libs/angular-three-soba/.storybook/main.js b/libs/angular-three-soba/.storybook/main.js index ec15be9..8fd332b 100644 --- a/libs/angular-three-soba/.storybook/main.js +++ b/libs/angular-three-soba/.storybook/main.js @@ -1,21 +1,29 @@ -const { resolve } = require('path'); - +const { + resolve +} = require('path'); module.exports = { - core: { builder: 'webpack5' }, - stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], - addons: ['@storybook/addon-essentials'], - webpackFinal: async (config, { configType }) => { - // apply any global webpack configs that might have been specified in .storybook/main.js - - // add your own webpack tweaks if needed - config.module.rules.push({ - test: /\.(glsl|vs|fs|vert|frag)$/, - exclude: /node_modules/, - use: ['raw-loader', 'glslify-loader'], - include: resolve(__dirname, '../'), - }); + stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], + addons: ['@storybook/addon-essentials'], + webpackFinal: async (config, { + configType + }) => { + // apply any global webpack configs that might have been specified in .storybook/main.js - return config; - }, - staticDirs: ['./public'], -}; + // add your own webpack tweaks if needed + config.module.rules.push({ + test: /\.(glsl|vs|fs|vert|frag)$/, + exclude: /node_modules/, + use: ['raw-loader', 'glslify-loader'], + include: resolve(__dirname, '../') + }); + return config; + }, + staticDirs: ['./public'], + framework: { + name: '@storybook/angular', + options: {} + }, + docs: { + autodocs: true + } +}; \ No newline at end of file diff --git a/libs/angular-three-soba/.storybook/preview-body.html b/libs/angular-three-soba/.storybook/preview-body.html index a202938..6534247 100644 --- a/libs/angular-three-soba/.storybook/preview-body.html +++ b/libs/angular-three-soba/.storybook/preview-body.html @@ -1,12 +1,7 @@