Merge pull request 'feature/remove-fleet' (#2) from feature/remove-fleet into main
Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
37
.gitea/workflows/test-pr.yml
Normal file
37
.gitea/workflows/test-pr.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Release
|
||||
|
||||
concurrency:
|
||||
cancel-in-progress: true
|
||||
group: test-pr-${{ github.event.pull_request.number }}
|
||||
|
||||
env:
|
||||
ACT_OWNER: ${{ github.repository_owner }}
|
||||
ACT_REPOSITORY: ${{ github.repository }}
|
||||
CGO_ENABLED: 0
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
build_test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- run: git fetch --force --tags
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22
|
||||
- name: Install dependencies
|
||||
run: npm ci --legacy-peer-deps
|
||||
- name: Build libraries
|
||||
run: npx nx run-many -t build
|
||||
- name: Run tests
|
||||
run: npx nx run-many -t test --code-coverage --passWithNoTests
|
||||
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -40,4 +40,8 @@ testem.log
|
||||
Thumbs.db
|
||||
|
||||
.nx/cache
|
||||
.nx/workspace-data
|
||||
.nx/workspace-data
|
||||
vite.config.*.timestamp*
|
||||
.cursor/rules/nx-rules.mdc
|
||||
.github/instructions/nx.instructions.md
|
||||
act_runner*
|
||||
|
||||
175
ai-migrations/MIGRATE_STORYBOOK_10.md
Normal file
175
ai-migrations/MIGRATE_STORYBOOK_10.md
Normal file
@@ -0,0 +1,175 @@
|
||||
# Instructions for LLM: Transform Storybook Config Files from CommonJS to ESM
|
||||
|
||||
## Task Overview
|
||||
|
||||
Find all .storybook/main.ts and .storybook/main.js files in the workspace and transform
|
||||
any CommonJS (CJS) configurations to ES Modules (ESM).
|
||||
|
||||
### Step 1: Find All Storybook Config Files
|
||||
|
||||
Use glob patterns to locate all Storybook main configuration files:
|
||||
**/.storybook/main.js
|
||||
**/.storybook/main.ts
|
||||
|
||||
### Step 2: Identify CommonJS vs ESM
|
||||
|
||||
For each file found, read its contents and determine if it uses CommonJS syntax by
|
||||
checking for:
|
||||
|
||||
CommonJS indicators:
|
||||
|
||||
- `module.exports =` or `module.exports.`
|
||||
- `exports.`
|
||||
- `require()` function calls
|
||||
|
||||
ESM indicators (already correct):
|
||||
|
||||
- export default
|
||||
- export const/export function
|
||||
- import statements
|
||||
|
||||
### Step 3: Transform CJS to ESM
|
||||
|
||||
For each file identified as CommonJS, perform the following transformations:
|
||||
|
||||
A. Convert `module.exports`
|
||||
|
||||
// FROM (CJS):
|
||||
|
||||
```
|
||||
module.exports = {
|
||||
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
|
||||
addons: ['@storybook/addon-essentials']
|
||||
};
|
||||
```
|
||||
|
||||
// TO (ESM):
|
||||
|
||||
```
|
||||
export default {
|
||||
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
|
||||
addons: ['@storybook/addon-essentials']
|
||||
};
|
||||
```
|
||||
|
||||
B. Convert `require()` to import
|
||||
|
||||
// FROM (CJS):
|
||||
|
||||
```
|
||||
const { nxViteTsPaths } = require('@nx/vite/plugins/nx-tsconfig-paths.plugin');
|
||||
const { mergeConfig } = require('vite');
|
||||
```
|
||||
|
||||
// TO (ESM):
|
||||
|
||||
```
|
||||
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
||||
import { mergeConfig } from 'vite';
|
||||
```
|
||||
|
||||
C. Handle `path.join()` patterns
|
||||
|
||||
// FROM (CJS):
|
||||
|
||||
```
|
||||
const path = require('path');
|
||||
const rootMain = require(path.join(__dirname, '../../.storybook/main'));
|
||||
```
|
||||
|
||||
// TO (ESM):
|
||||
|
||||
```
|
||||
import { join } from 'path';
|
||||
import rootMain from '../../.storybook/main';
|
||||
```
|
||||
|
||||
D. Handle Dynamic Requires in Config Functions
|
||||
|
||||
// FROM (CJS):
|
||||
|
||||
```
|
||||
module.exports = {
|
||||
viteFinal: async (config) => {
|
||||
const { mergeConfig } = require('vite');
|
||||
return mergeConfig(config, {});
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
// TO (ESM):
|
||||
|
||||
```
|
||||
import { mergeConfig } from 'vite';
|
||||
|
||||
export default {
|
||||
viteFinal: async (config) => {
|
||||
return mergeConfig(config, {});
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
### Step 4: Validation Checks
|
||||
|
||||
After transformation, verify:
|
||||
|
||||
1. All require() calls have been converted to import statements at the top of the file
|
||||
2. All module.exports have been converted to export default or named exports
|
||||
3. Imports are at the top of the file (before the export)
|
||||
4. The file maintains proper TypeScript typing if it's a .ts file
|
||||
|
||||
### Step 5: Report Results
|
||||
|
||||
Provide a summary of:
|
||||
|
||||
- Total files found
|
||||
- Files that were already ESM (no changes needed)
|
||||
- Files that were transformed from CJS to ESM
|
||||
- List the specific files that were modified
|
||||
|
||||
### Example Complete Transformation
|
||||
|
||||
Before (CJS):
|
||||
|
||||
```
|
||||
const path = require('path');
|
||||
const { mergeConfig } = require('vite');
|
||||
|
||||
module.exports = {
|
||||
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
|
||||
addons: ['@storybook/addon-essentials'],
|
||||
viteFinal: async (config) => {
|
||||
return mergeConfig(config, {
|
||||
resolve: {
|
||||
alias: {}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
After (ESM):
|
||||
|
||||
```
|
||||
import { join } from 'path';
|
||||
import { mergeConfig } from 'vite';
|
||||
|
||||
export default {
|
||||
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
|
||||
addons: ['@storybook/addon-essentials'],
|
||||
viteFinal: async (config) => {
|
||||
return mergeConfig(config, {
|
||||
resolve: {
|
||||
alias: {}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
## Important Notes
|
||||
|
||||
- Preserve all comments in the original files
|
||||
- Maintain the same indentation and formatting style
|
||||
- For TypeScript files (.ts), ensure type imports use import type when appropriate
|
||||
- Test that the transformations don't break the Storybook configuration
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getJestProjects } from '@nx/jest';
|
||||
import { getJestProjectsAsync } from '@nx/jest';
|
||||
|
||||
export default {
|
||||
projects: getJestProjects(),
|
||||
};
|
||||
export default async () => ({
|
||||
projects: await getJestProjectsAsync(),
|
||||
});
|
||||
|
||||
@@ -3,38 +3,28 @@
|
||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/_internal/styles/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/_internal/styles",
|
||||
"main": "libs/_internal/styles/src/index.ts",
|
||||
"tsConfig": "libs/_internal/styles/tsconfig.lib.json",
|
||||
"assets": [
|
||||
"libs/_internal/styles/*.md"
|
||||
]
|
||||
"assets": ["libs/_internal/styles/*.md"]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
],
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"libs/_internal/styles/**/*.ts",
|
||||
"libs/_internal/styles/package.json"
|
||||
]
|
||||
"lintFilePatterns": ["libs/_internal/styles/**/*.ts", "libs/_internal/styles/package.json"]
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"executor": "@nx/jest:jest",
|
||||
"outputs": [
|
||||
"{workspaceRoot}/coverage/{projectRoot}"
|
||||
],
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
"options": {
|
||||
"jestConfig": "libs/_internal/styles/jest.config.ts",
|
||||
"passWithNoTests": true
|
||||
@@ -46,6 +36,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,39 +3,29 @@
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/accordion/src",
|
||||
"projectType": "library",
|
||||
"tags": ["type:component", ""],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/vite:build",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/accordion"
|
||||
}
|
||||
},
|
||||
"publish": {
|
||||
"command": "node tools/scripts/publish.mjs accordion {args.ver} {args.tag}",
|
||||
"dependsOn": [
|
||||
"build"
|
||||
]
|
||||
"dependsOn": ["build"]
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
],
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"libs/accordion/**/*.ts",
|
||||
"libs/accordion/package.json"
|
||||
]
|
||||
"lintFilePatterns": ["libs/accordion/**/*.ts", "libs/accordion/package.json"]
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"executor": "@nx/jest:jest",
|
||||
"outputs": [
|
||||
"{workspaceRoot}/coverage/{projectRoot}"
|
||||
],
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
"options": {
|
||||
"jestConfig": "libs/accordion/jest.config.ts",
|
||||
"passWithNoTests": true
|
||||
@@ -47,9 +37,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"type:component",
|
||||
""
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,38 +3,28 @@
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/container/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/container",
|
||||
"main": "libs/container/src/index.ts",
|
||||
"tsConfig": "libs/container/tsconfig.lib.json",
|
||||
"assets": [
|
||||
"libs/container/*.md"
|
||||
]
|
||||
"assets": ["libs/container/*.md"]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
],
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"libs/container/**/*.ts",
|
||||
"libs/container/package.json"
|
||||
]
|
||||
"lintFilePatterns": ["libs/container/**/*.ts", "libs/container/package.json"]
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"executor": "@nx/jest:jest",
|
||||
"outputs": [
|
||||
"{workspaceRoot}/coverage/{projectRoot}"
|
||||
],
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
"options": {
|
||||
"jestConfig": "libs/container/jest.config.ts",
|
||||
"passWithNoTests": true
|
||||
@@ -60,9 +50,7 @@
|
||||
},
|
||||
"build-storybook": {
|
||||
"executor": "@nx/storybook:build",
|
||||
"outputs": [
|
||||
"{options.outputDir}"
|
||||
],
|
||||
"outputs": ["{options.outputDir}"],
|
||||
"options": {
|
||||
"outputDir": "dist/storybook/container",
|
||||
"configDir": "libs/container/.storybook"
|
||||
@@ -79,6 +67,5 @@
|
||||
"command": "test-storybook -c libs/container/.storybook --url=http://localhost:4400"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
{
|
||||
"migrations": [
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "17.3.0-beta.6",
|
||||
"description": "Updates the nx wrapper.",
|
||||
"implementation": "./src/migrations/update-17-3-0/update-nxw",
|
||||
"package": "nx",
|
||||
"name": "17.3.0-update-nx-wrapper"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "18.0.0-beta.2",
|
||||
"description": "Updates nx.json to disabled adding plugins when generating projects in an existing Nx workspace",
|
||||
"implementation": "./src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces",
|
||||
"x-repair-skip": true,
|
||||
"package": "nx",
|
||||
"name": "18.0.0-disable-adding-plugins-for-existing-workspaces"
|
||||
},
|
||||
{
|
||||
"version": "18.1.0-beta.3",
|
||||
"description": "Moves affected.defaultBase to defaultBase in `nx.json`",
|
||||
"implementation": "./src/migrations/update-17-2-0/move-default-base",
|
||||
"package": "nx",
|
||||
"name": "move-default-base-to-nx-json-root"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "19.2.0-beta.2",
|
||||
"description": "Updates the default workspace data directory to .nx/workspace-data",
|
||||
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory",
|
||||
"package": "nx",
|
||||
"name": "19-2-0-move-graph-cache-directory"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "19.2.2-beta.0",
|
||||
"description": "Updates the nx wrapper.",
|
||||
"implementation": "./src/migrations/update-17-3-0/update-nxw",
|
||||
"package": "nx",
|
||||
"name": "19-2-2-update-nx-wrapper"
|
||||
},
|
||||
{
|
||||
"version": "19.2.4-beta.0",
|
||||
"description": "Set project name in nx.json explicitly",
|
||||
"implementation": "./src/migrations/update-19-2-4/set-project-name",
|
||||
"x-repair-skip": true,
|
||||
"package": "nx",
|
||||
"name": "19-2-4-set-project-name"
|
||||
},
|
||||
{
|
||||
"version": "17.3.0-beta.0",
|
||||
"description": "Move the vitest coverage thresholds in their own object if exists and add reporters.",
|
||||
"implementation": "./src/migrations/update-17-3-0/vitest-coverage-and-reporters",
|
||||
"package": "@nx/vite",
|
||||
"name": "vitest-coverage-and-reporters"
|
||||
},
|
||||
{
|
||||
"version": "17.2.9",
|
||||
"description": "Move executor options to target defaults",
|
||||
"implementation": "./src/migrations/update-17-2-9/move-options-to-target-defaults",
|
||||
"package": "@nx/linter",
|
||||
"name": "move-options-to-target-defaults"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "19.1.0-beta.6",
|
||||
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs",
|
||||
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi",
|
||||
"package": "@nx/eslint-plugin",
|
||||
"name": "update-19-1-0-rename-no-extra-semi"
|
||||
}
|
||||
]
|
||||
}
|
||||
20946
package-lock.json
generated
Normal file
20946
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
99
package.json
99
package.json
@@ -5,64 +5,61 @@
|
||||
"scripts": {},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"lit": "^3.2.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"tslib": "^2.6.3",
|
||||
"zod": "^3.23.8"
|
||||
"lit": "3.3.1",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"tslib": "^2.8.1",
|
||||
"zod": "^4.1.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-decorators": "^7.24.7",
|
||||
"@nx/devkit": "19.5.7",
|
||||
"@nx/eslint-plugin": "19.5.7",
|
||||
"@nx/jest": "19.5.7",
|
||||
"@nx/js": "19.5.7",
|
||||
"@nx/linter": "19.5.7",
|
||||
"@nx/playwright": "19.5.7",
|
||||
"@nx/storybook": "19.5.7",
|
||||
"@nx/vite": "19.5.7",
|
||||
"@nx/web": "19.5.7",
|
||||
"@nx/workspace": "19.5.7",
|
||||
"@playwright/test": "^1.46.0",
|
||||
"@storybook/addon-essentials": "8.2.8",
|
||||
"@storybook/addon-interactions": "8.2.8",
|
||||
"@storybook/core-server": "8.2.8",
|
||||
"@babel/plugin-proposal-decorators": "^7.28.0",
|
||||
"@nx/devkit": "22.1.3",
|
||||
"@nx/eslint-plugin": "22.1.3",
|
||||
"@nx/jest": "22.1.3",
|
||||
"@nx/js": "22.1.3",
|
||||
"@nx/playwright": "22.1.3",
|
||||
"@nx/storybook": "22.1.3",
|
||||
"@nx/vite": "22.1.3",
|
||||
"@nx/web": "22.1.3",
|
||||
"@nx/workspace": "22.1.3",
|
||||
"@playwright/test": "^1.57.0",
|
||||
"@storybook/jest": "0.2.3",
|
||||
"@storybook/test-runner": "0.19.1",
|
||||
"@storybook/test-runner": "0.24.2",
|
||||
"@storybook/testing-library": "0.2.2",
|
||||
"@storybook/web-components": "^8.2.8",
|
||||
"@storybook/web-components-vite": "8.2.8",
|
||||
"@storybook/web-components-webpack5": "8.2.8",
|
||||
"@swc-node/register": "~1.10.9",
|
||||
"@swc/core": "~1.7.10",
|
||||
"@swc/helpers": "~0.5.12",
|
||||
"@swc/jest": "~0.2.36",
|
||||
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/node": "22.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "8.0.1",
|
||||
"@typescript-eslint/parser": "8.0.1",
|
||||
"@storybook/web-components": "^10",
|
||||
"@storybook/web-components-vite": "^10",
|
||||
"@swc-node/register": "~1.11.1",
|
||||
"@swc/core": "~1.15.3",
|
||||
"@swc/helpers": "~0.5.17",
|
||||
"@swc/jest": "0.2.39",
|
||||
"@trivago/prettier-plugin-sort-imports": "^6.0.0",
|
||||
"@types/jest": "30.0.0",
|
||||
"@types/node": "24.10.1",
|
||||
"@typescript-eslint/eslint-plugin": "8.48.0",
|
||||
"@typescript-eslint/parser": "8.48.0",
|
||||
"@vitest/coverage-c8": "~0.33.0",
|
||||
"@vitest/ui": "2.0.5",
|
||||
"eslint": "9.9.0",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-plugin-playwright": "^1.6.2",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"jest-environment-node": "^29.7.0",
|
||||
"jsdom": "~24.1.1",
|
||||
"nx": "19.5.7",
|
||||
"prettier": "^3.3.3",
|
||||
"rxjs": "^7.8.1",
|
||||
"storybook": "^8.2.8",
|
||||
"@vitest/ui": "4.0.14",
|
||||
"eslint": "9.39.1",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"eslint-plugin-playwright": "^2.3.0",
|
||||
"jest": "30.2.0",
|
||||
"jest-environment-jsdom": "30.2.0",
|
||||
"jest-environment-node": "^30.2.0",
|
||||
"jest-util": "30.2.0",
|
||||
"jiti": "2.6.1",
|
||||
"jsdom": "~27.2.0",
|
||||
"nx": "22.1.3",
|
||||
"prettier": "^3.7.1",
|
||||
"rxjs": "^7.8.2",
|
||||
"storybook": "10.1.2",
|
||||
"swc-loader": "0.2.6",
|
||||
"ts-jest": "^29.2.4",
|
||||
"ts-jest": "29.4.5",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.5.4",
|
||||
"verdaccio": "^5.32.1",
|
||||
"vite": "5.4.0",
|
||||
"vite-plugin-dts": "4.0.2",
|
||||
"vitest": "2.0.5"
|
||||
"typescript": "5.9.3",
|
||||
"verdaccio": "6.2.3",
|
||||
"vite": "7.2.4",
|
||||
"vite-plugin-dts": "4.5.4",
|
||||
"vitest": "4.0.14"
|
||||
},
|
||||
"nx": {
|
||||
"includedScripts": []
|
||||
|
||||
14747
pnpm-lock.yaml
generated
14747
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user