From 1005106d5b85ab30b64d5ea26674393c365be8ee Mon Sep 17 00:00:00 2001 From: Alexander Gilin Date: Tue, 12 May 2026 14:31:54 +0300 Subject: [PATCH 1/4] ci: migrate from CircleCI to GitHub Actions - Add CI workflow: matrix build/test on Node 22.x and 24.x, REUSE compliance, commitlint, Coveralls upload, and a dedicated lint job - Add release workflow: builds .vsix, publishes GitHub Release and npm package via Trusted Publisher (OIDC, no stored token) - Remove .circleci/config.yml and backend/.nycrc.json - Migrate coverage tooling from nyc to c8 (.c8rc.json, .mocharc.yml) - Update test script to use c8 mocha with correct include/exclude paths - Update webpack configs for copy-webpack-plugin v12 API - Update frontend to Jest 29 / Vue 3 (jest.config.js extracted) - Remove prepublishOnly hook from guided-development-types; types are copied explicitly in the release workflow instead - Add .nvmrc (Node 22) and .github/dependabot.yml (weekly actions updates) --- .circleci/config.yml | 154 ------------------------ .github/dependabot.yml | 6 + .github/workflows/ci.yml | 95 +++++++++++++++ .github/workflows/release.yml | 53 ++++++++ .nvmrc | 1 + backend/.c8rc.json | 22 ++++ backend/.mocharc.yml | 3 + backend/.nycrc.json | 15 --- backend/copy.frontend.webpack.config.js | 8 +- backend/package.json | 30 +++-- backend/webpack.config.js | 12 +- frontend/jest.config.js | 9 +- frontend/package.json | 16 +-- guided-development-types/package.json | 9 +- 14 files changed, 221 insertions(+), 212 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml create mode 100644 .nvmrc create mode 100644 backend/.c8rc.json create mode 100644 backend/.mocharc.yml delete mode 100644 backend/.nycrc.json diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 1e86af7..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,154 +0,0 @@ -version: 2.1 # use CircleCI 2.1 - -default-build: &default-build - working_directory: ~/repo - steps: - - checkout - - run: - name: install frontend - working_directory: frontend - command: npm install - - run: - name: build frontend - working_directory: frontend - command: npm run build - - run: - name: test frontend - working_directory: frontend - command: npm run test - - run: - name: build backend - working_directory: backend - command: npm run backend - - run: - name: test backend - working_directory: backend - command: npm run test - -jobs: # a collection of steps - build-and-test-node12: - docker: - - image: cimg/node:14.17 - <<: *default-build - - compliance: - docker: - - image: cimg/python:3.10.0 - working_directory: ~/workdir - steps: - - checkout - - run: - name: compliance check - command: | - pip3 install --user reuse - ~/.local/bin/reuse lint - build-and-test: - docker: - - image: cimg/node:16.19 - working_directory: ~/repo - steps: - - checkout - - restore_cache: - key: dependency-cache-{{ checksum "backend/package.json" }}-{{ checksum "frontend/package.json" }} - - run: - name: install frontend - working_directory: frontend - command: npm install - - run: - name: build frontend - working_directory: frontend - command: npm run build - - run: - name: test frontend - working_directory: frontend - command: npm run test - - store_artifacts: # special step to save test results as as artifact - path: frontend/coverage - destination: frontend-coverage - - run: - name: build backend - working_directory: backend - command: npm run backend - - run: - name: prepare frontend artifact - working_directory: backend - command: npm run frontend:copy - - run: - name: webpack backend - working_directory: backend - command: npm run webpack-prod - - run: - name: create .vsix - working_directory: backend - command: npx vsce package . - - run: - name: test backend - working_directory: backend - command: npm run test - - store_artifacts: # special step to save test results as as artifact - # Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/ - path: backend/reports/coverage/lcov-report - destination: backend-coverage - - run: - name: copy frontend coverage - command: cp ./frontend/coverage/lcov.info ./backend/reports/coverage/lcov_frontend.info - - run: - name: merge frontend and backend coverage - command: ./backend/node_modules/.bin/lcov-result-merger './backend/reports/coverage/lco*.info' './backend/reports/coverage/lcov_merged.info' - - run: - command: cat ./backend/reports/coverage/lcov_merged.info | ./backend/node_modules/.bin/coveralls - environment: - COVERALLS_SERVICE_NAME: circle-ci - COVERALLS_GIT_BRANCH: ${CIRCLE_BRANCH} - - run: - name: Define environment variable with lastest commit's message - command: | - echo 'export COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s")' >> $BASH_ENV - source $BASH_ENV - - run: - name: Lint commit message - working_directory: backend - command: echo "$COMMIT_MESSAGE" | npx commitlint - - save_cache: - paths: - - backend/node_modules - - frontend/node_modules - key: dependency-cache-{{ checksum "backend/package.json" }}-{{ checksum "frontend/package.json" }} - - persist_to_workspace: - root: backend - paths: - # https://golang.org/pkg/path/filepath/#Match - - guided-development-* - - store_test_results: # for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/ - path: test-results.xml - - deploy: - docker: - - image: cimg/go:1.17 - steps: - - attach_workspace: - at: ./dist - - run: - name: "Publish Release on GitHub" - command: | - echo 'export GOPATH=~/go' >> $BASH_ENV - go get github.com/tcnksm/ghr - ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${CIRCLE_TAG} ./dist/ - -workflows: - version: 2 - test-deploy: - jobs: - - compliance - - build-and-test: - filters: - tags: - only: /.*/ - - deploy: - requires: - - build-and-test - filters: - tags: - only: /^v[0-9]+(\.[0-9]+)*/ - branches: - ignore: /.*/ diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ca79ca5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..741bdd9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,95 @@ +name: CI + +on: + push: + branches: ['master*'] + pull_request: + workflow_dispatch: + +env: + retention-comment: This comment will be **updated** with the data of the **last successful** build of this PR. + +jobs: + compliance: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: REUSE compliance check + run: | + pip install reuse + reuse lint + + build-and-test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: ['22.x', '24.x'] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: | + backend/node_modules + frontend/node_modules + key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('backend/package.json', 'frontend/package.json') }} + - name: Install & build frontend + working-directory: frontend + run: npm install && npm run build + - name: Test frontend + working-directory: frontend + run: npm run test + - name: Build backend + working-directory: backend + run: npm run backend + - name: Copy frontend artifact + working-directory: backend + run: npm run frontend:copy + - name: Webpack backend + working-directory: backend + run: npm run webpack-prod + - name: Create .vsix + working-directory: backend + run: npx vsce package . + - name: Test backend + working-directory: backend + run: npm run test + - name: Merge coverage reports + run: | + cp ./frontend/coverage/lcov.info ./backend/reports/coverage/lcov_frontend.info + ./backend/node_modules/.bin/lcov-result-merger './backend/reports/coverage/lco*.info' './backend/reports/coverage/lcov_merged.info' + - name: Upload coverage to Coveralls + if: matrix.node-version == '24.x' + uses: coverallsapp/github-action@v2 + with: + file: backend/reports/coverage/lcov_merged.info + - name: Lint commit message + if: github.event_name == 'push' + working-directory: backend + run: echo "${{ github.event.head_commit.message }}" | npx commitlint + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '24.x' + - name: Install backend dependencies + working-directory: backend + run: npm install + - name: Lint backend + working-directory: backend + run: npm run lint + - name: Install frontend dependencies + working-directory: frontend + run: npm install + - name: Lint frontend + working-directory: frontend + run: npm run lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..20875a0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,53 @@ +name: Release + +on: + push: + tags: + - 'v[0-9]+*' + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write # required for gh release create + id-token: write # required for npm provenance (OIDC) + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '24.x' + registry-url: 'https://registry.npmjs.org' + + - name: Install & build frontend + working-directory: frontend + run: npm install && npm run build + + - name: Build backend + working-directory: backend + run: npm run backend + + - name: Copy types artifact + run: cp -r backend/out guided-development-types/out + + - name: Copy frontend artifact + working-directory: backend + run: npm run frontend:copy + + - name: Webpack backend + working-directory: backend + run: npm run webpack-prod + + - name: Create .vsix + working-directory: backend + run: npx vsce package . + + - name: Publish GitHub Release + run: gh release create "${{ github.ref_name }}" backend/guided-development-*.vsix --title "${{ github.ref_name }}" --generate-notes + env: + GH_TOKEN: ${{ github.token }} + + - name: Publish npm package + working-directory: guided-development-types + run: npm publish --provenance --access public diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2bd5a0a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22 diff --git a/backend/.c8rc.json b/backend/.c8rc.json new file mode 100644 index 0000000..b5389f5 --- /dev/null +++ b/backend/.c8rc.json @@ -0,0 +1,22 @@ +{ + "include": ["out/src/**/*.js"], + "exclude": [ + "out/src/logger/*.js", + "out/src/panels/*.js", + "out/src/webSocketServer/*.js", + "out/src/output-channel-log.js", + "out/src/youi-adapter.js", + "out/src/center/*.js", + "out/src/Collection.js", + "out/src/app-events.js", + "out/src/app-log.js" + ], + "reporter": ["lcov", "text"], + "all": true, + "report-dir": "./reports/coverage", + "check-coverage": true, + "branches": 74, + "lines": 97, + "functions": 97, + "statements": 97 +} diff --git a/backend/.mocharc.yml b/backend/.mocharc.yml new file mode 100644 index 0000000..8bc9f9e --- /dev/null +++ b/backend/.mocharc.yml @@ -0,0 +1,3 @@ +spec: "out/tests/**/*.spec.js" +recursive: true +timeout: 80000 diff --git a/backend/.nycrc.json b/backend/.nycrc.json deleted file mode 100644 index 2b480a8..0000000 --- a/backend/.nycrc.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "require": ["ts-node/register/transpile-only"], - "include": ["src/**/*.ts"], - "exclude": ["src/logger/*.ts", "src/panels/*.ts", "src/webSocketServer/*.ts", "src/output-channel-log.ts", "src/youi-adapter.ts", "src/center/*.ts"], - "reporter": ["lcov", "text"], - "extension": [".ts"], - "all": true, - "temp-dir": "./reports/.nyc_output", - "report-dir": "./reports/coverage", - "check-coverage": true, - "branches": 74, - "lines": 97, - "functions": 97, - "statements": 97 - } diff --git a/backend/copy.frontend.webpack.config.js b/backend/copy.frontend.webpack.config.js index cd7cd81..4cbe7ee 100644 --- a/backend/copy.frontend.webpack.config.js +++ b/backend/copy.frontend.webpack.config.js @@ -10,9 +10,11 @@ const config = { entry: "./src/dummy.js", output: {path: path.resolve(__dirname, 'dummy')}, plugins: [ - new CopyPlugin([ - { from: '../frontend/dist/', to: '../dist/media/', force: true } - ]), + new CopyPlugin({ + patterns: [ + { from: '../frontend/dist/', to: '../dist/media/', force: true } + ] + }), ] }; module.exports = config; \ No newline at end of file diff --git a/backend/package.json b/backend/package.json index bc55a22..09d10e6 100644 --- a/backend/package.json +++ b/backend/package.json @@ -17,7 +17,8 @@ }, "icon": "icon.png", "engines": { - "vscode": "^1.46.0" + "vscode": "^1.46.0", + "node": ">=22.0.0" }, "categories": [ "Other" @@ -137,7 +138,7 @@ "compile": "tsc -p ./", "watch": "tsc -watch -p ./", "package": "npm run webpack && vsce package", - "test": "nyc mocha -p tsconfig.json --opts ./mocha.opts", + "test": "tsc -p tsconfig.json && c8 mocha", "ws:run": "node ./out/src/webSocketServer/index.js", "lint": "eslint . --ext .ts,.tsx --cache", "lint:fix": "eslint . --ext .ts,.tsx --cache --fix" @@ -158,41 +159,38 @@ "ws": "7.4.6" }, "devDependencies": { - "@commitlint/cli": "11.0.0", - "@commitlint/config-conventional": "12.0.1", + "@commitlint/cli": "^19.0.0", + "@commitlint/config-conventional": "^19.0.0", "@types/chai": "^4.2.9", "@types/fs-extra": "^9.0.11", "@types/inquirer": "^7.3.1", "@types/lodash": "^4.14.170", - "@types/mocha": "^5.2.7", - "@types/node": "^10.17.21", + "@types/mocha": "^10.0.0", + "@types/node": "^22.0.0", "@types/object-hash": "^2.1.0", "@types/sinon": "^9.0.10", "@types/vscode": "^1.46.0", "@types/ws": "^7.4.4", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", - "bufferutil": "^4.0.1", + "@vscode/vsce": "^3.0.0", "chai": "^4.2.0", - "copy-webpack-plugin": "^5.0.5", - "coveralls": "3.1.0", + "copy-webpack-plugin": "^12.0.0", + "c8": "^10.0.0", "cz-conventional-changelog": "3.3.0", "eslint": "^7.21.0", "eslint-config-prettier": "^8.1.0", "husky": "4.3.8", "lcov-result-merger": "3.1.0", - "mocha": "^6.2.2", - "nyc": "^15.1.0", + "mocha": "^10.0.0", "prettier": "^2.0.5", "sinon": "^9.2.1", "string-replace-loader": "^3.0.1", - "ts-loader": "^8.0.17", - "ts-node": "^9.1.1", + "ts-loader": "^9.0.0", "typescript": "^4.2.3", "utf-8-validate": "^5.0.2", - "vsce": "1.88.0", - "webpack": "5.38.1", - "webpack-cli": "^4.7.2" + "webpack": "^5.75.0", + "webpack-cli": "^5.0.0" }, "husky": { "hooks": { diff --git a/backend/webpack.config.js b/backend/webpack.config.js index c93adb5..b5b746a 100644 --- a/backend/webpack.config.js +++ b/backend/webpack.config.js @@ -44,11 +44,13 @@ const config = { ] }, plugins: [ - new CopyPlugin([ - { from: '../frontend/dist/', to: 'media/', force: true }, - { from: '../LICENSES/', to: 'LICENSES/', force: true }, - { from: '../README.md', to: 'README.md', toType: "file", force: true } - ]) + new CopyPlugin({ + patterns: [ + { from: '../frontend/dist/', to: 'media/', force: true }, + { from: '../LICENSES/', to: 'LICENSES/', force: true }, + { from: '../README.md', to: 'README.md', toType: "file", force: true } + ] + }) ] }; module.exports = config; diff --git a/frontend/jest.config.js b/frontend/jest.config.js index 3412afa..659d51b 100644 --- a/frontend/jest.config.js +++ b/frontend/jest.config.js @@ -1,6 +1,7 @@ module.exports = { verbose: true, collectCoverage: true, + testEnvironment: 'jsdom', collectCoverageFrom: [ "src/**/*.{js,vue}", @@ -38,10 +39,6 @@ module.exports = { "^.+\\.mjs$": "/node_modules/babel-jest", }, - snapshotSerializers: [ - "/node_modules/jest-serializer-vue" - ], - coverageThreshold: { "global": { "branches": 17, @@ -49,7 +46,5 @@ module.exports = { "lines": 32, "statements": 32 } - }, - - preset: '@vue/cli-plugin-unit-jest' + } } diff --git a/frontend/package.json b/frontend/package.json index aa0d56b..1ce5ed0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -6,12 +6,15 @@ "license": "Apache 2.0", "description": "Frontend for the Guided Development framework", "private": true, + "engines": { + "node": ">=22.0.0" + }, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "build-dev": "vue-cli-service build --mode development", "lint": "vue-cli-service lint", - "test": "vue-cli-service test:unit", + "test": "jest", "precommit": "lint-staged" }, "dependencies": { @@ -34,23 +37,22 @@ "@sap-devx/webview-rpc": "^0.3.1", "@vue/cli-plugin-babel": "^5.0.0", "@vue/cli-plugin-eslint": "^5.0.0", - "@vue/cli-plugin-unit-jest": "~5.0.0", "@vue/cli-service": "^5.0.0", "@vue/test-utils": "^2.4.0", - "@vue/vue3-jest": "^27.0.0-alpha.1", + "@vue/vue3-jest": "^29.0.0", "babel-eslint": "^10.0.1", - "babel-jest": "^27.0.5", + "babel-jest": "^29.0.0", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3", "husky": "1.2.1", - "jest": "^27.0.5", - "jest-serializer-vue": "^2.0.2", + "jest": "^29.0.0", + "jest-environment-jsdom": "^29.0.0", "lint-staged": "^15.0.2", "mock-socket": "^9.0.2", "sass": "^1.26.3", "sass-loader": "^8.0.2", "vue-template-compiler": "^2.6.10", - "webpack-plugin-vuetify": "^2.0.0", + "webpack-plugin-vuetify": "^3.1.0", "webpack": "^5.0.0" }, "eslintConfig": { diff --git a/guided-development-types/package.json b/guided-development-types/package.json index f352c46..9a9290b 100644 --- a/guided-development-types/package.json +++ b/guided-development-types/package.json @@ -12,13 +12,12 @@ }, "main": "./out/src/types", "types": "./out/src/types", + "engines": { + "node": ">=22.0.0" + }, "scripts": { - "prep": "npm i && cd ../backend && npm i && npm run compile", - "copy": "ncp ../backend/out out", - "prepublishOnly": "npm run prep && npm run copy" }, "devDependencies": { - "@sap-devx/app-studio-toolkit-types": "1.2.1", - "ncp": "^2.0.0" + "@sap-devx/app-studio-toolkit-types": "1.2.1" } } From 99354409d4055ce2dbf372b7faf1d2c7596618d5 Mon Sep 17 00:00:00 2001 From: Alexander Gilin Date: Tue, 12 May 2026 14:32:20 +0300 Subject: [PATCH 2/4] docs: update README and CONTRIBUTING for GitHub Actions migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace CircleCI badge with GitHub Actions CI badge; remove dead LGTM badge and deprecated api.dependabot.com badge - Fix Node.js requirement (10 → 22) and VSCode requirement (1.39.2 → 1.46.0) - Expand Description to list all three core packages including guided-development-types with npm link - Add Sample Contributors section documenting all six example extensions with a table ordered from simplest to most complex - Add Release Process section to CONTRIBUTING.md: how to trigger a release, where to monitor it, and one-time npm Trusted Publisher setup --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++++++ README.md | 30 ++++++++++++++++++++++++------ 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0d42597..9c30e52 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,3 +30,31 @@ Due to legal reasons, contributors will be asked to accept a DCO before they sub As artificial intelligence evolves, AI-generated code is becoming valuable for many software projects, including open-source initiatives. While we recognize the potential benefits of incorporating AI-generated content into our open-source projects there a certain requirements that need to be reflected and adhered to when making contributions. Please see our [guideline for AI-generated code contributions to SAP Open Source Software Projects](https://github.com/SAP/.github/blob/main/CONTRIBUTING_USING_GENAI.md) for these requirements. + +## Release Process + +Releases are triggered by pushing a version tag. Only maintainers with push access to the repository can do this. + +### Steps to release + +1. Bump the version in `backend/package.json` and `guided-development-types/package.json` and commit to `master`. +2. Push a version tag: + ```bash + git tag v1.2.3 + git push origin v1.2.3 + ``` +3. The [Release workflow](https://github.com/SAP/guided-development/actions/workflows/release.yml) starts automatically. You can follow its progress in the **Actions** tab. +4. Once complete: + - A new [GitHub Release](https://github.com/SAP/guided-development/releases) is created with the `.vsix` file attached and auto-generated release notes. + - The `guided-development-types` package is published to [npmjs.com](https://www.npmjs.com/package/@sap_oss/guided-development-types). + +### One-time setup (first release from a new environment) + +Before publishing to npm works, a maintainer must register this repository as a Trusted Publisher on npmjs.com — this only needs to be done once: + +1. Go to the `@sap_oss/guided-development-types` package page on npmjs.com → **Settings** → **Automated Publishing**. +2. Click **Add a Publisher**, select **GitHub Actions**, and fill in: + - **Owner**: `SAP` + - **Repository**: `guided-development` + - **Workflow filename**: `release.yml` +3. Save. No npm token or secret needs to be added to the GitHub repository. diff --git a/README.md b/README.md index e4fd573..4401a9c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ -[![CircleCI](https://circleci.com/gh/SAP/guided-development.svg?style=svg)](https://circleci.com/gh/SAP/guided-development) +[![CI](https://github.com/SAP/guided-development/actions/workflows/ci.yml/badge.svg)](https://github.com/SAP/guided-development/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/SAP/guided-development/badge.svg?branch=master)](https://coveralls.io/github/SAP/guided-development?branch=master) -[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/SAP/guided-development.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/SAP/guided-development/context:javascript) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) ![GitHub license](https://img.shields.io/badge/license-Apache_2.0-blue.svg) [![REUSE status](https://api.reuse.software/badge/github.com/SAP/guided-development)](https://api.reuse.software/info/github.com/SAP/guided-development) -[![dependentbot](https://api.dependabot.com/badges/status?host=github&repo=SAP/guided-development)](https://dependabot.com/) # Guided Development @@ -15,11 +13,31 @@ This extension allows developers to add generic code pieces to their project and The repository contains three main packages: * **Frontend** - The Guided Development as a standalone vue.js application. * **Backend** - The backend part. Runs as a VSCode extension or node.js application. -* **VSCode Guided Development contributor example** - Example guided-development contibutor to show usage. +* **guided-development-types** - TypeScript type definitions for building your own contributor extensions, published to [npm](https://www.npmjs.com/package/@sap_oss/guided-development-types). + +## Sample Contributors + +The repository also includes a collection of ready-to-explore sample contributor extensions. They are a great starting point for understanding how to integrate with the Guided Development framework and for building your own contributor. + +| Package | What it demonstrates | +|---|---| +| [`vscode-simple-contrib`](vscode-simple-contrib/) | The minimal contributor — a single collection with one item. Start here. | +| [`vscode-contrib1`](vscode-contrib1/) | A richer scenario showing multiple action types and cross-contributor item reuse. | +| [`vscode-contrib2`](vscode-contrib2/) | A platform-oriented collection, and how one contributor can reference items from another. | +| [`vscode-contrib3`](vscode-contrib3/) | A full-featured example covering project setup, snippet actions, and deployment workflows. | +| [`vscode-contrib-cake`](vscode-contrib-cake/) | Dynamic collections — adds or removes guides based on files detected in the workspace. | +| [`vscode-snippet-food-contrib`](vscode-snippet-food-contrib/) | Combining Guided Development with the code-snippet API for questionnaire-driven workflows. | + +Each sample is an independent VSCode extension. To build and run one, `cd` into its folder and run: +```bash +npm install +npm run compile +``` +Then open the repository in VSCode and launch the extension from the **Run and Debug** panel. ## Requirements -* [node.js](https://www.npmjs.com/package/node) version 10 or higher. -* [VSCode](https://code.visualstudio.com/) 1.39.2 or higher or [Theia](https://www.theia-ide.org/) 0.12 or higher. +* [node.js](https://www.npmjs.com/package/node) version 22 or higher. +* [VSCode](https://code.visualstudio.com/) 1.46.0 or higher. ## Download and Installation To test run the framework you only need to build and install the backend package, which will automatically build and run the UI. From 7b36e657f86fce43d913e2b26d0623218ab1a4d5 Mon Sep 17 00:00:00 2001 From: Alexander Gilin Date: Tue, 12 May 2026 14:44:56 +0300 Subject: [PATCH 3/4] fix: resolve vsce package warnings that block non-interactive CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace '*' activationEvents with 'onStartupFinished' — '*' triggers an interactive prompt in vsce that defaults to N in CI, and is bad for extension startup performance - Copy repo-level LICENSE into backend/ before packaging — vsce requires a LICENSE file in the extension root and prompts interactively when missing, which also defaults to N in CI --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- backend/package.json | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 741bdd9..6c54dd4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,8 +55,8 @@ jobs: working-directory: backend run: npm run webpack-prod - name: Create .vsix + run: cp LICENSE backend/LICENSE && npx vsce package . working-directory: backend - run: npx vsce package . - name: Test backend working-directory: backend run: npm run test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 20875a0..beda196 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,8 +40,8 @@ jobs: run: npm run webpack-prod - name: Create .vsix + run: cp LICENSE backend/LICENSE && npx vsce package . working-directory: backend - run: npx vsce package . - name: Publish GitHub Release run: gh release create "${{ github.ref_name }}" backend/guided-development-*.vsix --title "${{ github.ref_name }}" --generate-notes diff --git a/backend/package.json b/backend/package.json index 09d10e6..54ab56a 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "guided-development", - "version": "0.2.8", + "version": "0.2.9", "displayName": "Guided Development", "publisher": "SAPOSS", "author": { @@ -32,7 +32,7 @@ "sap" ], "activationEvents": [ - "*" + "onStartupFinished" ], "main": "./dist/extension", "contributes": { @@ -137,7 +137,7 @@ "webpack-prod": "webpack --mode production", "compile": "tsc -p ./", "watch": "tsc -watch -p ./", - "package": "npm run webpack && vsce package", + "package": "vsce package", "test": "tsc -p tsconfig.json && c8 mocha", "ws:run": "node ./out/src/webSocketServer/index.js", "lint": "eslint . --ext .ts,.tsx --cache", From d493540930476c82b0bbdbf0c03c45cb0f2085e0 Mon Sep 17 00:00:00 2001 From: Alexander Gilin Date: Tue, 12 May 2026 14:57:49 +0300 Subject: [PATCH 4/4] fix: resolve vsce packaging issues for non-interactive CI - Add backend/LICENSE (copy of root LICENSE) so vsce finds it on all platforms without needing cp steps in workflows or scripts - Add !LICENSE to backend/.vscodeignore so the file is included in the VSIX package - Replace '*' activationEvents with 'onStartupFinished' to avoid the interactive vsce prompt and improve extension startup performance - Remove cp LICENSE workaround from ci.yml and release.yml - Revert accidental version bump 0.2.9 -> 0.2.8 --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- backend/.vscodeignore | 1 + backend/LICENSE | 201 ++++++++++++++++++++++++++++++++++ backend/package.json | 2 +- 5 files changed, 205 insertions(+), 3 deletions(-) create mode 100644 backend/LICENSE diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c54dd4..b170d03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: working-directory: backend run: npm run webpack-prod - name: Create .vsix - run: cp LICENSE backend/LICENSE && npx vsce package . + run: npx vsce package . working-directory: backend - name: Test backend working-directory: backend diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index beda196..7440d5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: run: npm run webpack-prod - name: Create .vsix - run: cp LICENSE backend/LICENSE && npx vsce package . + run: npx vsce package . working-directory: backend - name: Publish GitHub Release diff --git a/backend/.vscodeignore b/backend/.vscodeignore index 31469ed..de3bc52 100644 --- a/backend/.vscodeignore +++ b/backend/.vscodeignore @@ -1,4 +1,5 @@ ** +!LICENSE !LICENSES !README.md !package.json diff --git a/backend/LICENSE b/backend/LICENSE new file mode 100644 index 0000000..9578e34 --- /dev/null +++ b/backend/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 SAP SE or an SAP affiliate company and guided-development contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/backend/package.json b/backend/package.json index 54ab56a..bc841f9 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "guided-development", - "version": "0.2.9", + "version": "0.2.8", "displayName": "Guided Development", "publisher": "SAPOSS", "author": {