Skip to content

Commit

Permalink
Merge pull request #502 from ForgeRock/changeset-release/master
Browse files Browse the repository at this point in the history
Release PR
  • Loading branch information
ryanbas21 authored Dec 11, 2024
2 parents 836665e + 0c41d9c commit 2f40d0c
Show file tree
Hide file tree
Showing 167 changed files with 8,795 additions and 987 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
26 changes: 26 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "forgerock/forgerock-javascript-sdk"
}
],
"commit": false,
"fixed": [["@forgerock/javascript-sdk", "@forgerock/ping-protect"]],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": [
"@forgerock/device-client",
"autoscript-apps",
"autoscript-suites",
"davinci-app",
"mock-api",
"token-vault-app",
"@forgerock/token-vault-interceptor",
"token-vault-proxy",
"token-vault-suites"
]
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
pnpm-lock.yaml
20 changes: 2 additions & 18 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
"warn",
{
"enforceBuildableLibDependency": true,
"allow": [
Expand All @@ -15,10 +15,6 @@
"@angular/forms"
],
"depConstraints": [
{
"sourceTag": "scope:sample",
"onlyDependOnLibsWithTags": ["scope:sdk"]
},
{
"sourceTag": "scope:app",
"onlyDependOnLibsWithTags": [
Expand All @@ -31,25 +27,13 @@
"sourceTag": "scope:e2e",
"onlyDependOnLibsWithTags": ["scope:sdk, scope:app"]
},
{
"sourceTag": "scope:lib",
"onlyDependOnLibsWithTags": [
"scope:sdk",
"scope:types",
"scope:lib"
]
},
{
"sourceTag": "scope:sdk",
"onlyDependOnLibsWithTags": []
},
{
"sourceTag": "scope:package",
"onlyDependOnLibsWithTags": [
"scope:sdk",
"scope:lib",
"scope:types"
]
"onlyDependOnLibsWithTags": ["scope:sdk"]
},
{
"sourceTag": "scope:token-vault",
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,12 @@ jobs:

- run: pnpm exec nx-cloud record -- nx format:check --verbose
- run: pnpm exec nx affected -t build lint test e2e-ci --verbose

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: |
./dist/.playwright/**
./dist/**
retention-days: 30
49 changes: 0 additions & 49 deletions .github/workflows/merge.yml

This file was deleted.

95 changes: 95 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Publish
on:
push:
branches:
- master
- develop
env:
NX_CLOUD_ENCRYPTION_KEY: ${{ secrets.NX_CLOUD_ENCRYPTION_KEY }}
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
NX_CLOUD_DISTRIBUTED_EXECUTION: true
PNPM_CACHE_FOLDER: .pnpm-store
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
HUSKY: 0

jobs:
publish-or-pr:
permissions:
contents: write # to create release (changesets/action)
issues: write # to post issue comments (changesets/action)
pull-requests: write # to create pull request (changesets/action)
id-token: write # give id token write for provenance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
run_install: false
- uses: actions/setup-node@v4
id: cache
with:
node-version: '20.10.0'
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
with:
main-branch-name: master

- name: setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER

- run: pnpm exec nx-cloud record -- nx format:check --verbose
- run: pnpm exec nx affected -t build lint test e2e-ci --verbose

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: |
./dist/.playwright/**
./dist/**
retention-days: 30

- run: git status
- name: publish
uses: changesets/action@v1
id: changesets
with:
publish: pnpm ci:release
version: pnpm ci:version
title: Release PR
branch: master
commit: 'chore: version-packages'
setupGitUser: true
env:
# See https://github.com/changesets/action/issues/147
HOME: ${{ github.workspace }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: 'true'
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

- name: rebase develop with main on publish
if: ${{ steps.changesets.outputs.published == 'true' }}
run: |
git restore .
git checkout master
git fetch --all
git pull origin master
git checkout develop
git restore .
git rebase master
git push -f
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,15 @@ docs/packages/javascript-sdk
.nx/*
!.nx/workflows
**/vite.config.ts.timestamp-*

vite.config.*.timestamp*

# File made by changesets
.netrc
# ignore this in CI please.
# Nx stuff we get in CI that we dont want to commit
code
terminalOutput
outputs/*


6 changes: 6 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0)
}
const husky = (await import('husky')).default
console.log(husky.install())
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
link-workspace-packages=true
strict-peer-dependencies=false
save-workspace-protocol=rolling
save-prefix=""
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
/.nx/cache
package-lock.json
*/*/package-lock.json

.husky/*
/.nx/workspace-data
1 change: 1 addition & 0 deletions e2e/autoscript-apps/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
</head>
<body>
<a href="./src/authn-basic/index.html">AuthN: Basic</a><br />
<a href="./src/authn-basic-self-service/">AuthN: Self Service</a><br />
<a href="./src/authn-central-login/index.html">AuthN: Central Login</a><br />
<a href="./src/authn-central-logout/index.html">AuthN: Central Logout Ping</a><br />
<a href="./src/authn-device-profile/index.html">AuthN: Device Profile</a><br />
Expand Down
1 change: 1 addition & 0 deletions e2e/autoscript-apps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"type": "module",
"dependencies": {
"@forgerock/javascript-sdk": "workspace:*",
"@forgerock/device-client": "workspace:*",
"@forgerock/ping-protect": "workspace:*",
"rxjs": "^7.4.0"
},
Expand Down
1 change: 0 additions & 1 deletion e2e/autoscript-apps/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"tags": ["scope:app"],
"targets": {
"build": {
"dependsOn": ["javascript-sdk:build", "ping-protect:build", "^build"],
"inputs": ["default", "^default"],
"outputs": ["{projectRoot}/dist"],
"options": {
Expand Down
Loading

0 comments on commit 2f40d0c

Please sign in to comment.