Skip to content

Commit 24abdbd

Browse files
authored
Merge pull request #6 from codewreaker/development
Development
2 parents 348c5de + f317af3 commit 24abdbd

76 files changed

Lines changed: 4863 additions & 2085 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/mcp.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
{
2-
"mcpServers": {
3-
"nx-mcp": {
4-
"command": "npx",
5-
"args": [
6-
"-y",
7-
"nx-mcp@latest"
8-
]
9-
}
10-
}
2+
"mcpServers": {}
113
}

.cursor/rules/nx-rules.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ alwaysApply: true
66

77
// This file is automatically generated by Nx Console
88

9-
You are in an nx workspace using Nx 21.1.0 and pnpm as the package manager.
9+
You are in an nx workspace using Nx 21.6.5 and pnpm as the package manager.
1010

1111
You have access to the Nx MCP server and the tools it provides. Use them. Follow these guidelines in order to best help the user:
1212

.github/instructions/nx.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ applyTo: '**'
44

55
// This file is automatically generated by Nx Console
66

7-
You are in an nx workspace using Nx 21.1.0 and npm as the package manager.
7+
You are in an nx workspace using Nx 21.1.0 and pnpm as the package manager.
88

99
You have access to the Nx MCP server and the tools it provides. Use them. Follow these guidelines in order to best help the user:
1010

.github/workflows/publish.yml

Lines changed: 153 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
1+
# This workflow automatically versions, builds, tests, and publishes Nx monorepo packages to npm
2+
# It uses OIDC trusted publishing for enhanced security
23
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
34

45
name: "@adenta-npm-publish"
@@ -7,20 +8,18 @@ on:
78
push:
89
branches:
910
- main # Triggers when code is pushed to main branch
10-
tags:
11-
- 'v*.*.*' # Triggers when version tags are pushed
12-
release:
13-
types: [created] # Triggers when a new release is created
1411

1512
jobs:
1613
build:
1714
runs-on: ubuntu-latest
1815
permissions:
19-
contents: write # for tagging
20-
id-token: write # needed for provenance data generation
16+
id-token: write # Required for OIDC trusted publishing
17+
contents: read
2118
steps:
2219
- name: Checkout Repository
2320
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0 # Required for git history
2423

2524
- name: Install pnpm
2625
uses: pnpm/action-setup@v2
@@ -34,42 +33,164 @@ jobs:
3433
cache: "pnpm"
3534
registry-url: https://registry.npmjs.org/
3635

36+
- name: Restore dependencies
37+
uses: actions/cache@v3
38+
with:
39+
path: |
40+
node_modules
41+
packages/*/node_modules
42+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
3743

3844
- name: Install dependencies
39-
run: pnpm install
45+
run: pnpm install --frozen-lockfile
4046
shell: bash
4147

4248
- name: Print Environment Info
4349
run: pnpm exec nx report
4450
shell: bash
4551

52+
- name: Build packages
53+
run: pnpm exec nx run-many --target=build --all
54+
shell: bash
55+
56+
test:
57+
runs-on: ubuntu-latest
58+
permissions:
59+
id-token: write # Required for OIDC trusted publishing
60+
contents: read
61+
steps:
62+
- name: Checkout Repository
63+
uses: actions/checkout@v4
64+
with:
65+
fetch-depth: 0 # Required for git history
66+
67+
- name: Install pnpm
68+
uses: pnpm/action-setup@v2
69+
with:
70+
version: 10
71+
72+
- name: Setup Node
73+
uses: actions/setup-node@v4
74+
with:
75+
node-version: 20
76+
cache: "pnpm"
77+
registry-url: https://registry.npmjs.org/
78+
79+
- name: Restore dependencies
80+
uses: actions/cache@v3
81+
with:
82+
path: |
83+
node_modules
84+
packages/*/node_modules
85+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
86+
87+
- name: Install dependencies
88+
run: pnpm install --frozen-lockfile
89+
shell: bash
90+
4691
- name: Run Tests
47-
run: echo "Test Here"
92+
run: pnpm exec nx run-many --target=test --all
4893
shell: bash
49-
50-
# Todo make this step automated
51-
# - name: Version and Changelog
52-
# run: pnpm exec nx release --skip-publish --specifier prerelease --first-release
53-
# shell: bash
5494

55-
- name: Publish packages
56-
run: pnpm exec nx release publish --verbose
95+
version:
96+
runs-on: ubuntu-latest
97+
permissions:
98+
id-token: write # Required for OIDC trusted publishing
99+
contents: write # Required for committing version changes
100+
steps:
101+
- name: Checkout Repository
102+
uses: actions/checkout@v4
103+
with:
104+
fetch-depth: 0 # Required for git history
105+
token: ${{ secrets.GITHUB_TOKEN }}
106+
107+
- name: Install pnpm
108+
uses: pnpm/action-setup@v2
109+
with:
110+
version: 10
111+
112+
- name: Setup Node
113+
uses: actions/setup-node@v4
114+
with:
115+
node-version: 20
116+
cache: "pnpm"
117+
registry-url: https://registry.npmjs.org/
118+
119+
- name: Restore dependencies
120+
uses: actions/cache@v3
121+
with:
122+
path: |
123+
node_modules
124+
packages/*/node_modules
125+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
126+
127+
- name: Install dependencies
128+
run: pnpm install --frozen-lockfile
129+
shell: bash
130+
131+
- name: Configure Git
132+
run: |
133+
git config user.name "github-actions[bot]"
134+
git config user.email "github-actions[bot]@users.noreply.github.com"
135+
shell: bash
136+
137+
- name: Generate Version and Changelog
138+
run: pnpm exec nx release version --skip-publish
57139
shell: bash
58140
env:
59-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
60-
NPM_CONFIG_PROVENANCE: true
61-
62-
# publish-npm:
63-
# needs: build
64-
# runs-on: ubuntu-latest
65-
# steps:
66-
# - uses: actions/checkout@v4
67-
# - uses: actions/setup-node@v4
68-
# with:
69-
# node-version: ${{ matrix.node-version }}
70-
# registry-url: https://registry.npmjs.org/
141+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142+
143+
- name: Commit Version Changes
144+
run: |
145+
git add .
146+
git diff --staged --quiet || git commit -m "chore(release): update version and changelog"
147+
git push origin main --follow-tags
148+
shell: bash
149+
150+
publish:
151+
needs: [build, test, version]
152+
runs-on: ubuntu-latest
153+
permissions:
154+
id-token: write # Required for OIDC trusted publishing
155+
contents: write # for tagging and releases
156+
steps:
157+
- name: Checkout Repository
158+
uses: actions/checkout@v4
159+
with:
160+
fetch-depth: 0 # Required for git history
161+
162+
- name: Install pnpm
163+
uses: pnpm/action-setup@v2
164+
with:
165+
version: 10
71166

72-
# - name: Install pnpm
73-
# uses: pnpm/action-setup@v2
74-
# with:
75-
# version: 10
167+
- name: Setup Node
168+
uses: actions/setup-node@v4
169+
with:
170+
node-version: 20
171+
cache: "pnpm"
172+
registry-url: https://registry.npmjs.org/
173+
174+
- name: Restore dependencies
175+
uses: actions/cache@v3
176+
with:
177+
path: |
178+
node_modules
179+
packages/*/node_modules
180+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
181+
182+
- name: Install dependencies
183+
run: pnpm install --frozen-lockfile
184+
shell: bash
185+
186+
- name: Ensure npm 11.5.1 or later for trusted publishing
187+
run: npm install -g npm@latest
188+
shell: bash
189+
190+
- name: Publish packages with Nx Release
191+
run: pnpm exec nx release publish --verbose
192+
shell: bash
193+
env:
194+
# No NODE_AUTH_TOKEN needed with trusted publishing!
195+
# OIDC token is automatically generated and used
196+
NPM_CONFIG_PROVENANCE: true

AGENTS.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!-- nx configuration start-->
2+
<!-- Leave the start & end comments to automatically receive updates. -->
3+
4+
# General Guidelines for working with Nx
5+
6+
- When running tasks (for example build, lint, test, e2e, etc.), always prefer running the task through `nx` (i.e. `nx run`, `nx run-many`, `nx affected`) instead of using the underlying tooling directly
7+
- You have access to the Nx MCP server and its tools, use them to help the user
8+
- When answering questions about the repository, use the `nx_workspace` tool first to gain an understanding of the workspace architecture where applicable.
9+
- When working in individual projects, use the `nx_project_details` mcp tool to analyze and understand the specific project structure and dependencies
10+
- For questions around nx configuration, best practices or if you're unsure, use the `nx_docs` tool to get relevant, up-to-date docs. Always use this instead of assuming things about nx configuration
11+
- If the user needs help with an Nx configuration or project graph error, use the `nx_workspace` tool to get any errors
12+
13+
14+
<!-- nx configuration end-->

eslint.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
import nx from '@nx/eslint-plugin';
22

33
export default [
4+
{
5+
files: ['**/*.json'],
6+
// Override or add rules here
7+
rules: {},
8+
languageOptions: {
9+
parser: await import('jsonc-eslint-parser'),
10+
},
11+
},
412
...nx.configs['flat/base'],
513
...nx.configs['flat/typescript'],
614
...nx.configs['flat/javascript'],

migrations.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"migrations": [
3+
{
4+
"version": "21.5.0-beta.2",
5+
"description": "Migrate the legacy 'development' custom condition to a workspace-unique custom condition name.",
6+
"factory": "./src/migrations/update-21-5-0/migrate-development-custom-condition",
7+
"package": "@nx/js",
8+
"name": "migrate-development-custom-condition"
9+
},
10+
{
11+
"version": "21.3.0-beta.3",
12+
"description": "Rename the CLI option `testPathPattern` to `testPathPatterns`.",
13+
"implementation": "./src/migrations/update-21-3-0/rename-test-path-pattern",
14+
"package": "@nx/jest",
15+
"name": "rename-test-path-pattern"
16+
},
17+
{
18+
"version": "21.3.0-beta.3",
19+
"requires": { "jest": ">=30.0.0" },
20+
"description": "Replace removed matcher aliases in Jest v30 with their corresponding matcher",
21+
"implementation": "./src/migrations/update-21-3-0/replace-removed-matcher-aliases",
22+
"package": "@nx/jest",
23+
"name": "replace-removed-matcher-aliases"
24+
}
25+
]
26+
}

nx.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@
3939
}
4040
},
4141
"release": {
42-
"projects": ["packages/cli", "packages/cms", "packages/ui", "packages/core"],
42+
"projects": [
43+
"packages/cli",
44+
"packages/cms",
45+
"packages/ui",
46+
"packages/core"
47+
],
4348
"version": {
4449
"preVersionCommand": "pnpm exec nx run-many -t build -p cli cms ui core",
4550
"manifestRootsToUpdate": ["{projectRoot}", "dist/{projectName}"],

0 commit comments

Comments
 (0)