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

meta(everything): Migrate away from NX #4499

Merged
merged 49 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
df0b4a3
Work
hartra344 Mar 26, 2024
a4114de
chore(all): Fix designer client service imports from logic-app-shared
hartra344 Mar 26, 2024
5859dec
Merge branch 'fixImports' into pnpm
hartra344 Mar 26, 2024
66ac891
Work
hartra344 Mar 27, 2024
bb1f495
stuff
hartra344 Mar 29, 2024
cb40571
Merge branch 'main' into pnpm
hartra344 Mar 30, 2024
9ed95b7
progress
hartra344 Mar 30, 2024
e7eef9d
progress
hartra344 Mar 30, 2024
e796b3a
Small Adjustment
hartra344 Mar 30, 2024
ee91785
More work
hartra344 Mar 30, 2024
0674848
More work
hartra344 Mar 30, 2024
a2a268c
More work
hartra344 Mar 30, 2024
0201172
Data Mapper
hartra344 Mar 30, 2024
2159062
Standalone
hartra344 Mar 31, 2024
529e930
Delete NX files
hartra344 Apr 1, 2024
37be08d
Add turbo repo workflow
hartra344 Apr 2, 2024
cc1d66f
Merge branch 'main' into pnpm
hartra344 Apr 2, 2024
257dd19
Fix gitignore mostly
hartra344 Apr 2, 2024
7920ded
Merge branch 'main' into pnpm
hartra344 Apr 2, 2024
7eac6de
Some working tests
hartra344 Apr 3, 2024
7462514
Working unit tests
hartra344 Apr 3, 2024
02f9fd6
Working unit tests
hartra344 Apr 3, 2024
d12c59c
Trying this
hartra344 Apr 3, 2024
2a9a002
Faster!
hartra344 Apr 3, 2024
489c24b
E2E Tests !
hartra344 Apr 3, 2024
d4be63c
E2E test github action fix
hartra344 Apr 3, 2024
c936766
E2E test github action fix
hartra344 Apr 3, 2024
f15ffb6
Merge branch 'main' into pnpm
hartra344 Apr 3, 2024
6bf1708
Fix docs issues
hartra344 Apr 3, 2024
e1e592f
Stuff
hartra344 Apr 3, 2024
5e06cd8
Merge branch 'main' into pnpm
hartra344 Apr 3, 2024
a6e3570
Move data mapper standalone to main standalone app
hartra344 Apr 3, 2024
27a77e0
Buildable vscode extension
hartra344 Apr 3, 2024
5787ff2
Fix tests
hartra344 Apr 3, 2024
27ac99a
Fix build
hartra344 Apr 3, 2024
77a2d9e
Merge branch 'main' into pnpm
hartra344 Apr 3, 2024
17ce9d3
Move vscode build to it's own command
hartra344 Apr 3, 2024
91f550e
Fix e2e tests?
hartra344 Apr 3, 2024
fdcad1c
Merge branch 'main' into pnpm
hartra344 Apr 3, 2024
9f037e0
Actually fix e2e test this time
hartra344 Apr 3, 2024
139bc7c
Stuff
hartra344 Apr 3, 2024
23295b6
Merge branch 'main' into pnpm
hartra344 Apr 3, 2024
82e358a
Stuff
hartra344 Apr 4, 2024
4e4dce8
Add changelog behavior back
hartra344 Apr 4, 2024
015dbea
Fix some things
hartra344 Apr 4, 2024
444ea20
Some things fixed
hartra344 Apr 4, 2024
49b2536
I think this is good
hartra344 Apr 4, 2024
43ee20e
Update Lock file
hartra344 Apr 4, 2024
6ac1e07
Merge branch 'main' into pnpm
hartra344 Apr 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .eslintcache

This file was deleted.

63 changes: 30 additions & 33 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx", "formatjs", "react", "react-hooks"],
"ignorePatterns": [
"**/*"
],
"plugins": [
"formatjs",
"react",
"react-hooks"
],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"files": [
"*.ts",
"*.tsx"
],
"extends": [
"plugin:@nrwl/nx/typescript",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:import/recommended",
Expand Down Expand Up @@ -82,14 +72,26 @@
"formatjs/enforce-placeholders": [
"error",
{
"ignoreList": ["foo"]
"ignoreList": [
"foo"
]
}
],
"no-param-reassign": "off",
"formatjs/enforce-default-message": ["error", "literal"],
"formatjs/enforce-description": ["error", "literal"],
"formatjs/no-multiple-whitespaces": [1],
"formatjs/no-multiple-plurals": ["error"],
"formatjs/enforce-default-message": [
"error",
"literal"
],
"formatjs/enforce-description": [
"error",
"literal"
],
"formatjs/no-multiple-whitespaces": [
1
],
"formatjs/no-multiple-plurals": [
"error"
],
"formatjs/no-complex-selectors": [
"error",
{
Expand All @@ -100,15 +102,10 @@
"react/prop-types": 0
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
},
{
"files": "*.json",
"parser": "jsonc-eslint-parser",
"rules": {}
}
]
}
}
29 changes: 22 additions & 7 deletions .github/workflows/Deploy-Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,29 @@ jobs:
with:
submodules: true

- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-docs-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-docs-

- name: Set up Node.js version 20.x
uses: actions/setup-node@v1
with:
node-version: 20.x
- run: npm ci
working-directory: ./docs
- run: npm run build
working-directory: ./docs

- uses: pnpm/action-setup@v3
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- args: [--global, turbo, typescript]

- run: turbo run build:docs

- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
Expand All @@ -47,8 +62,8 @@ jobs:
action: 'upload'
skip_app_build: true
app_build_command: 'cd docs && npm run build'
app_location: 'docs/build'
output_location: 'docs/build'
app_location: 'apps/docs/build'
output_location: 'apps/docs/build'

close_pull_request_job:
if: (github.event_name == 'pull_request' && github.event.action == 'closed') && github.actor != 'csigs' && github.actor != 'azure-logic-apps-automation'
Expand All @@ -59,6 +74,6 @@ jobs:
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
app_location: 'docs/build'
app_location: 'apps/docs/build'
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
action: 'close'
13 changes: 7 additions & 6 deletions .github/workflows/compile-loc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
run:
name: Compile Localization Files
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'Localized file check-in by OneLocBuild Task')"
if: contains(github.event.head_commit.message, 'Localized file check-in by OneLocBuild Task')

steps:
- name: Checkout repo
Expand All @@ -20,15 +20,16 @@ jobs:
with:
node-version: 20.x

- name: Install dependencies
run: npm ci
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]

- name: Update source code
run: npm run compile:loc

- name: Run Prettier On JSON
run: npm run fixLineEndings

- name: Commit changes
uses: EndBug/add-and-commit@v7
with:
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/package-lock-version-test.yml

This file was deleted.

14 changes: 10 additions & 4 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- args: [--global, turbo, typescript]

- name: Install Playwright Browsers
run: npx playwright install --with-deps
run: pnpm run e2e:setup
- name: Run Playwright tests
run: npx playwright test
run: pnpm run test:e2e
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
66 changes: 38 additions & 28 deletions .github/workflows/production-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
env:
AI_KEY: 3cf0d6ae-3327-414a-b7c1-12f31ef45eff
NX_AI_CON_STR: InstrumentationKey=3cf0d6ae-3327-414a-b7c1-12f31ef45eff;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/
BUMP_COMMAND: npm run bump -- --release-as ${{ github.event.inputs.release_type || 'minor' }}
BUMP_COMMAND: pnpm run bump -- --release-as ${{ github.event.inputs.release_type || 'minor' }}

jobs:
bump-version:
Expand All @@ -37,10 +37,16 @@ jobs:
with:
node-version: 20

- run: npm ci
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- args: [--global, turbo, typescript]

- name: 'Version Bump'
run: git config --global user.email $GITHUB_ACTOR && git config --global user.name release-automation-${GITHUB_ACTOR}@microsoft.com && ${{ env.BUMP_COMMAND }} && npm install
run: git config --global user.email $GITHUB_ACTOR && git config --global user.name release-automation-${GITHUB_ACTOR}@microsoft.com && ${{ env.BUMP_COMMAND }} && pnpm install

- name: Push changes
uses: ad-m/github-push-action@master
Expand All @@ -64,50 +70,46 @@ jobs:
with:
node-version: 20

- run: npm ci
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- args: [--global, turbo, typescript]

- name: 'Local Version Bump'
run: ${{ env.BUMP_COMMAND }} --skip.commit --skip.tag

- name: 'Set Designer Extension VSIX aiKey in package.json'
run: echo "`jq '.aiKey="${{ env.AI_KEY }}"' apps/vs-code-designer/src/package.json`" > apps/vs-code-designer/src/package.json

- run: npm run build:vscode-designer
- run: npm run vscode:designer:pack
# - run: npm run build:vscode-designer
# - run: npm run vscode:designer:pack

- name: 'Get Previous tag'
id: previoustag
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
with:
fallback: 0.0.0

- name: Archive VSIX
uses: actions/upload-artifact@v3
with:
path: |
dist/apps/vs-code-designer/*.vsix
# - name: Archive VSIX
# uses: actions/upload-artifact@v3
# with:
# path: |
# dist/apps/vs-code-designer/*.vsix

- uses: ncipollo/release-action@v1
with:
artifacts: 'LICENSE.md,dist/apps/vs-code-designer/*.vsix'
# artifacts: 'LICENSE.md,dist/apps/vs-code-designer/*.vsix'
artifacts: 'LICENSE.md'
generateReleaseNotes: true
tag: '${{ steps.previoustag.outputs.tag }}'
token: ${{ secrets.AUTOMATION_PAT }}

publish:
needs: bump-version
runs-on: ubuntu-latest
strategy:
matrix:
lib:
[
{ dist: './dist/libs/data-mapper', package: 'data-mapper' },
{ dist: './dist/libs/designer', package: 'designer' },
{ dist: './dist/libs/designer-ui', package: 'designer-ui' },
{ dist: './dist/libs/logic-apps-shared', package: 'logic-apps-shared' },
{ dist: './dist/libs/vscode-extension', package: 'vscode-extension' },
{ dist: './dist/libs/chatbot', package: 'chatbot' },
]
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
Expand All @@ -117,14 +119,22 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 20
- run: npm ci

- uses: pnpm/action-setup@v3
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- args: [--global, turbo, typescript]

- name: 'Local Version Bump'
run: ${{ env.BUMP_COMMAND }} --skip.commit --skip.tag
- run: npm ci
- run: npx nx build ${{ matrix.lib.package }}
- run: pnpm install --frozen-lockfile --strict-peer-dependencies

- name: Use .npmrc
uses: bduff9/[email protected]
with:
dot-npmrc: ${{ secrets.PUBLISHING_PAT }}
working-directory: ${{ matrix.lib.dist }}
- run: cd ${{ matrix.lib.dist }} && npm publish

- run: pnpm run publish --no-git-checks --access public --tag latest
24 changes: 18 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,27 @@ jobs:
with:
fetch-depth: 0

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

- name: Set up Node.js version ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- run: npm ci
- run: npx nx affected --target=lint --parallel
- run: npx nx affected --target=build
- run: npx nx affected --target=test --parallel
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- args: [--global, turbo, typescript]

# - run: npx nx affected --target=lint --parallel
- run: turbo run build --cache-dir=.turbo
- run: turbo run test:lib --cache-dir=.turbo
Loading
Loading