From 38feadfbaa007b49d2879ef73f47a0c5d9f63ffb Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 25 Jul 2025 12:15:43 -0700 Subject: [PATCH] simplify CI to use build script --- .github/workflows/build-vscode-extension.yml | 44 +-- .github/workflows/pr_checks.yaml | 395 +++++-------------- packages/config-yaml/package-lock.json | 22 +- packages/config-yaml/package.json | 2 +- packages/continue-sdk/package-lock.json | 9 +- packages/fetch/package-lock.json | 28 +- packages/fetch/package.json | 2 +- packages/openai-adapters/package-lock.json | 67 +++- packages/openai-adapters/package.json | 4 +- scripts/build-packages.ps1 | 29 +- scripts/build-packages.sh | 28 +- 11 files changed, 229 insertions(+), 401 deletions(-) diff --git a/.github/workflows/build-vscode-extension.yml b/.github/workflows/build-vscode-extension.yml index e1c999f7a..9f928bc14 100644 --- a/.github/workflows/build-vscode-extension.yml +++ b/.github/workflows/build-vscode-extension.yml @@ -105,24 +105,7 @@ jobs: path: gui/node_modules key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }} - - name: Cache fetch node_modules - uses: actions/cache@v4 - with: - path: packages/fetch/node_modules - key: ${{ runner.os }}-fetch-node-modules-${{ hashFiles('packages/fetch/package-lock.json') }} - - - name: Cache config-yaml node_modules - uses: actions/cache@v4 - with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - name: Cache openai-adapters node_modules - uses: actions/cache@v4 - with: - path: packages/openai-adapters/node_modules - key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} - + # Build all packages using the authoritative build script - name: Build packages (Windows) run: ./scripts/build-packages.ps1 if: matrix.os == 'windows-latest' @@ -131,31 +114,6 @@ jobs: run: ./scripts/build-packages.sh if: matrix.os != 'windows-latest' - # Install and build packages in dependency order - - name: Install and build fetch - run: | - cd packages/fetch - npm ci - npm run build - - - name: Install and build config-yaml - run: | - cd packages/config-yaml - npm ci - npm run build - - - name: Install and build openai-adapters - run: | - cd packages/openai-adapters - npm ci - npm run build - - - name: Install and build openai-adapters - run: | - cd packages/openai-adapters - npm ci - npm run build - - name: Install extension Dependencies run: | cd extensions/vscode diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 7db77438f..8d00e2487 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -48,12 +48,12 @@ jobs: - name: Check code formatting with Prettier run: npx prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-path .gitignore --ignore-path .prettierignore - install-config-yaml: + build-packages: needs: install-root - runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -61,55 +61,27 @@ jobs: with: node-version-file: ".nvmrc" - - uses: actions/cache@v4 + # Build all packages using the authoritative build script + - name: Build packages (Windows) + run: ./scripts/build-packages.ps1 + if: matrix.os == 'windows-latest' + + - name: Build packages (Unix) + run: ./scripts/build-packages.sh + if: matrix.os != 'windows-latest' + + # Upload built packages as artifacts + - name: Upload built packages + uses: actions/upload-artifact@v4 with: - path: node_modules - key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - - uses: actions/cache@v4 - id: config-yaml-cache - with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - name: Install config-yaml dependencies - if: steps.config-yaml-cache.outputs.cache-hit != 'true' - run: | - cd packages/config-yaml - npm ci - - install-openai-adapters: - needs: install-root - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - - uses: actions/cache@v4 - with: - path: node_modules - key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - - uses: actions/cache@v4 - id: openai-adapters-cache - with: - path: packages/openai-adapters/node_modules - key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} - - - name: Install openai-adapters dependencies - if: steps.openai-adapters-cache.outputs.cache-hit != 'true' - run: | - cd packages/openai-adapters - npm ci + name: built-packages-${{ matrix.os }} + path: | + packages/*/dist/ + packages/*/node_modules/ + retention-days: 1 config-yaml-checks: - needs: install-config-yaml + needs: build-packages runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -123,19 +95,19 @@ jobs: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - uses: actions/cache@v4 - id: config-yaml-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + name: built-packages-ubuntu-latest + path: . - - name: Build and check config-yaml + - name: Check config-yaml run: | cd packages/config-yaml npx tsc --noEmit # Tests are currently failing, commenting out for now - # npm test - npm run build + # npm test install-core: needs: install-root @@ -169,7 +141,7 @@ jobs: npm ci core-checks: - needs: [install-core, install-config-yaml, install-openai-adapters] + needs: [install-core, build-packages] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -179,38 +151,22 @@ jobs: node-version-file: ".nvmrc" - uses: actions/cache@v4 - id: root-cache with: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - uses: actions/cache@v4 - id: core-cache with: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - uses: actions/cache@v4 - id: config-yaml-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + name: built-packages-ubuntu-latest + path: . - - uses: actions/cache@v4 - id: openai-adapters-cache - with: - path: packages/openai-adapters/node_modules - key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} - - - name: Build config-yaml - run: | - cd packages/config-yaml - npm run build - - - name: Build openai-adapters - run: | - cd packages/openai-adapters - npm run build - name: Type check and lint run: | cd core @@ -220,8 +176,7 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} install-gui: - needs: - [install-root, install-core, install-config-yaml, install-openai-adapters] + needs: [install-root, install-core, build-packages] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -246,27 +201,12 @@ jobs: path: gui/node_modules key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} - - uses: actions/cache@v4 - id: config-yaml-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - uses: actions/cache@v4 - id: openai-adapters-cache - with: - path: packages/openai-adapters/node_modules - key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} - - - name: Build config-yaml - run: | - cd packages/config-yaml - npm run build - - - name: Build openai-adapters - run: | - cd packages/openai-adapters - npm run build + name: built-packages-ubuntu-latest + path: . - name: Install gui dependencies if: steps.gui-cache.outputs.cache-hit != 'true' @@ -294,32 +234,16 @@ jobs: key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - uses: actions/cache@v4 - id: gui-cache with: path: gui/node_modules key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} - - uses: actions/cache@v4 - id: openai-adapters-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/openai-adapters/node_modules - key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} - - - uses: actions/cache@v4 - id: config-yaml-cache - with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - name: Build config-yaml - run: | - cd packages/config-yaml - npm run build - - - name: Build openai-adapters - run: | - cd packages/openai-adapters - npm run build + name: built-packages-ubuntu-latest + path: . - name: Type check and lint run: | @@ -328,8 +252,7 @@ jobs: npm run lint binary-checks: - needs: - [install-root, install-core, install-config-yaml, install-openai-adapters] + needs: [install-root, install-core, build-packages] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -354,27 +277,12 @@ jobs: path: binary/node_modules key: ${{ runner.os }}-binary-node-modules-${{ hashFiles('binary/package-lock.json') }} - - uses: actions/cache@v4 - id: config-yaml-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - uses: actions/cache@v4 - id: openai-adapters-cache - with: - path: packages/openai-adapters/node_modules - key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} - - - name: Build config-yaml - run: | - cd packages/config-yaml - npm run build - - - name: Build openai-adapters - run: | - cd packages/openai-adapters - npm run build + name: built-packages-ubuntu-latest + path: . - name: Install binary dependencies if: steps.binary-cache.outputs.cache-hit != 'true' @@ -388,8 +296,7 @@ jobs: npx tsc --noEmit install-vscode: - needs: - [install-root, install-core, install-config-yaml, install-openai-adapters] + needs: [install-root, install-core, build-packages] runs-on: ${{ matrix.os }} strategy: matrix: @@ -417,27 +324,12 @@ jobs: path: extensions/vscode/node_modules key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} - - uses: actions/cache@v4 - id: config-yaml-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - uses: actions/cache@v4 - id: openai-adapters-cache - with: - path: packages/openai-adapters/node_modules - key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} - - - name: Build config-yaml - run: | - cd packages/config-yaml - npm run build - - - name: Build openai-adapters - run: | - cd packages/openai-adapters - npm run build + name: built-packages-${{ matrix.os }} + path: . - name: Install vscode dependencies if: steps.vscode-cache.outputs.cache-hit != 'true' @@ -473,27 +365,12 @@ jobs: path: extensions/vscode/node_modules key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} - - uses: actions/cache@v4 - id: config-yaml-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - uses: actions/cache@v4 - id: openai-adapters-cache - with: - path: packages/openai-adapters/node_modules - key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} - - - name: Build config-yaml - run: | - cd packages/config-yaml - npm run build - - - name: Build openai-adapters - run: | - cd packages/openai-adapters - npm run build + name: built-packages-ubuntu-latest + path: . - name: Type check and lint run: | @@ -508,7 +385,7 @@ jobs: npm run vitest core-tests: - needs: [install-core, install-config-yaml, install-openai-adapters] + needs: [install-core, build-packages] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -522,27 +399,12 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - uses: actions/cache@v4 - id: config-yaml-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - uses: actions/cache@v4 - id: openai-adapters-cache - with: - path: packages/openai-adapters/node_modules - key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} - - - name: Build config-yaml - run: | - cd packages/config-yaml - npm run build - - - name: Build openai-adapters - run: | - cd packages/openai-adapters - npm run build + name: built-packages-ubuntu-latest + path: . - name: Run core tests run: | @@ -585,7 +447,7 @@ jobs: npm test openai-adapters-tests: - needs: install-openai-adapters + needs: build-packages runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -599,11 +461,12 @@ jobs: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - uses: actions/cache@v4 - id: openai-adapters-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/openai-adapters/node_modules - key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} + name: built-packages-ubuntu-latest + path: . - name: Run openai-adapters tests run: | @@ -623,7 +486,7 @@ jobs: vscode-get-test-file-matrix: runs-on: ubuntu-latest - needs: [install-root, install-vscode, install-config-yaml] + needs: [install-root, install-vscode, build-packages] outputs: test_file_matrix: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }} steps: @@ -635,16 +498,12 @@ jobs: path: extensions/vscode/node_modules key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} - - uses: actions/cache@v4 - id: config-yaml-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - name: Build config-yaml - run: | - cd packages/config-yaml - npm run build + name: built-packages-ubuntu-latest + path: . - name: Get test files id: vscode-get-test-file-matrix @@ -671,13 +530,7 @@ jobs: echo "Test files: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }}" vscode-package-extension: - needs: - [ - install-vscode, - install-core, - install-config-yaml, - install-openai-adapters, - ] + needs: [install-vscode, install-core, build-packages] uses: ./.github/workflows/build-vscode-extension.yml with: # Limited platforms for faster PR checks @@ -702,13 +555,7 @@ jobs: vscode-download-e2e-dependencies: runs-on: ubuntu-latest - needs: - [ - install-vscode, - install-core, - install-config-yaml, - install-openai-adapters, - ] + needs: [install-vscode, install-core, build-packages] steps: - uses: actions/checkout@v4 @@ -728,16 +575,12 @@ jobs: path: extensions/vscode/e2e/storage key: ${{ runner.os }}-vscode-storage-${{ hashFiles('extensions/vscode/package-lock.json') }} - - uses: actions/cache@v4 - id: config-yaml-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - name: Build config-yaml - run: | - cd packages/config-yaml - npm run build + name: built-packages-ubuntu-latest + path: . - name: Download Dependencies if: steps.storage-cache.outputs.cache-hit != 'true' @@ -760,8 +603,7 @@ jobs: vscode-package-extension, install-vscode, install-core, - install-config-yaml, - install-openai-adapters, + build-packages, ] runs-on: ubuntu-latest # Tests requiring secrets need approval from maintainers @@ -887,8 +729,7 @@ jobs: path: extensions/vscode/e2e.log gui-tests: - needs: - [install-gui, install-core, install-config-yaml, install-openai-adapters] + needs: [install-gui, install-core, build-packages] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -898,7 +739,6 @@ jobs: node-version-file: ".nvmrc" - uses: actions/cache@v4 - id: gui-cache with: path: gui/node_modules key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} @@ -908,30 +748,14 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - uses: actions/cache@v4 - id: config-yaml-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - uses: actions/cache@v4 - id: openai-adapters-cache - with: - path: packages/openai-adapters/node_modules - key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} - - - name: Build config-yaml - run: | - cd packages/config-yaml - npm run build - - - name: Build openai-adapters - run: | - cd packages/openai-adapters - npm run build + name: built-packages-ubuntu-latest + path: . - name: Install GUI dependencies - if: steps.gui-cache.outputs.cache-hit != 'true' run: cd gui && npm ci env: GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} @@ -942,8 +766,7 @@ jobs: npm test jetbrains-tests: - needs: - [install-root, core-checks, install-config-yaml, install-openai-adapters] + needs: [install-root, core-checks, build-packages] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -952,27 +775,12 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - uses: actions/cache@v4 - id: config-yaml-cache + # Download built packages + - name: Download built packages + uses: actions/download-artifact@v4 with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - uses: actions/cache@v4 - id: openai-adapters-cache - with: - path: packages/openai-adapters/node_modules - key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} - - - name: Build config-yaml - run: | - cd packages/config-yaml - npm run build - - - name: Build openai-adapters - run: | - cd packages/openai-adapters - npm run build + name: built-packages-ubuntu-latest + path: . - name: Setup Java uses: actions/setup-java@v4.5.0 @@ -1087,8 +895,7 @@ jobs: - gui-tests - jetbrains-tests - config-yaml-checks - - install-config-yaml - - install-openai-adapters + - build-packages - openai-adapters-tests steps: diff --git a/packages/config-yaml/package-lock.json b/packages/config-yaml/package-lock.json index 51091ea04..0689fc256 100644 --- a/packages/config-yaml/package-lock.json +++ b/packages/config-yaml/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.96", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "^1.0.14", + "@continuedev/config-types": "file:../config-types", "yaml": "^2.6.1", "zod": "^3.24.2" }, @@ -31,6 +31,18 @@ "zod-to-json-schema": "^3.24.5" } }, + "../config-types": { + "name": "@continuedev/config-types", + "version": "1.0.14", + "license": "Apache-2.0", + "dependencies": { + "zod": "^3.24.2" + }, + "devDependencies": { + "@types/node": "^20.11.19", + "typescript": "^5.5.2" + } + }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", @@ -558,12 +570,8 @@ } }, "node_modules/@continuedev/config-types": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/@continuedev/config-types/-/config-types-1.0.14.tgz", - "integrity": "sha512-PVHyHPyRXd2QsaNgnCpiKYU3uHFTlyuQSkqE8OwrBmQqO6/TXUVIr/2EGtyIZGrml4Y+rGMSH40WU4/0t4SGpQ==", - "dependencies": { - "zod": "^3.23.8" - } + "resolved": "../config-types", + "link": true }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", diff --git a/packages/config-yaml/package.json b/packages/config-yaml/package.json index e0cb53693..ae0dd6d42 100644 --- a/packages/config-yaml/package.json +++ b/packages/config-yaml/package.json @@ -23,7 +23,7 @@ "author": "Continue Dev, Inc.", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "^1.0.14", + "@continuedev/config-types": "file:../config-types", "yaml": "^2.6.1", "zod": "^3.24.2" }, diff --git a/packages/continue-sdk/package-lock.json b/packages/continue-sdk/package-lock.json index e95db526f..7bae25f24 100644 --- a/packages/continue-sdk/package-lock.json +++ b/packages/continue-sdk/package-lock.json @@ -20,10 +20,10 @@ }, "../config-yaml": { "name": "@continuedev/config-yaml", - "version": "1.0.88", + "version": "1.0.96", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "^1.0.14", + "@continuedev/config-types": "file:../config-types", "yaml": "^2.6.1", "zod": "^3.24.2" }, @@ -31,10 +31,15 @@ "config-yaml": "dist/cli.js" }, "devDependencies": { + "@semantic-release/changelog": "^6.0.3", + "@semantic-release/git": "^10.0.1", + "@semantic-release/github": "^9.2.6", + "@semantic-release/npm": "^10.0.6", "@types/jest": "^29.5.14", "@types/node": "^20.0.0", "cross-env": "^7.0.3", "jest": "^29.7.0", + "semantic-release": "^21.1.2", "ts-jest": "^29.2.3", "ts-node": "^10.9.2", "zod-to-json-schema": "^3.24.5" diff --git a/packages/fetch/package-lock.json b/packages/fetch/package-lock.json index b832b32fd..4d56e898b 100644 --- a/packages/fetch/package-lock.json +++ b/packages/fetch/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.15", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "^1.0.5", + "@continuedev/config-types": "file:../config-types", "follow-redirects": "^1.15.6", "http-proxy-agent": "^7.0.2", "https-proxy-agent": "^7.0.5", @@ -20,14 +20,22 @@ "vitest": "^3.2.0" } }, - "node_modules/@continuedev/config-types": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@continuedev/config-types/-/config-types-1.0.5.tgz", - "integrity": "sha512-Uv3JWKmpgSo9cMhZb2hWoJgR2ezuAn3CenEziWT/5d7mddPLzvuuHgFX6aDjLVVMojS1ul0rpfAd2LGxEb6nDQ==", + "../config-types": { + "name": "@continuedev/config-types", + "version": "1.0.14", + "license": "Apache-2.0", "dependencies": { - "zod": "^3.23.8" + "zod": "^3.24.2" + }, + "devDependencies": { + "@types/node": "^20.11.19", + "typescript": "^5.5.2" } }, + "node_modules/@continuedev/config-types": { + "resolved": "../config-types", + "link": true + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", @@ -1585,14 +1593,6 @@ "engines": { "node": ">=8" } - }, - "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } } } } diff --git a/packages/fetch/package.json b/packages/fetch/package.json index 5cd0a38e4..09030cc08 100644 --- a/packages/fetch/package.json +++ b/packages/fetch/package.json @@ -12,7 +12,7 @@ "author": "Nate Sesti and Ty Dunn", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "^1.0.5", + "@continuedev/config-types": "file:../config-types", "follow-redirects": "^1.15.6", "http-proxy-agent": "^7.0.2", "https-proxy-agent": "^7.0.5", diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index 63fb739ff..6d33f90ff 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -11,8 +11,8 @@ "dependencies": { "@aws-sdk/client-bedrock-runtime": "^3.842.0", "@aws-sdk/credential-providers": "^3.840.0", - "@continuedev/config-types": "^1.0.5", - "@continuedev/config-yaml": "^1.0.51", + "@continuedev/config-types": "file:../config-types", + "@continuedev/config-yaml": "file:../config-yaml", "@continuedev/fetch": "file:../fetch", "dotenv": "^16.5.0", "google-auth-library": "^10.1.0", @@ -39,12 +39,51 @@ "vitest": "^3.2.4" } }, + "../config-types": { + "name": "@continuedev/config-types", + "version": "1.0.14", + "license": "Apache-2.0", + "dependencies": { + "zod": "^3.24.2" + }, + "devDependencies": { + "@types/node": "^20.11.19", + "typescript": "^5.5.2" + } + }, + "../config-yaml": { + "name": "@continuedev/config-yaml", + "version": "1.0.96", + "license": "Apache-2.0", + "dependencies": { + "@continuedev/config-types": "file:../config-types", + "yaml": "^2.6.1", + "zod": "^3.24.2" + }, + "bin": { + "config-yaml": "dist/cli.js" + }, + "devDependencies": { + "@semantic-release/changelog": "^6.0.3", + "@semantic-release/git": "^10.0.1", + "@semantic-release/github": "^9.2.6", + "@semantic-release/npm": "^10.0.6", + "@types/jest": "^29.5.14", + "@types/node": "^20.0.0", + "cross-env": "^7.0.3", + "jest": "^29.7.0", + "semantic-release": "^21.1.2", + "ts-jest": "^29.2.3", + "ts-node": "^10.9.2", + "zod-to-json-schema": "^3.24.5" + } + }, "../fetch": { "name": "@continuedev/fetch", "version": "1.0.15", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "^1.0.5", + "@continuedev/config-types": "file:../config-types", "follow-redirects": "^1.15.6", "http-proxy-agent": "^7.0.2", "https-proxy-agent": "^7.0.5", @@ -1352,23 +1391,12 @@ } }, "node_modules/@continuedev/config-types": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/@continuedev/config-types/-/config-types-1.0.14.tgz", - "integrity": "sha512-PVHyHPyRXd2QsaNgnCpiKYU3uHFTlyuQSkqE8OwrBmQqO6/TXUVIr/2EGtyIZGrml4Y+rGMSH40WU4/0t4SGpQ==", - "dependencies": { - "zod": "^3.23.8" - } + "resolved": "../config-types", + "link": true }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.68", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.68.tgz", - "integrity": "sha512-rCegSGkv7Ws7LLnYVVGwXsoVZFpNFJnG6b1dVrj/u+2ZsFdA2leQUNtFGoeE/ixyfhUfBpMlgjEyPrmmy7gLjw==", - "license": "Apache-2.0", - "dependencies": { - "@continuedev/config-types": "^1.0.14", - "yaml": "^2.6.1", - "zod": "^3.24.2" - } + "resolved": "../config-yaml", + "link": true }, "node_modules/@continuedev/fetch": { "resolved": "../fetch", @@ -13202,6 +13230,9 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "dev": true, + "optional": true, + "peer": true, "bin": { "yaml": "bin.mjs" }, diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 838f2e8e7..84eed4d2b 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -14,8 +14,8 @@ "dependencies": { "@aws-sdk/client-bedrock-runtime": "^3.842.0", "@aws-sdk/credential-providers": "^3.840.0", - "@continuedev/config-types": "^1.0.5", - "@continuedev/config-yaml": "^1.0.51", + "@continuedev/config-types": "file:../config-types", + "@continuedev/config-yaml": "file:../config-yaml", "@continuedev/fetch": "file:../fetch", "dotenv": "^16.5.0", "google-auth-library": "^10.1.0", diff --git a/scripts/build-packages.ps1 b/scripts/build-packages.ps1 index c4b48815e..740587330 100755 --- a/scripts/build-packages.ps1 +++ b/scripts/build-packages.ps1 @@ -7,28 +7,37 @@ if ($env:CI -eq "true") { Push-Location packages -# Build fetch first +# Phase 1: Build config-types (foundation - no dependencies) +Push-Location "config-types" +& cmd /c $npmInstallCmd +npm run build +Pop-Location + +# Phase 2: Build packages that depend on config-types Push-Location "fetch" & cmd /c $npmInstallCmd npm run build Pop-Location -# After building fetch, reinstall openai-adapters to pick up the new build -Push-Location "openai-adapters" -& cmd /c $npmInstallCmd -npm run build -Pop-Location - -# Build config-yaml Push-Location "config-yaml" & cmd /c $npmInstallCmd npm run build Pop-Location -# Build llm-info Push-Location "llm-info" & cmd /c $npmInstallCmd npm run build Pop-Location -Pop-Location \ No newline at end of file +# Phase 3: Build packages that depend on other local packages +Push-Location "openai-adapters" +& cmd /c $npmInstallCmd +npm run build +Pop-Location + +Push-Location "continue-sdk" +& cmd /c $npmInstallCmd +npm run build +Pop-Location + +Pop-Location diff --git a/scripts/build-packages.sh b/scripts/build-packages.sh index 978fb90b1..20a7cd22b 100755 --- a/scripts/build-packages.sh +++ b/scripts/build-packages.sh @@ -9,25 +9,35 @@ fi cd packages -# Build fetch first +# Phase 1: Build config-types (foundation - no dependencies) +cd config-types +$NPM_INSTALL_CMD +npm run build +cd .. + +# Phase 2: Build packages that depend on config-types cd fetch $NPM_INSTALL_CMD npm run build cd .. -# After building fetch, reinstall openai-adapters to pick up the new build -cd openai-adapters -$NPM_INSTALL_CMD -npm run build -cd .. - -# Build config-yaml cd config-yaml $NPM_INSTALL_CMD npm run build cd .. -# Build llm-info cd llm-info $NPM_INSTALL_CMD npm run build +cd .. + +# Phase 3: Build packages that depend on other local packages +cd openai-adapters +$NPM_INSTALL_CMD +npm run build +cd .. + +cd continue-sdk +$NPM_INSTALL_CMD +npm run build +cd .. \ No newline at end of file