Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): Upgrade NX to 17.3.0 #36

Draft
wants to merge 66 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
bc996b7
chore(deps): Upgrade NX to 15.8.9
krzotki Nov 14, 2024
c5d7aee
chore(deps): Upgrade NX to 16.0.0
krzotki Nov 14, 2024
61a9919
chore(deps): Upgrade NX to 16.0.0
krzotki Nov 14, 2024
6d925af
chore(deps): Upgrade NX to 16.0.0, fix tests
krzotki Nov 15, 2024
955146b
chore(deps): Upgrade NX to 16.1.0
krzotki Nov 15, 2024
7a78bc2
chore(deps): Upgrade NX to 16.2.0
krzotki Nov 15, 2024
a67faf5
chore(deps): Upgrade NX to 16.4.0
krzotki Nov 15, 2024
52b1b52
chore(deps): Upgrade NX to 16.5.0
krzotki Nov 15, 2024
7dab383
chore(deps): Upgrade NX to 16.6.0
krzotki Nov 15, 2024
a49370d
chore(deps): Upgrade NX to 16.7.0
krzotki Nov 15, 2024
546d402
chore(deps): Upgrade NX to 16.8.0
krzotki Nov 15, 2024
38b9d53
chore(deps): Upgrade NX to 16.10.0
krzotki Nov 15, 2024
5fb3b74
chore(deps): Upgrade NX to 17.3.0
krzotki Nov 15, 2024
e641d12
fix(lint): Fix some lint errors
krzotki Nov 17, 2024
b3259eb
fix(lint): Fix some lint errors
krzotki Nov 17, 2024
9529b5a
fix(tests): Fix some tests
krzotki Nov 17, 2024
19008a4
fix(tests): Revert mock file
krzotki Nov 17, 2024
59fdfab
fix(build): Fix build
krzotki Nov 17, 2024
c1c3ff9
fix(lint): Disable @nx/enforce-module-boundaries for js files
krzotki Nov 17, 2024
5c24500
fix(lint): Disable @nx/enforce-module-boundaries for js files
krzotki Nov 17, 2024
5055aa8
fix(lint): Readd npmScope to import paths
krzotki Nov 17, 2024
b889fa0
fix(generators): Downgrade nx storybook
krzotki Nov 18, 2024
888ea01
chore(deps): Upgrade next to 14
krzotki Nov 18, 2024
ebd38bb
fix(generators): Remove app directory from Next app
krzotki Nov 18, 2024
62fcee2
fix(lint): change module
krzotki Nov 18, 2024
e990858
fix(generators): Update RouterContext import
krzotki Nov 18, 2024
0a8ad8c
fix(storybook): Add fallback
krzotki Nov 18, 2024
ecedee5
fix(lint): Change type to interface
krzotki Nov 18, 2024
1b4f06f
fix(generators): Replace types with interfaces
krzotki Nov 18, 2024
5ce7a75
fix(init): Get packages versions from package.json
krzotki Nov 18, 2024
ae229ae
fix(init): Sync versions
krzotki Nov 18, 2024
c6d2d80
chore(deps): lock file
krzotki Nov 18, 2024
32dc7e5
chore(repo): change version
krzotki Nov 18, 2024
6d8fec4
fix(init): Fix missing packages
krzotki Nov 18, 2024
de3f378
fix(init): Fix missing packages
krzotki Nov 18, 2024
8460097
chore(deps): lock file
krzotki Nov 18, 2024
f6af72c
fix(init): Fix create script
krzotki Nov 18, 2024
b2f456c
fix(init): Fix create script
krzotki Nov 18, 2024
78ef61f
fix(init): Fix create script - nxCloud value
krzotki Nov 18, 2024
e554000
fix(init): Fix missing packages
krzotki Nov 18, 2024
19d15af
fix(init): Fix workspace layout
krzotki Nov 18, 2024
d7b995e
chore(release): Bump version
krzotki Nov 18, 2024
9872442
fix(init): Fix workspace layout
krzotki Nov 18, 2024
decd897
chore(release): Bump version
krzotki Nov 18, 2024
409fd8e
fix(init): Gather all deps in one place
krzotki Nov 18, 2024
0b34e0f
chore(deps): lock file
krzotki Nov 18, 2024
4905a98
fix(init): Gather all deps in one place
krzotki Nov 18, 2024
7045890
fix(init): Gather all deps in one place
krzotki Nov 18, 2024
ffde4c9
fix(init): Gather all deps in one place
krzotki Nov 19, 2024
3138ca9
fix(init): Add remaining missing deps
krzotki Nov 19, 2024
f6c9728
fix(init): Add missing deps for cypress tests
krzotki Nov 19, 2024
9db9f88
fix(init): Generate missing babel.config
krzotki Nov 19, 2024
652de8f
fix(init): Bump version
krzotki Nov 19, 2024
7f64c19
chore(test): Readd tests
krzotki Nov 19, 2024
72feba6
chore(repo): Remove migrations.json
krzotki Nov 19, 2024
d91e6c2
chore(deps): Remove nrwl/tao
krzotki Nov 19, 2024
9c8e4af
fix(eslint): Fix eslint in docs and tests
krzotki Nov 20, 2024
bf6fcb3
fix(eslint): Change nrwl to nx in eslint config
krzotki Nov 20, 2024
3c8cc20
chore(deps): Upgrade NX to 17.3.2
krzotki Nov 22, 2024
16fb671
chore(deps): Update lock file
krzotki Nov 22, 2024
585eab9
chore(deps): Use npm instead of pnpm in init
krzotki Nov 22, 2024
5af9a7e
chore(deps): Use legacy-peer-deps
krzotki Nov 22, 2024
6f108de
chore(deps): Bump version
krzotki Nov 22, 2024
d61b1ea
chore(deps): Add comment in init, dont use npm nx
krzotki Nov 22, 2024
27f5aa0
chore(deps): Bump version
krzotki Nov 22, 2024
92d0d88
chore(deps): Bump version
krzotki Nov 22, 2024
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
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules/
node_modules/
**/mocks/**
**.spec.*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, it could be better to use overrides section of eslintrc to disable specific cases for those
In general, I believe we want to lint our tests and potentially even mocks

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests - yes, I will reenable this. Mocks - tricky, as it would require rewriting PR checker, but maybe there won't be that many changes

16 changes: 10 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx", "graphql"],
"plugins": ["@nx", "graphql"],
"rules": {
"graphql/template-strings": "off",
"graphql/named-operations": "off"
Expand All @@ -10,7 +10,7 @@
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -27,13 +27,17 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {}
"extends": ["plugin:@nx/typescript"],
"rules": {
"@typescript-eslint/no-explicit-any": "warn"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
"extends": ["plugin:@nx/javascript"],
"rules": {
"@nx/enforce-module-boundaries": ["off"]
}
},
{
"files": "*.json",
Expand Down
7 changes: 7 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ module.exports = {
...config.resolve,
extensions: ['.mjs', '.ts', '.tsx', '.js', '.jsx'],
plugins: [...(config.resolve.plugins ?? []), tsPaths],
fallback: {
...(config.resolve || {}).fallback,
fs: false,
stream: false,
os: false,
zlib: false
},
},
module: {
...config.module,
Expand Down
2 changes: 1 addition & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addParameters } from '@storybook/react';
import { RouterContext } from 'next/dist/shared/lib/router-context';
import { RouterContext } from "next/dist/shared/lib/router-context.shared-runtime";
import { rest } from 'msw';
import { mswDecorator } from 'msw-storybook-addon';

Expand Down
19 changes: 3 additions & 16 deletions docs/docs-site/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
{
"extends": [
"plugin:@nrwl/nx/react-typescript",
"../../.eslintrc.json",
"next",
"next/core-web-vitals"
],
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@next/next/no-html-link-for-pages": [
krzotki marked this conversation as resolved.
Show resolved Hide resolved
"error",
"packages/docs-site/pages"
]
}
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
Expand All @@ -24,8 +14,5 @@
"files": ["*.js", "*.jsx"],
"rules": {}
}
],
"env": {
"jest": true
}
]
}
4 changes: 2 additions & 2 deletions docs/docs-site/components/enlargable-content.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useState, useEffect } from 'react';
import { useTheme } from 'next-themes';
// import { useTheme } from 'next-themes';

export default function EnlargableContent({ children }) {
const [isOpen, setIsOpen] = useState(false);

const openModal = () => setIsOpen(true);
const closeModal = () => setIsOpen(false);

const { theme } = useTheme();
// const { theme } = useTheme();

useEffect(() => {
if (isOpen) {
Expand Down
18 changes: 8 additions & 10 deletions docs/docs-site/components/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,21 @@ function useDebounceValue<T>(value: T, delay: number): T {
return debouncedValue;
}

type ItemProps = {
title: string;
route: string;
content: string;
type: 'title' | 'content';
searchValue: string | undefined;
handleClick: () => void;
};

const Item = ({
title,
route,
content,
searchValue,
type,
handleClick,
}: ItemProps) => {
}: {
title: string;
route: string;
content: string;
type: 'title' | 'content';
searchValue: string | undefined;
handleClick: () => void;
}) => {
const index =
type === 'title'
? title.toLowerCase().indexOf(searchValue.toLowerCase())
Expand Down
4 changes: 2 additions & 2 deletions docs/docs-site/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ export default {
displayName: 'docs-site',
preset: '../../jest.preset.js',
transform: {
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nrwl/next/babel'] }],
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest',
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nx/next/babel'] }],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/packages/docs-site',
Expand Down
18 changes: 8 additions & 10 deletions docs/docs-site/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "docs-docs-site",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "docs/docs-site",
"projectType": "application",
Expand All @@ -11,12 +12,12 @@
"next build",
"nx run docs-docs-site:build-styles"
],
"cwd": "docs/docs-site",
"outputPath": "dist/docs/docs-site"
"cwd": "docs/docs-site"
},
"configurations": {
"production": {}
}
},
"outputs": ["{workspaceRoot}/dist/docs/docs-site"]
},
"serve": {
"executor": "nx:run-commands",
Expand Down Expand Up @@ -56,22 +57,19 @@
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/docs/docs-site"],
"options": {
"jestConfig": "docs/docs-site/jest.config.ts",
"passWithNoTests": true,
"updateBuildableProjectDepsInPackageJson": true
"jestConfig": "docs/docs-site/jest.config.ts"
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["docs/docs-site/**/*.{ts,tsx,js,jsx}"]
}
}
},
"tags": [],
"name": "docs-docs-site"
"tags": []
}
1 change: 0 additions & 1 deletion docs/docs-site/theme.config.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { DocsThemeConfig } from 'nextra-theme-docs';
import { Github, Star, GitFork, Users, Dna } from 'lucide-react';
import Search from './components/search';
import Image from 'next/image';
import Link from 'next/link';
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { getJestProjects } = require('@nrwl/jest');
const { getJestProjects } = require('@nx/jest');

export default {
projects: getJestProjects(),
Expand Down
2 changes: 1 addition & 1 deletion jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const nxPreset = require('@nrwl/jest/preset').default;
const nxPreset = require('@nx/jest/preset').default;

module.exports = {
...nxPreset,
Expand Down
2 changes: 1 addition & 1 deletion libs/assets/.babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"presets": [
[
"@nrwl/react/babel",
"@nx/react/babel",
{
"runtime": "automatic",
"useBuiltIns": "usage"
Expand Down
2 changes: 1 addition & 1 deletion libs/assets/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
"extends": ["plugin:@nx/react", "../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
Expand Down
15 changes: 6 additions & 9 deletions libs/assets/project.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"name": "assets",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/assets/src",
"projectType": "library",
"tags": ["type:utility"],
"targets": {
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/assets/**/*.{ts,tsx,js,jsx}"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/libs/assets"],
"options": {
"jestConfig": "libs/assets/jest.config.ts",
"passWithNoTests": true
"jestConfig": "libs/assets/jest.config.ts"
}
},
"copy-assets-to-app": {
Expand All @@ -27,9 +27,7 @@
"{options.projectRoot}/public/nx-static"
],
"options": {
"commands": [
"pnpm gene-tools copy-assets-to-app {args.projectName}"
]
"commands": ["pnpm gene-tools copy-assets-to-app {args.projectName}"]
}
},
"copy-assets-to-storybook": {
Expand All @@ -43,6 +41,5 @@
"command": "pnpm gene-tools prepare-storybook-root-assets --includeBrainlyStyleGuide && pnpm gene-tools copy-assets-to-storybook"
}
}
},
"name": "assets"
}
}
4 changes: 2 additions & 2 deletions libs/assets/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"types": ["node"]
},
"files": [
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
"../../node_modules/@nrwl/react/typings/image.d.ts"
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
"../../node_modules/@nx/react/typings/image.d.ts"
],
"exclude": [
"**/*.spec.ts",
Expand Down
2 changes: 1 addition & 1 deletion libs/e2e-testing-providers/.babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"presets": [
[
"@nrwl/react/babel",
"@nx/react/babel",
{
"runtime": "automatic",
"useBuiltIns": "usage"
Expand Down
2 changes: 1 addition & 1 deletion libs/e2e-testing-providers/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
"extends": ["plugin:@nx/react", "../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
Expand Down
7 changes: 3 additions & 4 deletions libs/e2e-testing-providers/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
"tags": [],
"targets": {
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/e2e-testing-providers/**/*.{ts,tsx,js,jsx}"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/e2e-testing-providers/jest.config.ts",
"passWithNoTests": true
"jestConfig": "libs/e2e-testing-providers/jest.config.ts"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { emit, EventBusContextProvider, register } from '@brainly-gene/core';

type OverwritableContainerKeys = 'adsContainer';

export type StorybookProvidersPropsType = {
export interface StorybookProvidersPropsType {
children: React.ReactNode;
additionalContainers?: interfaces.Container[];
overwriteContainers?: Partial<
Expand All @@ -27,7 +27,7 @@ export type StorybookProvidersPropsType = {
initialAppContext?: AppStoreType;
appContextReducer?: ReducerType;
locale?: Locale;
};
}

export function StorybookProviders({
children,
Expand Down
4 changes: 2 additions & 2 deletions libs/e2e-testing-providers/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"types": ["node"]
},
"files": [
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
"../../node_modules/@nrwl/react/typings/image.d.ts"
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
"../../node_modules/@nx/react/typings/image.d.ts"
],
"exclude": [
"jest.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion libs/translations/.babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"presets": [
[
"@nrwl/react/babel",
"@nx/react/babel",
{
"runtime": "automatic",
"useBuiltIns": "usage"
Expand Down
2 changes: 1 addition & 1 deletion libs/translations/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
"extends": ["plugin:@nx/react", "../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
Expand Down
Loading
Loading