@eclipse-glsp/cli 2.7.0 → 2.8.0-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -4
- package/bin/glsp.js +31 -0
- package/dist/cli.js +12247 -2175
- package/dist/cli.js.map +3 -3
- package/package.json +29 -27
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ The contributed `glsp`, is a command line tool that offers all contributed comma
|
|
|
8
8
|
Install `@eclipse-glsp/cli` as a dev dependency in your application.
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
11
|
+
pnpm add --save-dev @eclipse-glsp/cli
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
## Usage
|
|
@@ -63,7 +63,8 @@ Options:
|
|
|
63
63
|
|
|
64
64
|
## coverageReport
|
|
65
65
|
|
|
66
|
-
The `coverageReport` command can be used to create a full nyc test coverage report for a
|
|
66
|
+
The `coverageReport` command can be used to create a full nyc test coverage report for a pnpm/yarn mono repository.
|
|
67
|
+
The package manager is auto-detected from the repository (pnpm-workspace.yaml/pnpm-lock.yaml vs. yarn.lock).
|
|
67
68
|
Individual coverage reports for each package are created and then combined to a full report.
|
|
68
69
|
|
|
69
70
|
```console
|
|
@@ -142,14 +143,15 @@ Commands:
|
|
|
142
143
|
version [options] <versionType> [customVersion] Set the version of all packages in a GLSP repository
|
|
143
144
|
prepare [options] <versionType> [customVersion] Prepare a new release for a GLSP component (version bump, changelog, PR
|
|
144
145
|
creation ...)
|
|
146
|
+
publish [options] <distTag> Publish all workspace packages of a GLSP repository
|
|
145
147
|
help [command] display help for command
|
|
146
148
|
```
|
|
147
149
|
|
|
148
150
|
### version
|
|
149
151
|
|
|
150
152
|
Command to bump the version of all packages in a GLSP repository.
|
|
151
|
-
|
|
152
|
-
In addition, external GLSP dependencies are considered and bumped as well.
|
|
153
|
+
This bumps the version of all workspace packages (the root `package.json` version is the source of truth).
|
|
154
|
+
In addition, external GLSP dependencies are considered and bumped as well; `workspace:` ranges are preserved.
|
|
153
155
|
The glsp repository type ("glsp-client", "glsp-server-node" etc.) is auto detected from the given repository path.
|
|
154
156
|
If the command is invoked in a non-GLSP repository it will fail.
|
|
155
157
|
|
|
@@ -199,6 +201,39 @@ Options:
|
|
|
199
201
|
-h, --help display help for command
|
|
200
202
|
```
|
|
201
203
|
|
|
204
|
+
### publish
|
|
205
|
+
|
|
206
|
+
Publishes all (public) workspace packages of a GLSP repository (replaces `lerna publish`).
|
|
207
|
+
The package manager is auto-detected: pnpm-based repositories publish via `pnpm publish -r`, while
|
|
208
|
+
not-yet-migrated yarn/lerna-based repositories fall back to the legacy `lerna publish`.
|
|
209
|
+
|
|
210
|
+
- `next`: applies a canary version (`<root-version>.<commits-since-last-tag>`, e.g. `2.8.0-next.42`) to all
|
|
211
|
+
workspace packages and publishes them under the `next` dist-tag. Requires the full git history
|
|
212
|
+
(`fetch-depth: 0` in CI) to derive the commit count.
|
|
213
|
+
- `latest`: publishes the current package versions under the `latest` dist-tag. Packages whose version
|
|
214
|
+
already exists on the registry are skipped.
|
|
215
|
+
|
|
216
|
+
For pnpm repositories publishing is delegated to `pnpm publish -r`, so `workspace:` dependency ranges are
|
|
217
|
+
rewritten to exact versions; in both cases npm provenance/trusted publishing (`NPM_CONFIG_PROVENANCE`) is
|
|
218
|
+
preserved. `--dry-run` is only supported for pnpm-based repositories.
|
|
219
|
+
|
|
220
|
+
```console
|
|
221
|
+
$ glsp releng publish -h
|
|
222
|
+
Usage: glsp releng publish [options] <distTag>
|
|
223
|
+
|
|
224
|
+
Publish all workspace packages of a GLSP repository (pnpm: `pnpm publish`, yarn/lerna: `lerna publish`)
|
|
225
|
+
|
|
226
|
+
Arguments:
|
|
227
|
+
distTag The npm dist-tag to publish under (choices: "next", "latest")
|
|
228
|
+
|
|
229
|
+
Options:
|
|
230
|
+
-v, --verbose Enable verbose (debug) log output (default: false)
|
|
231
|
+
-r, --repoDir <repoDir> Path to the component repository (default: "<cwd>")
|
|
232
|
+
--dry-run Derive versions and run `pnpm publish` in dry-run mode without applying changes (default: false)
|
|
233
|
+
--registry <url> Publish to a custom npm registry (e.g. a local verdaccio for testing)
|
|
234
|
+
-h, --help display help for command
|
|
235
|
+
```
|
|
236
|
+
|
|
202
237
|
## repo
|
|
203
238
|
|
|
204
239
|
Multi-repository workspace management for GLSP development.
|
package/bin/glsp.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
// Stable launcher committed to the repository so the `glsp` bin symlink can
|
|
18
|
+
// always be created at install time. The actual CLI is the esbuild bundle in
|
|
19
|
+
// `dist/`, which is a build artifact and may not exist yet on a fresh checkout.
|
|
20
|
+
const path = require('path');
|
|
21
|
+
const distEntry = path.join(__dirname, '..', 'dist', 'cli.js');
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
require(distEntry);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
if (error && error.code === 'MODULE_NOT_FOUND' && error.message.includes(distEntry)) {
|
|
27
|
+
console.error("The GLSP CLI has not been built yet. Run 'pnpm build' in the @eclipse-glsp/cli package first.");
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
throw error;
|
|
31
|
+
}
|