Skip to content
Closed
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,7 @@ jobs:
- run: pnpm exec nx-cloud record -- nx format:check
- run: pnpm exec nx affected -t lint test

- run: pnpm exec nx affected -t build --yes

- if: ${{ matrix.os != 'windows-latest'}}
run: pnpm exec nx affected -t build e2e
run: pnpm exec nx affected -t build e2e
8 changes: 7 additions & 1 deletion examples/cloudflare-next-app/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
"next/core-web-vitals",
"../../.eslintrc.base.json"
],
"ignorePatterns": ["!**/*", ".next/**/*", ".vercel/**/*"],
"ignorePatterns": [
"!**/*",
".next/**/*",
".vercel/**/*",
"next.config.js",
"node_modules/**/*"
],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
Expand Down
2 changes: 1 addition & 1 deletion examples/cloudflare-next-app/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable */
export default {
module.exports = {
displayName: 'cloudflare-next-app',
preset: '../../jest.preset.js',
transform: {
Expand Down
4 changes: 1 addition & 3 deletions examples/cloudflare-next-app/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ const { composePlugins, withNx } = require('@nx/next');
**/
const nextConfig = {
nx: {
// Set this to true if you would like to use SVGR
// See: https://github.com/gregberge/svgr
svgr: false,
// See: https://nx.dev/recipes/next/next-config-setup
},
};

Expand Down
5 changes: 3 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { getJestProjectsAsync } from '@nx/jest';
const { Config } = require('jest');
const { getJestProjectsAsync } = require('@nx/jest');

export default async () => ({
module.exports = async (): Promise<Config> => ({
projects: await getJestProjectsAsync(),
});
7 changes: 1 addition & 6 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
const nxPreset = require('@nx/jest/preset').default;

module.exports = {
...nxPreset,
maxWorkers: 1,
testEnvironment: 'node',
setupFiles: ['../../tools/scripts/unit-test-setup.js'],
};
module.exports = { ...nxPreset };
100 changes: 100 additions & 0 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"migrations": [
{
"version": "22.0.0-beta.1",
"description": "Updates release version config based on the breaking changes in Nx v22",
"implementation": "./src/migrations/update-22-0-0/release-version-config-changes",
"package": "nx",
"name": "22-0-0-release-version-config-changes"
},
{
"version": "22.0.0-beta.2",
"description": "Consolidates releaseTag* options into nested releaseTag object structure",
"implementation": "./src/migrations/update-22-0-0/consolidate-release-tag-config",
"package": "nx",
"name": "22-0-0-consolidate-release-tag-config"
},
{
"cli": "nx",
"version": "22.1.0-beta.5",
"description": "Updates the nx wrapper.",
"implementation": "./src/migrations/update-22-1-0/update-nx-wrapper",
"package": "nx",
"name": "22-1-0-update-nx-wrapper"
},
{
"version": "21.5.0-beta.2",
"description": "Migrate the legacy 'development' custom condition to a workspace-unique custom condition name.",
"factory": "./src/migrations/update-21-5-0/migrate-development-custom-condition",
"package": "@nx/js",
"name": "migrate-development-custom-condition"
},
{
"version": "22.0.0-beta.0",
"description": "Remove the deprecated `external` and `externalBuildTargets` options from the `@nx/js:swc` and `@nx/js:tsc` executors.",
"factory": "./src/migrations/update-22-0-0/remove-external-options-from-js-executors",
"package": "@nx/js",
"name": "remove-external-options-from-js-executors"
},
{
"version": "22.1.0-rc.1",
"description": "Removes redundant TypeScript project references from project's tsconfig.json files when runtime tsconfig files (e.g., tsconfig.lib.json, tsconfig.app.json) exist.",
"factory": "./src/migrations/update-22-1-0/remove-redundant-ts-project-references",
"package": "@nx/js",
"name": "remove-redundant-ts-project-references"
},
{
"version": "22.2.0-beta.2",
"description": "Convert jest.config.ts files from ESM to CJS syntax (export default -> module.exports, import -> require) for projects using CommonJS resolution to ensure correct loading under Node.js type-stripping.",
"implementation": "./src/migrations/update-22-2-0/convert-jest-config-to-cjs",
"package": "@nx/jest",
"name": "convert-jest-config-to-cjs"
},
{
"version": "22.3.2-beta.0",
"requires": { "jest": ">=30.0.0" },
"description": "Replace removed matcher aliases in Jest v30 with their corresponding matcher",
"implementation": "./src/migrations/update-21-3-0/replace-removed-matcher-aliases",
"package": "@nx/jest",
"name": "replace-removed-matcher-aliases-v22-3"
},
{
"version": "22.2.0-beta.1",
"requires": { "vitest": ">=4.0.0" },
"description": "Create AI Instructions to help migrate users workspaces past breaking changes for Vitest 4.",
"implementation": "./src/migrations/update-22-2-0/create-ai-instructions-for-vitest-4",
"package": "@nx/vite",
"name": "update-22-2-0"
},
{
"version": "22.2.0-beta.2",
"description": "Migrate Vitest usage from @nx/vite to @nx/vitest package.",
"implementation": "./src/migrations/update-22-2-0/migrate-vitest-to-vitest-package",
"package": "@nx/vite",
"name": "migrate-vitest-to-vitest-package"
},
{
"cli": "nx",
"version": "22.0.0-beta.0",
"description": "Updates webpack configs using React to use the new withSvgr composable function instead of the svgr option in withReact or NxReactWebpackPlugin.",
"factory": "./src/migrations/update-22-0-0/add-svgr-to-webpack-config",
"package": "@nx/react",
"name": "update-22-0-0-add-svgr-to-webpack-config"
},
{
"version": "21.5.0-beta.0",
"description": "Set the 'tsConfig' option to build and test targets to help with Angular migration issues.",
"factory": "./src/migrations/update-21-5-0/set-tsconfig-option",
"package": "@nx/angular",
"name": "set-tsconfig-option"
},
{
"cli": "nx",
"version": "22.0.0-beta.0",
"description": "Updates next.config.js files to add SVGR webpack configuration directly instead of using the nx.svgr option in withNx.",
"factory": "./src/migrations/update-22-0-0/add-svgr-to-next-config",
"package": "@nx/next",
"name": "update-22-0-0-add-svgr-to-next-config"
}
]
}
12 changes: 7 additions & 5 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"@nx/vite:test": {
"cache": true,
"inputs": ["default", "^production"]
},
"nx-release-publish": {
"options": {
"packageRoot": "dist/{projectRoot}"
}
},
"@nx/vitest:test": {
"cache": true,
"inputs": ["default", "^production"]
}
},
"plugins": [
Expand Down Expand Up @@ -97,7 +97,6 @@
"release": {
"projectsRelationship": "independent",
"projects": ["gonx", "nx-cloudflare"],
"releaseTagPattern": "{projectName}@v{version}",
"version": {
"useLegacyVersioning": false,
"preVersionCommand": "pnpm exec nx run-many -t build",
Expand All @@ -119,6 +118,9 @@
"docs": {
"semverBump": "patch"
}
},
"releaseTag": {
"pattern": "{projectName}@v{version}"
}
}
}
56 changes: 34 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,34 @@
"devDependencies": {
"@angular-devkit/core": "~17.3.7",
"@cloudflare/next-on-pages": "^1.13.13",
"@cloudflare/vitest-pool-workers": "^0.6.16",
"@cloudflare/vitest-pool-workers": "^0.12.0",
"@cloudflare/workers-types": "^4.20250404.0",
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@eslint/eslintrc": "^2.1.2",
"@eslint/js": "^8.52.0",
"@melkeydev/go-blueprint": "0.10.11",
"@nx/angular": "21.4.1",
"@nx/devkit": "21.4.1",
"@nx/esbuild": "21.4.1",
"@nx/eslint": "21.4.1",
"@nx/eslint-plugin": "21.4.1",
"@nx/jest": "21.4.1",
"@nx/js": "21.4.1",
"@nx/next": "21.4.1",
"@nx/node": "21.4.1",
"@nx/plugin": "21.4.1",
"@nx/react": "21.4.1",
"@nx/vite": "21.4.1",
"@nx/web": "21.4.1",
"@nx/workspace": "21.4.1",
"@nx/angular": "22.3.3",
"@nx/devkit": "22.3.3",
"@nx/esbuild": "22.3.3",
"@nx/eslint": "22.3.3",
"@nx/eslint-plugin": "22.3.3",
"@nx/jest": "22.3.3",
"@nx/js": "22.3.3",
"@nx/next": "22.3.3",
"@nx/node": "22.3.3",
"@nx/plugin": "22.3.3",
"@nx/react": "22.3.3",
"@nx/vite": "22.3.3",
"@nx/vitest": "22.3.3",
"@nx/web": "22.3.3",
"@nx/workspace": "22.3.3",
"@svgr/webpack": "^8.1.0",
"@swc-node/register": "1.9.2",
"@swc/cli": "0.6.0",
"@swc/core": "1.5.7",
"@swc/helpers": "0.5.11",
"@swc/jest": "~0.2.38",
"@testing-library/react": "16.1.0",
"@types/jest": "30.0.0",
"@types/kill-port": "^2.0.3",
Expand All @@ -43,8 +45,8 @@
"@types/tcp-port-used": "^1.0.4",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"@vitest/coverage-v8": "^3.0.5",
"@vitest/ui": "^3.0.0",
"@vitest/coverage-v8": "4.0.9",
"@vitest/ui": "4.0.9",
"babel-jest": "30.0.5",
"chalk": "^4.1.2",
"cli-spinners": "^2.9.2",
Expand All @@ -68,7 +70,7 @@
"jsonc-eslint-parser": "^2.1.0",
"kill-port": "^2.0.1",
"npm-run-path": "4.0.1",
"nx": "21.4.1",
"nx": "22.3.3",
"nx-cloud": "19.1.0",
"prettier": "^2.6.2",
"semver": "^7.6.0",
Expand All @@ -77,11 +79,11 @@
"ts-jest": "29.4.0",
"ts-node": "10.9.1",
"tsx": "^4.19.4",
"typescript": "5.8.3",
"typescript": "5.9.3",
"url-loader": "^4.1.1",
"verdaccio": "6.0.5",
"vite": "6.2.2",
"vitest": "^3.2.4",
"vite": "7.3.1",
"vitest": "4.0.9",
"webpack": "^5.90.1",
"wrangler": "^4.26.0"
},
Expand All @@ -97,6 +99,16 @@
"tslib": "^2.3.0"
},
"nx": {
"includedScripts": []
"includedScripts": [],
"targets": {
"local-registry": {
"executor": "@nx/js:verdaccio",
"options": {
"port": 4873,
"config": ".verdaccio/config.yml",
"storage": "tmp/local-registry/storage"
}
}
}
}
}
2 changes: 1 addition & 1 deletion packages/e2e-utils/src/lib/log-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as chalk from 'chalk';
import chalk from 'chalk';

export const E2E_LOG_PREFIX = `${chalk.reset.inverse.bold.keyword('orange')(
' E2E '
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-utils/src/lib/process-utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { promisify } from 'util';
import * as treeKill from 'tree-kill';
import treeKill from 'tree-kill';
import { logError, logInfo, logSuccess } from './log-utils';
import { check as portCheck } from 'tcp-port-used';

Expand Down
22 changes: 22 additions & 0 deletions packages/gonx-e2e/.spec.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"jsc": {
"target": "es2017",
"parser": {
"syntax": "typescript",
"decorators": true,
"dynamicImport": true
},
"transform": {
"decoratorMetadata": true,
"legacyDecorator": true
},
"keepClassNames": true,
"externalHelpers": true,
"loose": true
},
"module": {
"type": "es6"
},
"sourceMaps": true,
"exclude": []
}
17 changes: 14 additions & 3 deletions packages/gonx-e2e/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
export default {
/* eslint-disable */
const { readFileSync } = require('fs');

// Reading the SWC compilation config for the spec files
const swcJestConfig = JSON.parse(
readFileSync(`${__dirname}/.spec.swcrc`, 'utf-8')
);

// Disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves
swcJestConfig.swcrc = false;

module.exports = {
displayName: 'gonx-e2e',
preset: '../../jest.preset.js',
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
'^.+\\.[tj]s$': ['@swc/jest', swcJestConfig],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/packages/gonx-e2e',
coverageDirectory: 'test-output/jest/coverage',
globalSetup: '../../tools/scripts/start-local-registry.ts',
globalTeardown: '../../tools/scripts/stop-local-registry.ts',
};
Loading
Loading