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

Fix workspace errors #148

Merged
merged 4 commits into from
Mar 25, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.next
.nuxt
.sarif
.swc
.vercel
.vuepress/dist
dist
Expand Down
34 changes: 18 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,17 @@
"@graphql-typed-document-node/core": "3.1.2",
"@nrwl/devkit": "15.7.1",
"@nrwl/next": "15.7.1",
"@swc/helpers": "0.4.11",
"@swc/helpers": "0.4.14",
"fs-extra": "10.1.0",
"get-port": "5.1.1",
"graphql": "16.6.0",
"jest_workaround": "^0.69.0",
"next": "13.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-is": "18.2.0",
"react": "18.2.0",
"styled-components": "5.3.6",
"tslib": "2.4.1",
"tslib": "2.5.0",
"watchpack": "2.4.0"
},
"devDependencies": {
Expand All @@ -66,41 +67,42 @@
"@nrwl/nx-plugin": "15.7.1",
"@nrwl/react": "15.7.1",
"@nrwl/workspace": "15.7.1",
"@swc/cli": "0.1.55",
"@swc/core": "1.2.173",
"@swc-node/register": "1.6.2",
"@swc/cli": "0.1.62",
"@swc/core": "1.3.42",
"@swc/jest": "0.2.20",
"@testing-library/react": "13.4.0",
"@types/fs-extra": "9.0.13",
"@types/jest": "28.1.8",
"@types/node": "18.11.9",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.9",
"@types/react-is": "17.0.3",
"@types/react": "18.0.25",
"@types/styled-components": "5.1.26",
"@types/watchpack": "2.4.0",
"@typescript-eslint/eslint-plugin": "5.42.1",
"@typescript-eslint/parser": "5.42.1",
"babel-jest": "28.1.3",
"@typescript-eslint/eslint-plugin": "5.56.0",
"@typescript-eslint/parser": "5.56.0",
"babel-jest": "28.1.1",
"babel-plugin-styled-components": "1.10.7",
"cypress": "^12.2.0",
"eslint": "8.15.0",
"eslint-config-next": "13.1.1",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-cypress": "2.12.1",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.6.1",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react": "7.31.11",
"eslint": "8.15.0",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "8.0.3",
"jest-environment-jsdom": "29.3.0",
"jest": "28.1.3",
"jsonc-eslint-parser": "^2.2.0",
"jest": "28.1.1",
"jest-environment-jsdom": "28.1.1",
"jsonc-eslint-parser": "2.2.0",
"lint-staged": "13.2.0",
"nx": "15.7.1",
"prettier": "2.7.1",
"prettier": "2.8.6",
"react-test-renderer": "18.2.0",
"regenerator-runtime": "0.13.7",
"ts-jest": "28.0.8",
"ts-jest": "28.0.5",
"ts-node": "10.9.1",
"type-fest": "3.6.1",
"typescript": "4.8.4"
Expand Down
10 changes: 0 additions & 10 deletions packages/nx-mesh/.babelrc

This file was deleted.

9 changes: 8 additions & 1 deletion packages/nx-mesh/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*", "**/node_modules"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
Expand All @@ -13,6 +13,13 @@
{
"files": ["*.js", "*.jsx"],
"rules": {}
},
{
"files": ["./package.json", "./generators.json", "./executors.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"@nrwl/nx/nx-plugin-checks": "error"
}
}
]
}
5 changes: 3 additions & 2 deletions packages/nx-mesh/.swcrc → packages/nx-mesh/.lib.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
},
"sourceMaps": true,
"exclude": [
"node_modules",
"jest.config.ts",
".*.spec.tsx?$",
".*.test.tsx?$",
".*\\.spec.tsx?$",
".*\\.test.tsx?$",
"./src/jest-setup.ts$",
"./**/jest-setup.ts$",
".*.js$"
Expand Down
24 changes: 18 additions & 6 deletions packages/nx-mesh/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
/* eslint-disable */
import { readFileSync } from 'fs';

const swcrc = JSON.parse(readFileSync(`${__dirname}/.lib.swcrc`, 'utf-8'));

// Reading the SWC compilation config and remove the "exclude"
// for the test files to be compiled by SWC
const swcJestConfig = {
...swcrc,
exclude: undefined,
jsc: {
...swcrc.jsc,
experimental: {
plugins: [['jest_workaround', {}]],
},
},
};

export default {
displayName: 'nx-mesh',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
transform: {
'^.+\\.[tj]s$': 'ts-jest',
'^.+\\.[tj]s$': ['@swc/jest', swcJestConfig],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/packages/nx-mesh',
Expand Down
26 changes: 9 additions & 17 deletions packages/nx-mesh/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
{
"name": "nx-mesh",
"author": "Dom Talbot",
"description": "GraphQL Mesh support for Nx ",
"description": "GraphQL Mesh support for Nx",
"version": "3.1.0",
"license": "MIT",
"main": "src/index.js",
"generators": "./generators.json",
"executors": "./executors.json",
"peerDependencies": {
"@graphql-mesh/cli": ">=0.82.27",
"@swc-node/register": "^1.5.1",
"graphql": "^16.6.0",
"@swc/core": "^0.1.55",
"@swc/helpers": "^0.4.11",
"nx": ">= 14 <= 16"
},
"peerDependenciesMeta": {
"@swc-node/register": {
"optional": true
},
"@swc/core": {
"optional": true
},
"@swc/helpers": {
"optional": true
}
"nx": ">=15.7.1"
},
"dependencies": {
"@nrwl/cypress": "^15.7.1",
Expand All @@ -33,9 +19,12 @@
"@nrwl/linter": "^15.7.1",
"@nrwl/node": "^15.7.1",
"@nrwl/workspace": "^15.7.1",
"@swc-node/register": "^1.6.2",
"@swc/core": "^1.3.42",
"@swc/helpers": "^0.4.14",
"fs-extra": "^10.1.0",
"get-port": "5.1.1",
"tslib": "^2.4.0",
"tslib": "^2.5.0",
"type-fest": "^2.18.0",
"watchpack": "^2.4.0"
},
Expand Down Expand Up @@ -63,5 +52,8 @@
},
"nx-migrations": {
"migrations": "./migrations.json"
},
"exports": {
"./package.json": "./package.json"
}
}
2 changes: 1 addition & 1 deletion packages/nx-mesh/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"executor": "@nrwl/js:swc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/nx-mesh",
Expand Down
12 changes: 1 addition & 11 deletions packages/nx-mesh/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"module": "commonjs",
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"strict": true,
"isolatedModules": true
"module": "commonjs"
},
"files": [],
"include": [],
Expand Down
Loading