-
Notifications
You must be signed in to change notification settings - Fork 10
feat: upgrade NX and migrate builds to esbuild #1185
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
Open
jonathannorris
wants to merge
42
commits into
main
Choose a base branch
from
feat-nx-migration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
dc2602d
feat: upgrade nx from 16.10.0 to 22.1.1
jonathannorris abe7c90
feat: migrate all tsc builds to esbuild
jonathannorris b941033
fix: ignore tmp directory in bucketing-assembly-script eslint config
jonathannorris 0ca4f56
chore: run prettier
jonathannorris 1e3cd14
fix: update e2e configs for NX 22 compatibility
jonathannorris b04f598
fix: use tsc for nextjs SDK to preserve 'use client' directives
jonathannorris cc4d0f8
chore: update e2e yarn.lock files
jonathannorris 7aaa171
fix: add webpack config for example-js build
jonathannorris aac92bb
fix: change export of VariableDefinitions to type export from '@devcy…
jonathannorris c2fb426
fix: resolve rollup build and type-check issues for react-native-expo
jonathannorris 1ee6269
chore: run prettier:format
jonathannorris 16f4ee9
fix: update webpack configs for NX 22 compatibility
jonathannorris 299dd0f
fix: ignore @nx/webpack in js sdk dependency checks
jonathannorris 44bc28f
chore: ignore .yarn folders in subdirectories and remove tracked files
jonathannorris 025eccd
fix: update dev-apps webpack configs and nextjs pages-router API
jonathannorris 6373b74
fix: update webpack configs and tsconfig for dev-apps
jonathannorris 2f09901
chore: prettier
jonathannorris d98fd0a
chore: update Nx affected E2E workflow to include shared libraries bu…
jonathannorris 1567288
fix: update e2e test ports to avoid conflicts and pre-build shared libs
jonathannorris 8bee1c9
fix: update nx run-many command syntax in e2e workflow
jonathannorris 784df2d
fix: address copilot comments - remove redundant type annotations and…
jonathannorris 71043e7
fix: enhance Playwright config with comments for clarity and maintain…
jonathannorris 2e9f49a
fix: limit e2e parallel execution to 3
jonathannorris c3dea34
fix: increase timeout for navigation in E2E tests to improve reliability
jonathannorris a96cf6e
fix: preserve NX project config in playwright configs
jonathannorris f2828ca
fix: add shared-bucketing to e2e build dependencies
jonathannorris dbb999e
fix: add fallback for undefined projects in playwright configs
jonathannorris 92b227d
fix: format playwright configs to comply with max-len
jonathannorris bbaccf6
chore: apply prettier formatting to playwright configs
jonathannorris 3a868d1
chore: add worktrees.json for cursor worktree setup
jonathannorris 6d15b3f
chore: create worktrees.json for setting up cursor worktree
jonathannorris 1daeddc
fix: resolve WASM path and webpack config for nodejs-local dev-app
jonathannorris ca8f6f9
fix: resolve WASM path and webpack config for openfeature-nodejs dev-app
jonathannorris 04f388c
chore: add trailing newline to js webpack config
jonathannorris 4c07218
chore: remove nextjs app-router and pages-router directories along wi…
jonathannorris 3ec1c58
chore: clean up yarn.lock by removing unused nextjs app-router and pa…
jonathannorris 5a4419a
chore: simplify JSON formatting and clean up webpack configuration files
jonathannorris 0e1df07
chore: update webpack configuration to use Nx plugin composition
jonathannorris ea64662
fix: correct package.json main fields for nestjs SDKs to match build …
jonathannorris e8a8fa0
chore: use dot notation for process.env and add timeout comment
jonathannorris 331f493
fix: lint errors and simplify webpack config
jonathannorris 947e664
fix: reduce CDN bundle size by using tsc compiler
jonathannorris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "setup-worktree": ["yarn install"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +1,48 @@ | ||
| name: Nx Affected E2E | ||
| on: | ||
| pull_request: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| jobs: | ||
| build: | ||
| runs-on: ubicloud-standard-8 | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| pull-requests: write | ||
| issues: write | ||
| strategy: | ||
| matrix: | ||
| node-version: [22.12] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Enable Corepack | ||
| run: corepack enable | ||
| - name: Set Secrets | ||
| uses: DevCycleHQ/aws-secrets-action@main | ||
| with: | ||
| secrets_map: '{"NEXT_PUBLIC_E2E_OPTIN_CLIENT_KEY":"DEVCYCLE_GITHUB_js-sdks_NEXT_PUBLIC_E2E_OPTIN_CLIENT_KEY","E2E_OPTIN_SERVER_KEY":"DEVCYCLE_GITHUB_js-sdks_E2E_OPTIN_SERVER_KEY","NEXT_PUBLIC_E2E_EDGEDB_CLIENT_KEY":"DEVCYCLE_GITHUB_js-sdks_NEXT_PUBLIC_E2E_EDGEDB_CLIENT_KEY","E2E_EDGEDB_SERVER_KEY":"DEVCYCLE_GITHUB_js-sdks_E2E_EDGEDB_SERVER_KEY","E2E_NEXTJS_SERVER_KEY":"DEVCYCLE_GITHUB_js-sdks_E2E_NEXTJS_SERVER_KEY", "NEXT_PUBLIC_E2E_NEXTJS_CLIENT_KEY": "DEVCYCLE_GITHUB_js-sdks_NEXT_PUBLIC_E2E_NEXTJS_CLIENT_KEY", "DVC_E2E_SERVER_SDK_KEY": "DEVCYCLE_GITHUB_js-sdks_DVC_E2E_SERVER_SDK_KEY"}' | ||
| aws_account_id: '134377926370' | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: 'yarn' | ||
| - run: git fetch origin main | ||
| - run: yarn --immutable | ||
| - name: Install Playwright Browsers | ||
| shell: bash | ||
| run: yarn playwright install --with-deps | ||
| - name: Run Affected E2E Tests | ||
| shell: bash | ||
| run: yarn affected:e2e | ||
| - name: Upload Playwright Report | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: playwright-report | ||
| path: dist/.playwright/e2e/ | ||
| build: | ||
| runs-on: ubicloud-standard-8 | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| pull-requests: write | ||
| issues: write | ||
| strategy: | ||
| matrix: | ||
| node-version: [22.12] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Enable Corepack | ||
| run: corepack enable | ||
| - name: Set Secrets | ||
| uses: DevCycleHQ/aws-secrets-action@main | ||
| with: | ||
| secrets_map: '{"NEXT_PUBLIC_E2E_OPTIN_CLIENT_KEY":"DEVCYCLE_GITHUB_js-sdks_NEXT_PUBLIC_E2E_OPTIN_CLIENT_KEY","E2E_OPTIN_SERVER_KEY":"DEVCYCLE_GITHUB_js-sdks_E2E_OPTIN_SERVER_KEY","NEXT_PUBLIC_E2E_EDGEDB_CLIENT_KEY":"DEVCYCLE_GITHUB_js-sdks_NEXT_PUBLIC_E2E_EDGEDB_CLIENT_KEY","E2E_EDGEDB_SERVER_KEY":"DEVCYCLE_GITHUB_js-sdks_E2E_EDGEDB_SERVER_KEY","E2E_NEXTJS_SERVER_KEY":"DEVCYCLE_GITHUB_js-sdks_E2E_NEXTJS_SERVER_KEY", "NEXT_PUBLIC_E2E_NEXTJS_CLIENT_KEY": "DEVCYCLE_GITHUB_js-sdks_NEXT_PUBLIC_E2E_NEXTJS_CLIENT_KEY", "DVC_E2E_SERVER_SDK_KEY": "DEVCYCLE_GITHUB_js-sdks_DVC_E2E_SERVER_SDK_KEY"}' | ||
| aws_account_id: "134377926370" | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: "yarn" | ||
| - run: git fetch origin main | ||
| - run: yarn --immutable | ||
| - name: Install Playwright Browsers | ||
| shell: bash | ||
| run: yarn playwright install --with-deps | ||
| - name: Build shared libraries | ||
| shell: bash | ||
| run: yarn nx run-many -t build -p shared-types shared-bucketing server-request js-cloud-server-sdk nextjs js react --parallel=1 | ||
| - name: Run Affected E2E Tests | ||
| shell: bash | ||
| run: yarn affected:e2e | ||
| - name: Upload Playwright Report | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: playwright-report | ||
| path: dist/.playwright/e2e/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,4 +19,5 @@ node_modules | |
| dev-apps/react/react-native-app/package.json | ||
| .wrangler/ | ||
| *.html | ||
| tmp/ | ||
| tmp/ | ||
| .nx/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
dev-apps/js-cloud-server/cloudflare-worker/webpack.config.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| const { composePlugins, withNx } = require('@nx/webpack') | ||
|
|
||
| module.exports = composePlugins(withNx(), (config, { options }) => { | ||
| config.node = { | ||
| __dirname: true, | ||
| } | ||
| if (!config.resolve) { | ||
| config.resolve = {} | ||
| } | ||
| // Disable browser field resolution for node targets | ||
| config.resolve.mainFields = ['main', 'module'] | ||
| config.resolve.conditionNames = ['node', 'require', 'import'] | ||
| // Configure externals - webpack externals function | ||
| if (options.external && Array.isArray(options.external)) { | ||
| config.externals = config.externals || [] | ||
| const externalArray = Array.isArray(config.externals) | ||
| ? config.externals | ||
| : [config.externals] | ||
| config.externals = [ | ||
| ...externalArray, | ||
| ...options.external.map((pkg) => ({ | ||
| [pkg]: `commonjs ${pkg}`, | ||
| })), | ||
| ] | ||
| } | ||
| return config | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| const { composePlugins, withNx, withWeb } = require('@nx/webpack') | ||
|
|
||
| module.exports = composePlugins(withNx(), withWeb(), (config) => config) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worth copying these changes elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its basically just formatting, so probably not