Publish @bluefly/technical-guide to GitLab NPM Registry
Objective
Publish the technical-guide package to GitLab NPM registry for consumption by other projects in the ecosystem.
Pre-Publishing Checklist
Package Configuration
-
`package.json` properly configured -
Version set to 1.0.0 -
All exports defined -
Dependencies correct -
Repository URL set -
License specified -
Keywords added
Build Verification
```bash
Clean build
npm run clean npm run build
Verify dist/ contents
ls -la dist/
Check type definitions
ls -la dist/**/*.d.ts
Verify exports
node -e "const tg = require('./dist/index.js'); console.log(tg);" ```
Quality Checks
-
All tests passing -
Type checking passes -
Linting passes -
No security vulnerabilities -
Bundle size acceptable
Documentation
-
README complete -
Usage examples provided -
API documentation generated -
Migration guide included -
Changelog initialized
Package.json Final Configuration
```json { "name": "@bluefly/technical-guide", "version": "1.0.0", "description": "Standards library for LLM Platform: design tokens, API registry, validators", "main": "dist/index.js", "types": "dist/index.d.ts", "exports": { "./tokens": { "import": "./dist/tokens/index.js", "types": "./dist/tokens/index.d.ts" }, "./schemas": { "import": "./dist/schemas/index.js", "types": "./dist/schemas/index.d.ts" }, "./validation": { "import": "./dist/validation/index.js", "types": "./dist/validation/index.d.ts" }, "./registry": { "import": "./dist/registry/index.js", "types": "./dist/registry/index.d.ts" } }, "bin": { "technical-guide": "./dist/cli/index.js" }, "files": [ "dist", "src", "README.md", "LICENSE" ], "publishConfig": { "registry": "https://gitlab.bluefly.io/api/v4/projects/llm%2Ftechnical-guide/packages/npm/", "access": "private" }, "repository": { "type": "git", "url": "https://gitlab.bluefly.io/llm/technical-guide.git" }, "keywords": [ "design-tokens", "design-system", "openapi", "api-registry", "validators", "standards", "llm-platform" ], "license": "MIT" } ```
NPM Registry Setup
Authenticate with GitLab Registry
```bash
Set registry in .npmrc
echo "@bluefly:registry=https://gitlab.bluefly.io/api/v4/packages/npm/" >> .npmrc echo "//gitlab.bluefly.io/api/v4/packages/npm/:_authToken=${GITLAB_TOKEN}" >> .npmrc ```
Test Installation Locally
```bash
Pack without publishing
npm pack
Install in test project
cd /tmp/test-project npm install /Users/flux423/Sites/LLM/technical-guide/bluefly-technical-guide-1.0.0.tgz
Verify imports work
node -e "const { colors } = require('@bluefly/technical-guide/tokens'); console.log(colors);" ```
Publishing Process
Dry Run
```bash npm publish --dry-run ```
Actual Publishing
```bash npm publish --access private ```
Verify Published
```bash npm view @bluefly/technical-guide
Install in another project
cd /Users/flux423/Sites/LLM/common_npm/studio-ui npm install @bluefly/technical-guide@^1.0.0 ```
Post-Publishing Tasks
Tag Release in Git
```bash git tag v1.0.0 git push origin v1.0.0 ```
Create GitLab Release
-
Create release in GitLab UI -
Add release notes -
Link to Epic #1 -
Include migration guide -
Add usage examples
Update Dependent Projects
-
Create MRs to add dependency -
Update agent-router -
Update studio-ui -
Update agent-buildkit -
Update all common_npm packages
Verify in CI/CD
-
Dependent project pipelines can install package -
Imports work in CI environment -
No authentication issues
Semantic Release Setup
```json // .releaserc { "branches": ["main"], "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", "@semantic-release/changelog", ["@semantic-release/npm", { "npmPublish": true }], "@semantic-release/gitlab", ["@semantic-release/git", { "assets": ["package.json", "CHANGELOG.md"], "message": "chore(release): {nextRelease.version} [skip ci]\n\n{nextRelease.notes}" }] ] } ```
Future Releases
Patch Release (1.0.x)
- Bug fixes
- Documentation updates
- Minor token value changes
Minor Release (1.x.0)
- New design tokens
- New validators
- New API registry features
- Backward compatible
Major Release (x.0.0)
- Breaking changes
- Token structure changes
- API changes
Monitoring
-
Track download counts -
Monitor issues related to package -
Collect feedback from users -
Plan future enhancements
Related
Success Criteria
-
✅ Package published successfully -
✅ Version 1.0.0 available in registry -
✅ Other projects can install -
✅ All exports work correctly -
✅ CLI commands functional -
✅ Git tagged with v1.0.0 -
✅ GitLab release created -
✅ Dependent projects updated