Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run comprehensive tests
run: xvfb-run -a yarn run ci
- name: Run comprehensive release check
run: xvfb-run -a yarn run release:check

- name: Validate packages are ready for release
run: |
Expand Down
68 changes: 33 additions & 35 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ npm run sample # Interactive testing
# 4. Propagate to VSCode extension
cd ..
npm run propagate # Development mode (fast)
npm run propagate:bundle # Bundle mode (for release)
npm run propagate # Bundle mode (for release)

# 5. Test the extension integration
npm run test:vscode
Expand Down Expand Up @@ -138,64 +138,44 @@ yarn upgrade
# Update specific package
yarn upgrade some-package@^2.0.0

# Always propagate after updating renderer dependencies
npm run propagate # Development
npm run propagate:bundle # Release
# Always propagate after updating renderer dependencies
npm run propagate # Bundles renderer code into extension
```

## πŸ”„ Propagation Process

The propagation script (`scripts/propagate-changes.js`) supports **two modes**:
The propagation script (`scripts/propagate-changes.js`) **bundles the renderer into the VSCode extension**:

### πŸ”§ Development Mode: `npm run propagate`

**What it does:**
1. **Version Synchronization**: Ensures both packages have the same version
2. **Dependency Updates**: Updates VSCode extension to use `file:../tekton-pipeline-renderer`
3. **Sample Files**: Copies sample pipeline files for consistency
4. **Validation**: Runs post-propagation checks

**Good for:** Active development, fast iteration, debugging

### πŸ“¦ Bundle Mode: `npm run propagate:bundle`
### πŸ“¦ Bundle Mode: `npm run propagate`

**What it does:**
1. **Code Copying**: Physically copies renderer source to `tekton-vscode/src/lib/`
2. **Dependency Removal**: Removes external renderer dependency
3. **Index Generation**: Creates bundled exports file
4. **Sample Files**: Copies sample pipeline files
5. **Validation**: Ensures bundled extension builds correctly
5. **Version Synchronization**: Ensures both packages have the same version
6. **Validation**: Ensures bundled extension builds correctly

**Good for:** Development, releases, CI/CD, creating self-contained extensions

**Good for:** Releases, CI/CD, creating self-contained extensions
**Result:** The VSCode extension becomes completely self-contained with all renderer code bundled inside.

### Manual Propagation Examples

```bash
# Development workflow
# Run propagation (always bundles code)
npm run propagate
# Creates: file dependency link

# Release workflow
npm run propagate:bundle
# Creates: tekton-vscode/src/lib/tekton-renderer/ with all source code
```

### What Bundle Mode Creates
### What Propagation Creates

```
Before bundling:
tekton-vscode/package.json
{
"dependencies": {
"tekton-pipeline-renderer": "file:../tekton-pipeline-renderer"
}
}

After bundling:
After propagation:
tekton-vscode/package.json
{
"dependencies": {
// renderer dependency removed
// renderer dependency removed (code is bundled inside)
}
}

Expand Down Expand Up @@ -261,12 +241,30 @@ npm run sample

### Pre-Release Checklist

#### πŸš€ TL;DR - Automated Pre-Release

```bash
# Run the automated pre-release script (recommended)
npm run pre-release
```

**What it does:**
- βœ… Optionally bumps versions (with prompts)
- βœ… Runs complete CI pipeline
- βœ… Bundles renderer code into VSCode extension
- βœ… Runs comprehensive release checks
- βœ… Guides you through manual testing steps
- βœ… Builds packages for release
- βœ… Creates .vsix file for VSCode extension

#### πŸ“‹ Manual Steps (if you prefer to run individually)

```bash
# 1. Run complete CI pipeline
npm run ci

# 2. Bundle renderer code into extension
npm run propagate:bundle
npm run propagate

# 3. Run comprehensive release check
npm run release:check
Expand Down
8 changes: 4 additions & 4 deletions QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ npm run propagate
npm run test:vscode

# 5. For release, use bundle mode
npm run propagate:bundle
npm run propagate
```

## πŸ§ͺ Test Everything
Expand Down Expand Up @@ -128,8 +128,8 @@ npm run sample
# 2. Make changes in tekton-pipeline-renderer/
# 3. See changes live in browser
# 4. When ready, propagate
npm run propagate # Development mode
npm run propagate:bundle # Release mode (true bundling)
npm run propagate # Development mode
npm run propagate # Release mode (true bundling)

# 5. Test everything
npm run test
Expand Down Expand Up @@ -160,7 +160,7 @@ git commit -m "feat: your awesome feature"
|---------|-------------|
| `npm run sample` | Test changes immediately |
| `npm run propagate` | After renderer changes (development) |
| `npm run propagate:bundle` | For release builds (true bundling) |
| `npm run propagate` | For release builds (true bundling) |
| `npm run ci` | Before committing |
| `npm run test` | All the time! |
| `npm run vscode:package` | Create VSCode extension |
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tekton-pipeline-renderer/ ──link──> tekton-vscode/
- **Good for**: Active development, debugging, testing
- **VSCode Extension**: Links to live renderer package

### πŸ“¦ Bundle Mode: `npm run propagate:bundle`
### πŸ“¦ Bundle Mode: `npm run propagate`
```bash
tekton-pipeline-renderer/src/ ──copy──> tekton-vscode/src/lib/
```
Expand All @@ -38,7 +38,7 @@ tekton-pipeline-renderer/src/ ──copy──> tekton-vscode/src/lib/

### πŸ“ What Bundle Mode Creates

After running `npm run propagate:bundle`:
After running `npm run propagate`:
```
tekton-vscode/
β”œβ”€β”€ src/
Expand Down Expand Up @@ -103,7 +103,7 @@ npm run propagate
npm run test:vscode

# For release (bundles code inside extension)
npm run propagate:bundle
npm run propagate

# Build the extension
npm run build:extension
Expand Down Expand Up @@ -134,7 +134,7 @@ npm run release:prepare
| `npm run test` | Run all tests |
| `npm run lint` | Lint all code |
| `npm run propagate` | Sync changes (development mode - file dependency) |
| `npm run propagate:bundle` | Bundle renderer code inside VSCode extension |
| `npm run propagate` | Bundle renderer code inside VSCode extension |
| `npm run release:check` | Comprehensive release validation |
| `npm run sample` | Run the React sample app |

Expand Down Expand Up @@ -276,7 +276,7 @@ tekton-vscode/ β”€β”€β”˜ (propagated automatically)
3. **Verify** with `npm run sample`
4. **Propagate** with `npm run propagate` (development)
5. **Integration test** with `npm run test:vscode`
6. **Bundle** with `npm run propagate:bundle` (for release)
6. **Bundle** with `npm run propagate` (for release)

### Debugging the VSCode Extension

Expand All @@ -289,7 +289,7 @@ tekton-vscode/ β”€β”€β”˜ (propagated automatically)

1. **Update** in `tekton-pipeline-renderer/package.json`
2. **Run** `npm run propagate` to sync to VSCode extension (development)
3. **Run** `npm run propagate:bundle` to bundle for release
3. **Run** `npm run propagate` to bundle for release
4. **Test** both packages with `npm run test`

## 🀝 Contributing
Expand Down
6 changes: 3 additions & 3 deletions SETUP_SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ yarn install # βœ… COMPLETED
# Development commands
npm run sample # Interactive demo app
npm run propagate # Sync changes (development mode)
npm run propagate:bundle # Bundle for release
npm run propagate # Bundle for release
npm run test # Run all tests
npm run build # Build both packages
npm run ci # Complete CI pipeline
Expand All @@ -69,7 +69,7 @@ npm run npm:publish # Publish renderer to npm
- Uses `file:../tekton-pipeline-renderer` dependency
- Fast, live updates during development

### Bundle Mode: `npm run propagate:bundle`
### Bundle Mode: `npm run propagate`
- Copies renderer source to `tekton-vscode/src/lib/`
- Creates self-contained extension for distribution

Expand All @@ -78,7 +78,7 @@ npm run npm:publish # Publish renderer to npm
1. **Always run `yarn install` from the root** - never from individual packages
2. **Never create lock files in workspaces** - they're auto-ignored now
3. **Use `npm run propagate`** after making renderer changes
4. **Use `npm run propagate:bundle`** for release builds
4. **Use `npm run propagate`** for release builds

## πŸŽ‰ Next Steps

Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"tekton-vscode"
],
"scripts": {
"preinstall": "node -e \"if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('Please use yarn')\"",
"preinstall": "node -e \"if(process.env.npm_execpath && process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('Please use yarn')\"",
"install:all": "yarn install --frozen-lockfile",
"clean": "yarn workspace tekton-pipeline-renderer run clean && yarn workspace tekton-vscode run clean && rm -rf dist",
"build": "yarn run build:renderer && yarn run build:vscode",
Expand All @@ -28,11 +28,12 @@
"lint": "yarn workspace tekton-pipeline-renderer run lint && yarn workspace tekton-vscode run lint",
"lint:fix": "yarn workspace tekton-pipeline-renderer run lint:fix && yarn workspace tekton-vscode run lint:fix",
"propagate": "node scripts/propagate-changes.js",
"ci": "yarn run clean && yarn run install:all && yarn run lint && yarn run test && yarn run build",
"ci": "yarn run clean && yarn run lint && yarn run test && yarn run build:renderer",
"ci:github": "yarn run lint && yarn run build:renderer && yarn run build:extension && yarn run vscode:package",
"pre-push": "yarn run ci:github",
"release:check": "yarn run ci && yarn run propagate && yarn run test",
"release:check": "yarn run ci && yarn run propagate && yarn run build:vscode",
"release:prepare": "yarn run release:check && yarn run build:extension",
"pre-release": "node scripts/pre-release.js",
"vscode:package": "yarn workspace tekton-vscode run vscode:package",
"npm:publish": "yarn workspace tekton-pipeline-renderer run npm:publish"
},
Expand Down
Loading
Loading