chore(channels): make plugin-example private and remove from release workflow

- Mark @qwen-code/channel-plugin-example as private in package.json
- Remove publish step from release workflow
- Remove file: to semver rewrite logic in version script
- Use file: reference for @qwen-code/channel-base dependency

This change prevents the example plugin from being published to npm, as it's only intended for internal/development use.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
tanzhenxin 2026-04-01 20:43:45 +08:00
parent f891af4847
commit d07861ad5c
3 changed files with 3 additions and 28 deletions

View file

@ -207,13 +207,6 @@ jobs:
env:
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
- name: 'Publish @qwen-code/channel-plugin-example'
working-directory: 'packages/channels/plugin-example'
run: |-
npm publish --access public --tag=${{ steps.version.outputs.NPM_TAG }} ${{ steps.vars.outputs.is_dry_run == 'true' && '--dry-run' || '' }}
env:
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
- name: 'Create GitHub Release and Tag'
if: |-
${{ steps.vars.outputs.is_dry_run == 'false' }}

View file

@ -1,6 +1,7 @@
{
"name": "@qwen-code/channel-plugin-example",
"version": "0.14.0",
"private": true,
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@ -23,7 +24,7 @@
"prepublishOnly": "npm run build"
},
"dependencies": {
"@qwen-code/channel-base": "^0.14.0",
"@qwen-code/channel-base": "file:../base",
"ws": "^8.18.0"
},
"devDependencies": {

View file

@ -104,26 +104,7 @@ if (cliPackageJson.config?.sandboxImageUri) {
writeJson(cliPackageJsonPath, cliPackageJson);
}
// 7. Rewrite file: references to semver for packages that will be published to npm.
// During development, channel packages use file: for monorepo linking.
// At release time, published packages need real semver references so they resolve from npm.
const publishedCrossRefs = [
{
packagePath: 'packages/channels/plugin-example/package.json',
dep: '@qwen-code/channel-base',
},
];
for (const { packagePath, dep } of publishedCrossRefs) {
const pkgPath = resolve(process.cwd(), packagePath);
const pkgJson = readJson(pkgPath);
if (pkgJson.dependencies?.[dep]?.startsWith('file:')) {
pkgJson.dependencies[dep] = `^${newVersion}`;
console.log(`Updated ${dep} in ${packagePath} to ^${newVersion}`);
writeJson(pkgPath, pkgJson);
}
}
// 8. Run `npm install` to update package-lock.json.
// 7. Run `npm install` to update package-lock.json.
run(
'npm install --workspace packages/cli --workspace packages/core --workspace packages/channels/base --workspace packages/channels/plugin-example --package-lock-only',
);