Skip to content

Commit

Permalink
Added publish-preview script. Updated readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuebner committed Dec 20, 2024
1 parent 25a80f2 commit bab86db
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 1,741 deletions.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@ updates:
- "/packages/vscode-messenger-devtools/webview-ui"
schedule:
interval: "weekly"
applies-to:
- version-updates
ignore:
- dependency-name: "*"
4 changes: 2 additions & 2 deletions examples/calico-colors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
"watch": "tsc -w -p ./"
},
"dependencies": {
"vscode-messenger": "^0.5.0",
"vscode-messenger-webview": "^0.5.0"
"vscode-messenger": "^0.5",
"vscode-messenger-webview": "^0.5"
},
"devDependencies": {
"browserify": "^17.0.0",
Expand Down
1,720 changes: 5 additions & 1,715 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
},
"scripts": {
"prepare": "npm run clean && npm run build",
"clean": "rimraf \"packages/**/lib\" \"packages/**/*.tsbuildinfo\"",
"build": "tsc -b tsconfig.build.json && npm run browserify --workspaces --if-present && npm run build --workspace=packages/vscode-messenger-devtools/webview-ui",
"clean": "rimraf \"packages/**/lib\" \"packages/**/build\" \"packages/**/*.tsbuildinfo\" \"packages/*/node_modules\"",
"build": "tsc -b tsconfig.build.json && npm run browserify --workspaces --if-present && npm run build --workspace=packages/vscode-messenger-devtools/webview-ui && npm run lint",
"watch": "tsc -b tsconfig.build.json -w",
"test": "jest",
"lint": "npm run lint --workspaces",
"publish": "npm run build && npm publish --access public"
"prepare-next": "npm run prepare:next --if-present --workspaces",
"publish-next": "npm publish --tag next --access public --workspaces",
"publish-latest": "npm run prepare && npm publish --tag latest --access public --workspaces"
},
"devDependencies": {
"@types/jest": "^28.0.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/vscode-messenger-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"build": "tsc",
"watch": "tsc --watch",
"lint": "eslint src",
"publish:next": "npm --no-git-tag-version version \"$(semver $npm_package_version -i minor)-next.$(git rev-parse --short HEAD)\" && npm publish --tag next",
"prepare:next": "npm --workspaces-update false --no-git-tag-version version \"$(semver $npm_package_version)-next.$(git rev-parse --short HEAD)\"",
"publish:next": "npm publish --tag next",
"publish:latest": "npm publish --tag latest"
},
"repository": {
Expand All @@ -33,4 +34,4 @@
"name": "TypeFox",
"url": "https://www.typefox.io"
}
}
}
2 changes: 1 addition & 1 deletion packages/vscode-messenger-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"dependencies": {
"@vscode/webview-ui-toolkit": "~1.0.0",
"vscode-messenger": "~0.5.0"
"vscode-messenger": "^0.5"
},
"devDependencies": {
"@types/vscode": "^1.70.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode-messenger-webview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"watch": "tsc --watch",
"lint": "eslint src",
"test": "jest --config ./jest.config.json",
"prepare-next": "npm --no-git-tag-version version \"$(semver $npm_package_version -i minor)-next.$(git rev-parse --short HEAD)\"",
"prepare:next": "npm --workspaces-update false --no-git-tag-version version \"$(semver $npm_package_version)-next.$(git rev-parse --short HEAD)\"",
"publish:next": "npm publish --tag next",
"publish:latest": "npm publish --tag latest"
},
"dependencies": {
"vscode-messenger-common": "^0.5.0"
"vscode-messenger-common": "^0.5"
},
"devDependencies": {
"jsdom": "^17.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode-messenger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"watch": "tsc --watch",
"lint": "eslint src",
"test": "jest",
"prepare-next": "npm --no-git-tag-version version \"$(semver $npm_package_version -i micro)-next.$(git rev-parse --short HEAD)\"",
"prepare:next": "npm --workspaces-update false --no-git-tag-version version \"$(semver $npm_package_version)-next.$(git rev-parse --short HEAD)\"",
"publish:next": "npm publish --tag next",
"publish:latest": "npm publish --tag latest"
},
"dependencies": {
"vscode-messenger-common": "^0.5.0"
"vscode-messenger-common": "^0.5"
},
"devDependencies": {
"@types/vscode": "^1.53.0"
Expand Down
45 changes: 33 additions & 12 deletions releasing.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,54 @@
#### Update versions
# Releasing

Change versions and dependency versions
## Release NPM packages

Packages are:

- vscode-messenger-common (shared)
- vscode-messenger (vscode API)
- vscode-messenger-webview (webview API)

### Release next version

Run install to resolve dependencies, that also runs prepare steps `clean` and `build`.

```bash
npm install
```

#### Common
Update versions to add `-next.<git-commit>` suffix.

```bash
cd packages/vscode-messenger-common
npm run build && npm run publish:latest
npm run prepare-next
```

#### Extension
Publish this version with tag `next`.

```bash
cd ../vscode-messenger
npm run build && npm run publish:latest
npm run publish-next
```

#### Webview
### Release new version

Run install to resolve dependencies, that also runs prepare steps `clean` and `build`.

```bash
cd ../vscode-messenger-webview
npm run build && npm run publish:latest
npm install
```

#### Devtools extension build
Manually change versions and dependency versions. This includes package.json files in the NPM packages. See the list above.

Publish this version with tag `latest`.

```bash
npm run publish-latest
```

## Devtools extension

Extension package is `vscode-messenger-devtools`.

### Devtools extension build

- Add a changelog.md entry

Expand Down

0 comments on commit bab86db

Please sign in to comment.