Skip to content

Commit

Permalink
fix: upgrade nx
Browse files Browse the repository at this point in the history
  • Loading branch information
abuaboud committed Oct 16, 2024
1 parent 60e75b3 commit c5327d6
Show file tree
Hide file tree
Showing 7 changed files with 1,679 additions and 1,066 deletions.
14 changes: 7 additions & 7 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=18-bullseye
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 20, 18, 16, 14, 20-bullseye, 18-bullseye, 16-bullseye, 14-bullseye, 20-buster, 18-buster, 16-buster, 14-buster
ARG VARIANT=20-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
Expand Down Expand Up @@ -32,12 +32,12 @@ ENV LC_ALL en_US.UTF-8

COPY default.cf /usr/local/etc/isolate

RUN npm i -g pnpm@7.28.0
RUN npm i -g pnpm@9.12.1
RUN npm i -g [email protected]

RUN pnpm config set store-dir /root/.local/share/pnpm/store

RUN pnpm store add \
@tsconfig/[email protected] \
@types/node@18.17.1 \
typescript@4.8.4
# Update to use Node.js 20 packages
RUN pnpm store add @tsconfig/[email protected]
RUN pnpm store add @types/node@20.14.8
RUN pnpm store add typescript@4.9.4
5 changes: 0 additions & 5 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ services:
build:
context: .
dockerfile: Dockerfile
args:
# Update 'VARIANT' to pick an LTS version of Node.js: 18, 16, 14.
# Append -bullseye or -buster to pin to an OS version.
# Use -bullseye variants on local arm64/Apple Silicon.
VARIANT: 18-bullseye

volumes:
- ..:/workspace:cached
Expand Down
8 changes: 4 additions & 4 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getJestProjects } from '@nx/jest';
import { getJestProjectsAsync } from '@nx/jest';

export default {
projects: getJestProjects(),
};
export default async () => ({
projects: await getJestProjectsAsync(),
});
135 changes: 39 additions & 96 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -1,123 +1,66 @@
{
"migrations": [
{
"version": "18.1.0-beta.3",
"description": "Moves affected.defaultBase to defaultBase in `nx.json`",
"implementation": "./src/migrations/update-17-2-0/move-default-base",
"version": "20.0.0-beta.7",
"description": "Migration for v20.0.0-beta.7",
"implementation": "./src/migrations/update-20-0-0/move-use-daemon-process",
"package": "nx",
"name": "move-default-base-to-nx-json-root"
"name": "move-use-daemon-process"
},
{
"cli": "nx",
"version": "19.2.0-beta.2",
"description": "Updates the default workspace data directory to .nx/workspace-data",
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory",
"package": "nx",
"name": "19-2-0-move-graph-cache-directory"
},
{
"cli": "nx",
"version": "19.2.2-beta.0",
"description": "Updates the nx wrapper.",
"implementation": "./src/migrations/update-17-3-0/update-nxw",
"package": "nx",
"name": "19-2-2-update-nx-wrapper"
},
{
"version": "19.2.4-beta.0",
"description": "Set project name in nx.json explicitly",
"implementation": "./src/migrations/update-19-2-4/set-project-name",
"version": "20.0.1",
"description": "Set `useLegacyCache` to true for migrating workspaces",
"implementation": "./src/migrations/update-20-0-1/use-legacy-cache",
"x-repair-skip": true,
"package": "nx",
"name": "19-2-4-set-project-name"
"name": "use-legacy-cache"
},
{
"cli": "nx",
"version": "18.1.0-beta.1",
"requires": {
"@angular/core": ">=17.2.0"
},
"description": "Update the @angular/cli package version to ~17.2.0.",
"factory": "./src/migrations/update-18-1-0/update-angular-cli",
"package": "@nx/angular",
"name": "update-angular-cli-version-17-2-0"
"version": "20.0.0-beta.5",
"description": "replace getJestProjects with getJestProjectsAsync",
"implementation": "./src/migrations/update-20-0-0/replace-getJestProjects-with-getJestProjectsAsync",
"package": "@nx/jest",
"name": "replace-getJestProjects-with-getJestProjectsAsync"
},
{
"cli": "nx",
"version": "18.1.1-beta.0",
"description": "Ensure targetDefaults inputs for task hashing when '@nx/angular:webpack-browser' is used are correct for Module Federation.",
"factory": "./src/migrations/update-18-1-1/fix-target-defaults-inputs",
"package": "@nx/angular",
"name": "fix-target-defaults-for-webpack-browser"
"version": "19.6.0-beta.0",
"description": "Add dependsOn: [build] to preview targets using preview-server",
"implementation": "./src/migrations/update-19-6-0/add-depends-on-for-preview",
"package": "@nx/vite",
"name": "update-19-6-0-add-depends-on-for-preview-server"
},
{
"cli": "nx",
"version": "18.2.0-beta.0",
"requires": {
"@angular/core": ">=17.3.0"
},
"description": "Update the @angular/cli package version to ~17.3.0.",
"factory": "./src/migrations/update-18-2-0/update-angular-cli",
"package": "@nx/angular",
"name": "update-angular-cli-version-17-3-0"
"version": "19.6.3-beta.0",
"description": "Migrate proxy config files to match new format from webpack-dev-server v5.",
"implementation": "./src/migrations/update-19-6-3/proxy-config",
"package": "@nx/webpack",
"name": "update-19-6-3-proxy-config"
},
{
"cli": "nx",
"version": "19.1.0-beta.2",
"requires": {
"@angular/core": ">=18.0.0"
},
"description": "Update the @angular/cli package version to ~18.0.0.",
"factory": "./src/migrations/update-19-1-0/update-angular-cli",
"package": "@nx/angular",
"name": "update-angular-cli-version-18-0-0"
"version": "19.6.0-beta.4",
"description": "Ensure Module Federation DTS is turned off by default.",
"factory": "./src/migrations/update-19-6-0/turn-off-dts-by-default",
"package": "@nx/react",
"name": "update-19-6-0-turn-module-federation-dts-off"
},
{
"cli": "nx",
"version": "19.2.1-beta.0",
"requires": {
"@angular-eslint/eslint-plugin": ">=18.0.0"
},
"description": "Installs the '@typescript-eslint/utils' package when having installed '@angular-eslint/eslint-plugin' or '@angular-eslint/eslint-plugin-template' with version >=18.0.0.",
"factory": "./src/migrations/update-19-2-1/add-typescript-eslint-utils",
"package": "@nx/angular",
"name": "add-typescript-eslint-utils"
"version": "19.6.0-beta.4",
"description": "Update the server file for Module Federation SSR port value to be the same as the 'serve' target port value.",
"factory": "./src/migrations/update-19-6-0/update-ssr-server-port",
"package": "@nx/react",
"name": "update-module-federation-ssr-server-file"
},
{
"cli": "nx",
"version": "19.1.0-beta.6",
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs",
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi",
"package": "@nx/eslint-plugin",
"name": "update-19-1-0-rename-no-extra-semi"
},
{
"version": "18.0.0",
"description": "Updates two-way bindings that have an invalid expression to use the longform expression instead.",
"factory": "./migrations/invalid-two-way-bindings/bundle",
"package": "@angular/core",
"name": "invalid-two-way-bindings"
},
{
"version": "18.0.0",
"description": "Replace deprecated HTTP related modules with provider functions",
"factory": "./migrations/http-providers/bundle",
"package": "@angular/core",
"name": "migration-http-providers"
},
{
"version": "18.0.0-0",
"description": "Updates Angular Material to v18",
"factory": "./ng-update/index_bundled#updateToV18",
"package": "@angular/material",
"name": "migration-v18"
},
{
"version": "18.0.0-0",
"description": "Updates the Angular CDK to v18",
"factory": "./ng-update/index#updateToV18",
"package": "@angular/cdk",
"name": "migration-v18"
"version": "19.6.1-beta.0",
"description": "Ensure Target Defaults are set correctly for Module Federation.",
"factory": "./src/migrations/update-19-6-1/ensure-depends-on-for-mf",
"package": "@nx/react",
"name": "update-19-6-1-ensure-module-federation-target-defaults"
}
]
}
}
3 changes: 2 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,6 @@
"version": {
"preVersionCommand": "npx nx run-many -t build"
}
}
},
"useLegacyCache": true
}
Loading

0 comments on commit c5327d6

Please sign in to comment.