mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 00:09:30 +01:00
* Add merge script for extension configuration policies from distro Adds build/lib/policies/mergeExtensionPolicies.ts which fetches the distro's product.json (at the commit pinned in package.json) and merges extensionConfigurationPolicy entries into policyData.jsonc. The --export-policy-data step only captures policies from the OSS configuration registry. Extension policies (e.g., Copilot settings) are defined in vscode-distro's product.json and are not available in the OSS dev build. This merge script bridges that gap. Workflow: ./scripts/code.sh --export-policy-data && node build/lib/policies/mergeExtensionPolicies.ts Also updates: - policyExport integration test to run the merge step - add-policy skill documentation with extension policy lifecycle * Simplify extension policy format: drop localization block from distro - mergeExtensionPolicies.ts now reads only description/category from the distro and synthesizes localization key/value pairs internally - Integration test gracefully skips merge step when distro is unavailable - Updated SKILL.md to document the simplified distro format * docs: use gh auth token in policy export command * Handle old distro format missing description/category fields * docs: add troubleshooting section for merge step in policy skill * Require description and category fields in extension policy entries * Add extension configuration policies to policyData.jsonc * Address PR feedback: fix disclaimer, log targetPath, strip GITHUB_TOKEN from test * fix: revert extension policies from policyData.jsonc, remove console.log from test Extension policies should only be added after the distro PR merges. Test runner disallows console output in tests. * Add mock distro test for mergeExtensionPolicies, remove merge from export test - mergeExtensionPolicies.ts: add DISTRO_PRODUCT_JSON env var to override the distro path (for testing without private repo access) - New test: creates a mock product.json, runs the merge script, verifies policies are added correctly and idempotently - Export test: no longer runs the merge step (avoids needing distro access or GITHUB_TOKEN in CI) * Update distro and regenerate policyData.jsonc with extension policies * Fix CI: add extension policy fixture for export test The export test now runs mergeExtensionPolicies using a checked-in fixture file instead of requiring distro access or GITHUB_TOKEN. When extension policies change in the distro, regenerate both policyData.jsonc and the fixture file. * Integrate extension policy merge into --export-policy-data - Removed mergeExtensionPolicies.ts — no separate CLI tool needed - --export-policy-data now reads build/lib/policies/extensionPolicies.json and merges extension policies into the output automatically - Single command workflow: ./scripts/code.sh --export-policy-data - Simplified test — no merge step, no GITHUB_TOKEN, no distro access - Updated SKILL.md to document the simplified workflow * Dynamic distro reading: --export-policy-data fetches from distro directly - policyExport.contribution.ts reads distro product.json dynamically: 1. DISTRO_PRODUCT_JSON env var (for testing) 2. .build/distro/mixin/stable/product.json (local checkout) 3. GitHub API with GITHUB_TOKEN (remote fetch) - New scripts/export-policy-data.sh wrapper: sets up GITHUB_TOKEN via gh CLI and runs the export - Deleted build/lib/policies/extensionPolicies.json (no static copy) - Test uses DISTRO_PRODUCT_JSON with a fixture file - Uses sandbox process.env and VSBuffer (renderer-safe) * Replace bash wrapper with cross-platform TS script - New build/lib/policies/exportPolicyData.ts: handles transpilation, GITHUB_TOKEN setup via gh CLI, and runs --export-policy-data - Added 'npm run export-policy-data' script to package.json - Removed scripts/export-policy-data.sh - Updated SKILL.md and test error message * Use OAuth device flow for GitHub token acquisition exportPolicyData.ts now acquires tokens via: 1. GITHUB_TOKEN env var (if set) 2. gh CLI (fast, non-interactive) 3. GitHub OAuth device flow (interactive, no dependencies) Based on vscode-copilot-chat's getToken.mts pattern. * Fix error messages to reference npm run export-policy-data * Fix disclaimer to reference npm run export-policy-data, clean up stale refs * Clarify test fixture is static and not expected to track distro changes * Add inline comment in test clarifying fixture is static * SKILL.md: add step to update distro commit hash in package.json * Remove inline comment per PR feedback * Remove local .build/distro/ fallback path per PR feedback
254 lines
11 KiB
JSON
254 lines
11 KiB
JSON
{
|
|
"name": "code-oss-dev",
|
|
"version": "1.115.0",
|
|
"distro": "084798d47e4cc4c713def402d4a1110fb619116d",
|
|
"author": {
|
|
"name": "Microsoft Corporation"
|
|
},
|
|
"license": "MIT",
|
|
"main": "./out/main.js",
|
|
"type": "module",
|
|
"private": true,
|
|
"scripts": {
|
|
"test": "echo Please run any of the test scripts from the scripts folder.",
|
|
"test-browser": "npx playwright install && node test/unit/browser/index.js",
|
|
"test-browser-no-install": "node test/unit/browser/index.js",
|
|
"test-node": "mocha test/unit/node/index.js --delay --ui=tdd --timeout=5000 --exit",
|
|
"test-extension": "vscode-test",
|
|
"test-build-scripts": "cd build && npm run test",
|
|
"check-cyclic-dependencies": "node build/lib/checkCyclicDependencies.ts out",
|
|
"preinstall": "node build/npm/preinstall.ts",
|
|
"postinstall": "node build/npm/postinstall.ts",
|
|
"compile": "npm run gulp compile",
|
|
"compile-check-ts-native": "tsgo --project ./src/tsconfig.json --noEmit --skipLibCheck",
|
|
"watch": "npm-run-all2 -lp watch-client-transpile watch-client watch-extensions",
|
|
"watchd": "deemon npm run watch",
|
|
"watch-webd": "deemon npm run watch-web",
|
|
"kill-watchd": "deemon --kill npm run watch",
|
|
"kill-watch-webd": "deemon --kill npm run watch-web",
|
|
"restart-watchd": "deemon --restart npm run watch",
|
|
"restart-watch-webd": "deemon --restart npm run watch-web",
|
|
"watch-client": "npm run gulp watch-client",
|
|
"watch-clientd": "deemon npm run watch-client",
|
|
"kill-watch-clientd": "deemon --kill npm run watch-client",
|
|
"transpile-client": "node build/next/index.ts transpile",
|
|
"watch-client-transpile": "node build/next/index.ts transpile --watch",
|
|
"watch-client-transpiled": "deemon npm run watch-client-transpile",
|
|
"kill-watch-client-transpiled": "deemon --kill npm run watch-client-transpile",
|
|
"watch-extensions": "npm run gulp watch-extensions watch-extension-media",
|
|
"watch-extensionsd": "deemon npm run watch-extensions",
|
|
"kill-watch-extensionsd": "deemon --kill npm run watch-extensions",
|
|
"precommit": "node --experimental-strip-types build/hygiene.ts",
|
|
"gulp": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js",
|
|
"electron": "node build/lib/electron.ts",
|
|
"7z": "7z",
|
|
"update-grammars": "node build/npm/update-all-grammars.ts",
|
|
"update-localization-extension": "node build/npm/update-localization-extension.ts",
|
|
"mixin-telemetry-docs": "node build/npm/mixin-telemetry-docs.ts",
|
|
"smoketest": "node build/lib/preLaunch.ts && cd test/smoke && npm run compile && node test/index.js",
|
|
"smoketest-no-compile": "cd test/smoke && node test/index.js",
|
|
"download-builtin-extensions": "node build/lib/builtInExtensions.ts",
|
|
"download-builtin-extensions-cg": "node build/lib/builtInExtensionsCG.ts",
|
|
"monaco-compile-check": "tsgo --project src/tsconfig.monaco.json --noEmit",
|
|
"tsec-compile-check": "node node_modules/tsec/bin/tsec -p src/tsconfig.tsec.json",
|
|
"vscode-dts-compile-check": "tsgo --project src/tsconfig.vscode-dts.json && tsgo --project src/tsconfig.vscode-proposed-dts.json",
|
|
"valid-layers-check": "node build/checker/layersChecker.ts && tsgo --project build/checker/tsconfig.browser.json && tsgo --project build/checker/tsconfig.worker.json && tsgo --project build/checker/tsconfig.node.json && tsgo --project build/checker/tsconfig.electron-browser.json && tsgo --project build/checker/tsconfig.electron-main.json && tsgo --project build/checker/tsconfig.electron-utility.json",
|
|
"define-class-fields-check": "node build/lib/propertyInitOrderChecker.ts && tsgo --project src/tsconfig.defineClassFields.json",
|
|
"update-distro": "node build/npm/update-distro.ts",
|
|
"export-policy-data": "node build/lib/policies/exportPolicyData.ts",
|
|
"web": "echo 'npm run web' is replaced by './scripts/code-server' or './scripts/code-web'",
|
|
"compile-cli": "npm run gulp compile-cli",
|
|
"compile-web": "npm run gulp compile-web",
|
|
"watch-web": "npm run gulp watch-web",
|
|
"watch-cli": "npm run gulp watch-cli",
|
|
"eslint": "node build/eslint.ts",
|
|
"stylelint": "node build/stylelint.ts",
|
|
"playwright-install": "npm exec playwright install",
|
|
"compile-build": "npm run gulp compile-build-with-mangling",
|
|
"compile-extensions-build": "npm run gulp compile-extensions-build",
|
|
"minify-vscode": "npm run gulp minify-vscode",
|
|
"minify-vscode-reh": "npm run gulp minify-vscode-reh",
|
|
"minify-vscode-reh-web": "npm run gulp minify-vscode-reh-web",
|
|
"hygiene": "npm run gulp hygiene",
|
|
"core-ci": "npm run gulp core-ci",
|
|
"core-ci-pr": "npm run gulp core-ci-pr",
|
|
"extensions-ci": "npm run gulp extensions-ci",
|
|
"extensions-ci-pr": "npm run gulp extensions-ci-pr",
|
|
"perf": "node scripts/code-perf.js",
|
|
"update-build-ts-version": "npm install -D typescript@next && npm install -D @typescript/native-preview && (cd build && npm run typecheck)",
|
|
"install-local-component-explorer": "npm install ../vscode-packages/js-component-explorer/dist/vscode-component-explorer-0.1.0.tgz ../vscode-packages/js-component-explorer/dist/vscode-component-explorer-cli-0.1.0.tgz --no-save && cd build/vite && npm install ../../../vscode-packages/js-component-explorer/dist/vscode-component-explorer-vite-plugin-0.1.0.tgz --no-save",
|
|
"symlink-local-component-explorer": "npm install ../vscode-packages/js-component-explorer/packages/explorer ../vscode-packages/js-component-explorer/packages/cli --no-save && cd build/vite && npm install ../../../vscode-packages/js-component-explorer/packages/vite-plugin ../../../vscode-packages/js-component-explorer/packages/explorer --no-save",
|
|
"install-latest-component-explorer": "npm install @vscode/component-explorer@next @vscode/component-explorer-cli@next && cd build/vite && npm install @vscode/component-explorer-vite-plugin@next && npm install @vscode/component-explorer@next"
|
|
},
|
|
"dependencies": {
|
|
"@anthropic-ai/sandbox-runtime": "0.0.42",
|
|
"@github/copilot": "^1.0.11",
|
|
"@github/copilot-sdk": "^0.2.0",
|
|
"@microsoft/1ds-core-js": "^3.2.13",
|
|
"@microsoft/1ds-post-js": "^3.2.13",
|
|
"@parcel/watcher": "^2.5.6",
|
|
"@types/semver": "^7.5.8",
|
|
"@vscode/codicons": "^0.0.46-1",
|
|
"@vscode/deviceid": "^0.1.1",
|
|
"@vscode/iconv-lite-umd": "0.7.1",
|
|
"@vscode/native-watchdog": "^1.4.6",
|
|
"@vscode/policy-watcher": "^1.3.2",
|
|
"@vscode/proxy-agent": "^0.40.0",
|
|
"@vscode/ripgrep": "^1.17.1",
|
|
"@vscode/spdlog": "^0.15.8",
|
|
"@vscode/sqlite3": "5.1.12-vscode",
|
|
"@vscode/sudo-prompt": "9.3.2",
|
|
"@vscode/tree-sitter-wasm": "^0.3.0",
|
|
"@vscode/vscode-languagedetection": "1.0.23",
|
|
"@vscode/windows-mutex": "^0.5.0",
|
|
"@vscode/windows-process-tree": "^0.6.0",
|
|
"@vscode/windows-registry": "^1.2.0",
|
|
"@xterm/addon-clipboard": "^0.3.0-beta.191",
|
|
"@xterm/addon-image": "^0.10.0-beta.191",
|
|
"@xterm/addon-ligatures": "^0.11.0-beta.191",
|
|
"@xterm/addon-progress": "^0.3.0-beta.191",
|
|
"@xterm/addon-search": "^0.17.0-beta.191",
|
|
"@xterm/addon-serialize": "^0.15.0-beta.191",
|
|
"@xterm/addon-unicode11": "^0.10.0-beta.191",
|
|
"@xterm/addon-webgl": "^0.20.0-beta.190",
|
|
"@xterm/headless": "^6.1.0-beta.191",
|
|
"@xterm/xterm": "^6.1.0-beta.191",
|
|
"http-proxy-agent": "^7.0.0",
|
|
"https-proxy-agent": "^7.0.2",
|
|
"jschardet": "3.1.4",
|
|
"katex": "^0.16.22",
|
|
"kerberos": "2.1.1",
|
|
"minimist": "^1.2.8",
|
|
"native-is-elevated": "0.9.0",
|
|
"native-keymap": "^3.3.5",
|
|
"node-pty": "^1.2.0-beta.12",
|
|
"open": "^10.1.2",
|
|
"playwright-core": "1.59.0-alpha-2026-02-20",
|
|
"tas-client": "0.3.1",
|
|
"undici": "^7.24.0",
|
|
"v8-inspect-profiler": "^0.1.1",
|
|
"vscode-oniguruma": "1.7.0",
|
|
"vscode-regexpp": "^3.1.0",
|
|
"vscode-textmate": "^9.3.2",
|
|
"ws": "^8.19.0",
|
|
"yauzl": "^3.0.0",
|
|
"yazl": "^2.4.3"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/cli": "^0.1.1",
|
|
"@playwright/test": "^1.56.1",
|
|
"@stylistic/eslint-plugin-ts": "^2.8.0",
|
|
"@types/cookie": "^0.3.3",
|
|
"@types/debug": "^4.1.5",
|
|
"@types/eslint": "^9.6.1",
|
|
"@types/gulp-svgmin": "^1.2.1",
|
|
"@types/http-proxy-agent": "^2.0.1",
|
|
"@types/kerberos": "^1.1.2",
|
|
"@types/minimist": "^1.2.1",
|
|
"@types/mocha": "^10.0.10",
|
|
"@types/node": "^22.18.10",
|
|
"@types/sinon": "^10.0.2",
|
|
"@types/sinon-test": "^2.4.2",
|
|
"@types/trusted-types": "^2.0.7",
|
|
"@types/vscode-notebook-renderer": "^1.72.0",
|
|
"@types/wicg-file-system-access": "^2023.10.7",
|
|
"@types/windows-foreground-love": "^0.3.0",
|
|
"@types/winreg": "^1.2.30",
|
|
"@types/ws": "^8.18.1",
|
|
"@types/yauzl": "^2.10.0",
|
|
"@types/yazl": "^2.4.2",
|
|
"@typescript-eslint/utils": "^8.45.0",
|
|
"@typescript/native-preview": "^7.0.0-dev.20260306",
|
|
"@vscode/component-explorer": "^0.1.1-24",
|
|
"@vscode/component-explorer-cli": "^0.1.1-20",
|
|
"@vscode/gulp-electron": "1.41.0",
|
|
"@vscode/l10n-dev": "0.0.35",
|
|
"@vscode/telemetry-extractor": "^1.20.2",
|
|
"@vscode/test-cli": "^0.0.6",
|
|
"@vscode/test-electron": "^2.4.0",
|
|
"@vscode/test-web": "^0.0.76",
|
|
"@vscode/v8-heap-parser": "^0.1.0",
|
|
"@vscode/vscode-perf": "^0.0.19",
|
|
"@webgpu/types": "^0.1.66",
|
|
"agent-browser": "^0.16.3",
|
|
"ansi-colors": "^3.2.3",
|
|
"asar": "^3.0.3",
|
|
"chromium-pickle-js": "^0.2.0",
|
|
"cookie": "^0.7.2",
|
|
"debounce": "^1.0.0",
|
|
"deemon": "^1.13.6",
|
|
"electron": "39.8.5",
|
|
"eslint": "^9.36.0",
|
|
"eslint-formatter-compact": "^8.40.0",
|
|
"eslint-plugin-header": "3.1.1",
|
|
"eslint-plugin-jsdoc": "^50.3.1",
|
|
"event-stream": "3.3.4",
|
|
"fancy-log": "^1.3.3",
|
|
"glob": "^5.0.13",
|
|
"gulp": "^4.0.0",
|
|
"gulp-azure-storage": "^0.12.1",
|
|
"gulp-bom": "^3.0.0",
|
|
"gulp-buffer": "0.0.2",
|
|
"gulp-filter": "^5.1.0",
|
|
"gulp-flatmap": "^1.0.2",
|
|
"gulp-gunzip": "^1.0.0",
|
|
"gulp-gzip": "^1.4.2",
|
|
"gulp-json-editor": "^2.5.0",
|
|
"gulp-plumber": "^1.2.0",
|
|
"gulp-rename": "^1.2.0",
|
|
"gulp-replace": "^0.5.4",
|
|
"gulp-sourcemaps": "^3.0.0",
|
|
"gulp-svgmin": "^4.1.0",
|
|
"husky": "^0.13.1",
|
|
"innosetup": "^6.4.1",
|
|
"istanbul-lib-coverage": "^3.2.0",
|
|
"istanbul-lib-instrument": "^6.0.1",
|
|
"istanbul-lib-report": "^3.0.0",
|
|
"istanbul-lib-source-maps": "^4.0.1",
|
|
"istanbul-reports": "^3.1.5",
|
|
"lazy.js": "^0.4.2",
|
|
"merge-options": "^1.0.1",
|
|
"mime": "^1.4.1",
|
|
"minimatch": "^3.1.5",
|
|
"mocha": "^10.8.2",
|
|
"mocha-junit-reporter": "^2.2.1",
|
|
"mocha-multi-reporters": "^1.5.1",
|
|
"npm-run-all2": "^8.0.4",
|
|
"os-browserify": "^0.3.0",
|
|
"p-all": "^1.0.0",
|
|
"path-browserify": "^1.0.1",
|
|
"pump": "^1.0.1",
|
|
"rcedit": "^1.1.0",
|
|
"rimraf": "^2.2.8",
|
|
"sinon": "^12.0.1",
|
|
"sinon-test": "^3.1.3",
|
|
"source-map": "0.6.1",
|
|
"source-map-support": "^0.3.2",
|
|
"tar": "^7.5.9",
|
|
"tsec": "0.2.7",
|
|
"tslib": "^2.6.3",
|
|
"typescript": "^6.0.0-dev.20260306",
|
|
"typescript-eslint": "^8.45.0",
|
|
"util": "^0.12.4",
|
|
"xml2js": "^0.5.0",
|
|
"yaserver": "^0.4.0"
|
|
},
|
|
"overrides": {
|
|
"node-gyp-build": "4.8.1",
|
|
"kerberos@2.1.1": {
|
|
"node-addon-api": "7.1.0"
|
|
},
|
|
"serialize-javascript": "^7.0.3"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/microsoft/vscode.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/microsoft/vscode/issues"
|
|
},
|
|
"optionalDependencies": {
|
|
"windows-foreground-love": "0.6.1"
|
|
}
|
|
}
|