Skip to content

Commit

Permalink
meta(everything): Migrate away from NX (#4499)
Browse files Browse the repository at this point in the history
* Work

* chore(all): Fix designer client service imports from logic-app-shared

* Work

* stuff

* progress

* progress

* Small Adjustment

* More work

* More work

* More work

* Data Mapper

* Standalone

* Delete NX files

* Add turbo repo workflow

* Fix gitignore mostly

* Some working tests

* Working unit tests

* Working unit tests

* Trying this

* Faster!

* E2E Tests !

* E2E test github action fix

* E2E test github action fix

* Fix docs issues

* Stuff

* Move data mapper standalone to main standalone app

* Buildable vscode extension

* Fix tests

* Fix build

* Move vscode build to it's own command

* Fix e2e tests?

* Actually fix e2e test this time

* Stuff

* Stuff

* Add changelog behavior back

* Fix some things

* Some things fixed

* I think this is good

* Update Lock file
  • Loading branch information
hartra344 authored Apr 4, 2024
1 parent 5f18615 commit 8cd7fa0
Show file tree
Hide file tree
Showing 630 changed files with 32,098 additions and 115,920 deletions.
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

0 comments on commit 8cd7fa0

Please sign in to comment.