Skip to content

Commit

Permalink
Merge pull request #461 from ForgeRock/update-nx-19.8
Browse files Browse the repository at this point in the history
chore: update-nx
  • Loading branch information
ryanbas21 authored Oct 1, 2024
2 parents 736608c + e995c40 commit 4f5600f
Show file tree
Hide file tree
Showing 96 changed files with 22,014 additions and 21,969 deletions.
34 changes: 14 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,26 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache/restore@v4
- uses: pnpm/action-setup@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache/save@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
- run: npm install
# This line enables distribution
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
- run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" --verbose

run_install: false
- uses: actions/setup-node@v4
id: cache
with:
node-version: '20.10.0'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- run: npx playwright install
cache: 'pnpm'

- run: pnpm install --frozen-lockfile

# This line enables distribution
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
- run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" --verbose

- run: pnpm exec playwright install

- uses: nrwl/nx-set-shas@v4
# This line is needed for nx affected to work when CI is running on a PR
- run: git branch --track develop origin/develop

- name: Validate all commits from PR
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

- run: npx nx-cloud record -- nx format:check --verbose
- run: npx nx affected -t lint test build e2e-ci --verbose
- run: pnpm exec nx-cloud record -- nx format:check --verbose
- run: pnpm exec nx affected -t build lint test e2e-ci --verbose
21 changes: 10 additions & 11 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,23 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache/restore@v4
- uses: pnpm/action-setup@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
run_install: false

# This line enables distribution
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
- run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"
- run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" --verbose

- uses: actions/setup-node@v4
id: cache
with:
node-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
node-version: '20.10.0'
cache: 'pnpm'

- run: npx playwright install
- uses: nrwl/nx-set-shas@v4
- run: pnpm install

- run: npx nx-cloud record -- nx format:check
- run: npx nx affected -t lint test build e2e-ci
- run: pnpm dlx playwright install

- run: pnpm exec nx-cloud record -- nx format:check --verbose
- run: pnpm exec nx affected -t lint test build e2e-ci --verbose
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
.DS_Store
*/DS_Store
**/*.DS_Store
.pnpm-store/*
# Generated code
tmp/
e2e/**/dist
*/dist/*
dist/*
packages/*/dist/
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run commitlint ${1}
pnpm run commitlint ${1}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

NX_ADD_PLUGINS=false npx lint-staged && NX_ADD_PLUGINS=false npx nx affected:lint && NX_ADD_PLUGINS=false npx nx affected:build
npx lint-staged && npx nx affected:lint && npx nx affected:build
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

NX_ADD_PLUGINS=false npx nx affected:test && NX_ADD_PLUGINS=false npx nx affected:e2e
# CI=true pnpm run nx affected:test && CI=true npx nx affected:e2e
2 changes: 1 addition & 1 deletion .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@


if [ "$2" == "template" ]; then # Only run commitizen if no commit message was already provided.
exec < /dev/tty && npm run commit || true
exec < /dev/tty && pnpm run commit || true
fi
2 changes: 1 addition & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"*": [
"npm run nx format:write"
"pnpm run nx format:write"
]
}
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Fork the repo to your own github account. From there, you can add the ForgeRock

- [ ] Please make all pull requests against `develop` branch.
- [ ] Fill out the Pull Request template that appears when you open a PR.
- [ ] Please ensure `npm run lint` reports no issues.
- [ ] Please ensure `npm run build` reports no issues.
- [ ] Please ensure `npm run test` reports no failures.
- [ ] Please ensure `pnpm run lint` reports no issues.
- [ ] Please ensure `pnpm run build` reports no issues.
- [ ] Please ensure `pnpm run test` reports no failures.
- [ ] Please ensure your PR passes all PR checks.
- [ ] When your PR is ready to merge please rebase your commit into 1 commit.
- [ ] Commits should be verified (meaning you cannot squash your commit on github).
Expand Down
11 changes: 11 additions & 0 deletions e2e/autoscript-apps/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules
*.md
LICENSE
.babelrc
.env*
.bin
dist
*.html
browserslist
.eslintignore
.eslintrc.json
4 changes: 3 additions & 1 deletion e2e/autoscript-apps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
"name": "autoscript-apps",
"version": "0.0.0",
"private": true,
"type": "module",
"dependencies": {
"@forgerock/javascript-sdk": "workspace:*",
"@forgerock/ping-protect": "workspace:*",
"rxjs": "^7.4.0"
},
"description": "apps for e2e on js sdk",
"main": "./src/index.ts",
"license": "ISC",
"repository": {
"type": "git",
Expand Down
34 changes: 8 additions & 26 deletions e2e/autoscript-apps/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
"tags": ["scope:app"],
"targets": {
"build": {
"executor": "@nx/vite:build",
"outputs": ["{options.outputPath}"],
"dependsOn": ["javascript-sdk:build", "ping-protect:build", "^build"],
"inputs": ["default", "^default"],
"outputs": ["{projectRoot}/dist"],
"options": {
"outputPath": "dist/e2e/autoscript-apps"
"outDir": "./dist"
},
"configurations": {
"development": {
Expand All @@ -18,36 +19,17 @@
}
},
"serve": {
"executor": "@nx/vite:dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "autoscript-apps:build",
"hmr": false
},
"configurations": {
"development": {
"buildTarget": "autoscript-apps:build:development",
"hmr": true
},
"production": {
"buildTarget": "autoscript-apps:build:production",
"hmr": false
}
"development": {},
"production": {}
}
},
"preview": {
"executor": "@nx/vite:preview-server",
"defaultConfiguration": "production",
"options": {
"buildTarget": "autoscript-apps:build"
},
"configurations": {
"development": {
"buildTarget": "autoscript-apps:build:development"
},
"production": {
"buildTarget": "autoscript-apps:build:production"
}
"development": {},
"production": {}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/autoscript-apps/src/authn-wellknown/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
<body>
<!-- script src="/_polyfills/fast-text-encoder.js"></script -->

<script src="autoscript.ts"></script>
<script src="autoscript.ts" type="module"></script>
</body>
</html>
23 changes: 0 additions & 23 deletions e2e/autoscript-apps/src/ie11/README.md

This file was deleted.

Binary file removed e2e/autoscript-apps/src/ie11/Registration.png
Binary file not shown.
Binary file removed e2e/autoscript-apps/src/ie11/UsernamePassword.png
Binary file not shown.
33 changes: 0 additions & 33 deletions e2e/autoscript-apps/src/ie11/index.html

This file was deleted.

Loading

0 comments on commit 4f5600f

Please sign in to comment.