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

43-update-to-latest-version-of-nx #44

Merged
merged 3 commits into from
Nov 9, 2024
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
47 changes: 47 additions & 0 deletions .firebase/logs/vsce-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[debug] [2024-11-09T00:52:54.968Z] [Firebase Plugin] Activating Firebase extension.
[info] [Firebase Plugin] Checked firebase-tools, is up to date!
[info] i dataconnect: downloading dataconnect-emulator-1.6.1... {"metadata":{"emulator":{"name":"dataconnect"},"message":"downloading dataconnect-emulator-1.6.1..."}}
[debug] [2024-11-09T00:52:58.251Z] >>> [apiv2][query] GET https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-v1.6.1
[debug] [2024-11-09T00:52:58.821Z] <<< [apiv2][status] GET https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-v1.6.1 200
[debug] [2024-11-09T00:52:58.822Z] <<< [apiv2][body] GET https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-v1.6.1 [stream]
[info] i dataconnect: Removing outdated emulator files: dataconnect-emulator-1.5.1 {"metadata":{"emulator":{"name":"dataconnect"},"message":"Removing outdated emulator files: dataconnect-emulator-1.5.1"}}
[debug] [2024-11-09T00:53:04.573Z] 'fdc build' failed with error: Unable to build your Data Connect schema and connectors (exit code 1): E1109 03:53:04.569387 30318 cmd.go:41] Error loading data connect config: could not find dataconnect.yaml in `/Users/mainawycliffe/projects/nx-toolkits/dataconnect`
{"metadata":{"emulator":{"name":"dataconnect"},"message":"'fdc build' failed with error: Unable to build your Data Connect schema and connectors (exit code 1): E1109 03:53:04.569387 30318 cmd.go:41] Error loading data connect config: could not find dataconnect.yaml in `/Users/mainawycliffe/projects/nx-toolkits/dataconnect`\n"}}
[debug] [2024-11-09T09:03:12.543Z] [Firebase Plugin] Activating Firebase extension.
[info] [Firebase Plugin] Checked firebase-tools, is up to date!
[debug] [2024-11-09T09:03:14.555Z] 'fdc build' failed with error: Unable to build your Data Connect schema and connectors (exit code 1): E1109 12:03:14.550688 41269 cmd.go:41] Error loading data connect config: could not find dataconnect.yaml in `/Users/mainawycliffe/projects/nx-toolkits/dataconnect`
{"metadata":{"emulator":{"name":"dataconnect"},"message":"'fdc build' failed with error: Unable to build your Data Connect schema and connectors (exit code 1): E1109 12:03:14.550688 41269 cmd.go:41] Error loading data connect config: could not find dataconnect.yaml in `/Users/mainawycliffe/projects/nx-toolkits/dataconnect`\n"}}
[debug] [2024-11-09T09:45:51.381Z] [Firebase Plugin] Value of process.env.MONOSPACE_ENV: undefined
[debug] [2024-11-09T09:45:51.382Z] [Firebase Plugin] requireAuthWrapper
[debug] [2024-11-09T09:45:51.383Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2024-11-09T09:45:51.383Z] > authorizing via signed-in user ([email protected])
[debug] [2024-11-09T09:45:51.384Z] Checked if tokens are valid: false, expires at: 1731143948931
[debug] [2024-11-09T09:45:51.384Z] Checked if tokens are valid: false, expires at: 1731143948931
[debug] [2024-11-09T09:45:51.384Z] > refreshing access token with scopes: []
[debug] [2024-11-09T09:45:51.385Z] >>> [apiv2][query] POST https://www.googleapis.com/oauth2/v3/token [none]
[debug] [2024-11-09T09:45:51.385Z] >>> [apiv2][body] POST https://www.googleapis.com/oauth2/v3/token [omitted]
[debug] [2024-11-09T09:45:51.387Z] [Firebase Plugin] Value of process.env.MONOSPACE_ENV: undefined
[debug] [2024-11-09T09:45:51.387Z] [Firebase Plugin] requireAuthWrapper
[debug] [2024-11-09T09:45:51.387Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2024-11-09T09:45:51.388Z] > authorizing via signed-in user ([email protected])
[debug] [2024-11-09T09:45:51.388Z] Checked if tokens are valid: false, expires at: 1731143948931
[debug] [2024-11-09T09:45:51.388Z] Checked if tokens are valid: false, expires at: 1731143948931
[debug] [2024-11-09T09:45:51.388Z] > refreshing access token with scopes: []
[debug] [2024-11-09T09:45:51.388Z] >>> [apiv2][query] POST https://www.googleapis.com/oauth2/v3/token [none]
[debug] [2024-11-09T09:45:51.388Z] >>> [apiv2][body] POST https://www.googleapis.com/oauth2/v3/token [omitted]
[debug] [2024-11-09T09:45:51.721Z] <<< [apiv2][status] POST https://www.googleapis.com/oauth2/v3/token 200
[debug] [2024-11-09T09:45:51.721Z] <<< [apiv2][body] POST https://www.googleapis.com/oauth2/v3/token [omitted]
[debug] [2024-11-09T09:45:51.734Z] [Firebase Plugin] User found: [email protected]
[info] [Firebase Plugin] (Core:Project) New user detected, fetching projects
[debug] [2024-11-09T09:45:51.734Z] Checked if tokens are valid: true, expires at: 1731149150722
[debug] [2024-11-09T09:45:51.735Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects pageSize=1000
[debug] [2024-11-09T09:45:51.735Z] <<< [apiv2][status] POST https://www.googleapis.com/oauth2/v3/token 200
[debug] [2024-11-09T09:45:51.735Z] <<< [apiv2][body] POST https://www.googleapis.com/oauth2/v3/token [omitted]
[debug] [2024-11-09T09:45:51.744Z] [Firebase Plugin] User found: [email protected]
[info] [Firebase Plugin] (Core:Project) New user detected, fetching projects
[debug] [2024-11-09T09:45:51.744Z] Checked if tokens are valid: true, expires at: 1731149150736
[debug] [2024-11-09T09:45:51.744Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects pageSize=1000
[debug] [2024-11-09T09:45:52.452Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects 200
[debug] [2024-11-09T09:45:52.453Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects [omitted]
[debug] [2024-11-09T09:45:52.966Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects 200
[debug] [2024-11-09T09:45:52.966Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects [omitted]
16 changes: 2 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ name: publish to npm
on:
push:
tags:
- "firebase@*"
- "testing-library@*"
- 'firebase@*'
- 'testing-library@*'

jobs:
build:
runs-on: ubuntu-latest
steps:

# We want to get the tag name without the @version suffix, this is our
# package name
- uses: actions/github-script@v6
Expand Down Expand Up @@ -64,14 +63,3 @@ jobs:

- name: Build
run: pnpm nx run ${{ steps.get-tag-name.outputs.result }}:build

- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: dist/packages/${{ steps.get-tag-name.outputs.result }}/*.*
bodyFile: "packages/${{ steps.get-tag-name.outputs.result }}/CHANGELOG.md"

- name: npm publish
run: npm publish dist/packages/${{ steps.get-tag-name.outputs.result }} --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
68 changes: 68 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: publish to npm

on:
push:
# main:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
# We want to get the tag name without the @version suffix, this is our
# package name
- uses: actions/github-script@v6
id: get-tag-name
env:
GIT_TAG_NAME: ${{ github.ref_name }}
with:
result-encoding: string
script: return process.env.GIT_TAG_NAME.split('@')[0]

- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/

# - uses: nrwl/nx-set-shas@v3
# id: nx-toolkit-nx-set-shas
# with:
# workflow-id: 'publish firebase generator'

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm nx affected -t lint

- name: Test
run: pnpm nx affected -t test

- name: Build
run: pnpm nx affected -t build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ ui-debug.log
.angular

.nx/cache
.nx/workspace-data
.nx/workspace-data
.firebase/logs/vsce-debug.log
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(),
});
119 changes: 64 additions & 55 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -1,83 +1,92 @@
{
"migrations": [
{
"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",
"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": "19-2-0-move-graph-cache-directory"
"name": "move-use-daemon-process"
},
{
"cli": "nx",
"version": "19.2.2-beta.0",
"description": "Updates the nx wrapper.",
"implementation": "./src/migrations/update-17-3-0/update-nxw",
"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-2-update-nx-wrapper"
"name": "use-legacy-cache"
},
{
"version": "19.2.4-beta.0",
"description": "Set project name in nx.json explicitly",
"implementation": "./src/migrations/update-19-2-4/set-project-name",
"x-repair-skip": true,
"package": "nx",
"name": "19-2-4-set-project-name"
"cli": "nx",
"version": "19.6.0-beta.4",
"description": "Update ciWebServerCommand to use static serve for the application.",
"implementation": "./src/migrations/update-19-6-0/update-ci-webserver-for-static-serve",
"package": "@nx/cypress",
"name": "update-19-6-0-update-ci-webserver-for-vite"
},
{
"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": "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.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.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.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": "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.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"
},
{
"cli": "nx",
"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.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",
"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/angular",
"name": "add-typescript-eslint-utils"
"name": "update-19-6-0"
},
{
"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"
"cli": "nx",
"version": "19.6.0-beta.7",
"requires": { "@angular/core": ">=18.2.0" },
"description": "Update the @angular/cli package version to ~18.2.0.",
"factory": "./src/migrations/update-19-6-0/update-angular-cli",
"package": "@nx/angular",
"name": "update-angular-cli-version-18-2-0"
},
{
"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"
"cli": "nx",
"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/angular",
"name": "update-19-6-1-ensure-module-federation-target-defaults"
}
]
}
}
32 changes: 8 additions & 24 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,13 @@
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"build": {
"dependsOn": [
"^build"
],
"inputs": [
"production",
"^production"
],
"dependsOn": ["^build"],
"inputs": ["production", "^production"],
"cache": true
},
"@nx/jest:jest": {
"cache": true,
"inputs": [
"default",
"^production",
"{workspaceRoot}/jest.preset.js"
],
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"options": {
"passWithNoTests": true
},
Expand All @@ -29,18 +20,12 @@
}
},
"@nx/eslint:lint": {
"inputs": [
"default",
"{workspaceRoot}/.eslintrc.json"
],
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true
}
},
"namedInputs": {
"default": [
"{projectRoot}/**/*",
"sharedGlobals"
],
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"production": [
"default",
"!{projectRoot}/.eslintrc.json",
Expand All @@ -49,9 +34,7 @@
"!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/src/test-setup.[jt]s"
],
"sharedGlobals": [
"{workspaceRoot}/babel.config.json"
]
"sharedGlobals": ["{workspaceRoot}/babel.config.json"]
},
"workspaceLayout": {
"appsDir": "apps",
Expand Down Expand Up @@ -88,5 +71,6 @@
}
},
"nxCloudAccessToken": "YTRkYmQ1YTItZDU1OS00NDA2LTlmNjAtNjVhMGQ1MmIwYTNlfHJlYWQtd3JpdGU=",
"useInferencePlugins": false
"useInferencePlugins": false,
"useLegacyCache": true
}
Loading
Loading