Skip to content

Commit fe626b3

Browse files
committed
updating preview release versions
1 parent 1e8ec00 commit fe626b3

File tree

8 files changed

+60
-14
lines changed

8 files changed

+60
-14
lines changed

.github/scripts/create-preview-release.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,19 @@ export async function createPreviewRelease({ github, context, version, distDir }
1919
2020
### Installation
2121
22-
Download both tgz files and install them together:
22+
Download the tgz file and install:
2323
2424
\`\`\`bash
25-
npm install ./salesforce-b2c-tooling-sdk-${version}.tgz \\
26-
./salesforce-b2c-cli-${version}.tgz
25+
npm install ./salesforce-b2c-cli-${version}.tgz
2726
\`\`\`
2827
2928
Or install globally:
3029
3130
\`\`\`bash
32-
npm install -g ./salesforce-b2c-tooling-sdk-${version}.tgz \\
33-
./salesforce-b2c-cli-${version}.tgz
31+
npm install -g ./salesforce-b2c-cli-${version}.tgz
3432
\`\`\`
3533
36-
> **Note:** Both packages must be installed together since the CLI depends on the SDK.
34+
> **Note:** The SDK is bundled in the CLI package.
3735
`;
3836

3937
// Create the release

.github/workflows/preview-release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ jobs:
5858
- name: Run tests
5959
run: pnpm -r run test:unit
6060

61-
- name: Pack all packages
61+
- name: Deploy and pack CLI with bundled SDK
6262
run: |
6363
mkdir -p dist
64-
pnpm pack -r --pack-destination ./dist
64+
pnpm --filter @salesforce/b2c-cli deploy --legacy ./dist-deploy
65+
cd ./dist-deploy && npm pack --pack-destination ../dist
6566
6667
- name: List packed files
6768
run: ls -la dist/

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,40 @@ See the [documentation site](https://salesforcecommercecloud.github.io/b2c-devel
162162

163163
When adding new public APIs, ensure they have comprehensive JSDoc comments as these will appear in the generated documentation.
164164

165+
## Preview Releases
166+
167+
This project is not yet published to npm. Preview releases are available as tgz files on [GitHub Releases](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/releases).
168+
169+
### Installing a Preview Release
170+
171+
1. Download the `salesforce-b2c-cli-<version>.tgz` file from the release
172+
2. Install with npm:
173+
174+
```bash
175+
# Install globally
176+
npm install -g ./salesforce-b2c-cli-0.0.1-preview.1.tgz
177+
178+
# Or install locally in a project
179+
npm install ./salesforce-b2c-cli-0.0.1-preview.1.tgz
180+
```
181+
182+
The SDK is bundled in the CLI package, so only one file is needed.
183+
184+
### Creating a Preview Release
185+
186+
Preview releases are created automatically when a tag matching `v*-preview*` is pushed:
187+
188+
```bash
189+
git tag v0.0.1-preview.1
190+
git push origin v0.0.1-preview.1
191+
```
192+
193+
The [preview-release workflow](.github/workflows/preview-release.yml) will:
194+
1. Update package versions from the tag
195+
2. Build and test all packages
196+
3. Create a bundled tarball using `pnpm deploy`
197+
4. Create a GitHub release with the tarball attached
198+
165199
## Package Exports
166200

167201
The `@salesforce/b2c-tooling-sdk` package uses the `exports` field in package.json to define its public API surface. Each module is available as a subpath export:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@salesforce/b2c-cli-root",
3-
"version": "0.0.1",
3+
"version": "0.0.1-preview",
44
"description": "Salesforce Commerce Cloud B2C Command Line Tools",
55
"main": "index.js",
66
"scripts": {

packages/b2c-cli/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ A command-line interface for Salesforce Commerce Cloud B2C.
1111

1212
## Installation
1313

14+
### Preview Release (Pre-npm)
15+
16+
Download the latest tarball from [GitHub Releases](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/releases) and install:
17+
18+
```sh
19+
npm install -g ./salesforce-b2c-cli-0.0.1-preview.1.tgz
20+
```
21+
22+
### From npm (Coming Soon)
23+
1424
```sh
1525
npm install -g @salesforce/b2c-cli
1626
```

packages/b2c-cli/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@salesforce/b2c-cli",
33
"description": "A Salesforce Commerce Cloud B2C CLI",
4-
"version": "0.0.0",
4+
"version": "0.0.1-preview",
55
"author": "Charles Lavery",
66
"bin": {
77
"b2c": "./bin/run.js"
@@ -17,12 +17,14 @@
1717
"@salesforce/b2c-tooling-sdk": "workspace:*",
1818
"cliui": "^9.0.1"
1919
},
20+
"bundleDependencies": [
21+
"@salesforce/b2c-tooling-sdk"
22+
],
2023
"devDependencies": {
2124
"@eslint/compat": "^1",
2225
"@oclif/prettier-config": "^0.2.1",
2326
"@oclif/test": "^4",
2427
"@salesforce/dev-config": "^4.3.2",
25-
"eslint-plugin-header": "^3.1.1",
2628
"@types/chai": "^4",
2729
"@types/mocha": "^10",
2830
"@types/node": "^18",
@@ -31,6 +33,7 @@
3133
"eslint": "^9",
3234
"eslint-config-oclif": "^6",
3335
"eslint-config-prettier": "^10",
36+
"eslint-plugin-header": "^3.1.1",
3437
"eslint-plugin-prettier": "^5.5.4",
3538
"mocha": "^10",
3639
"oclif": "^4",

packages/b2c-dx-mcp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@salesforce/b2c-dx-mcp",
3-
"version": "0.0.0",
3+
"version": "0.0.1-preview",
44
"description": "MCP server for B2C Commerce Cloud developer experience tools",
55
"author": "Salesforce",
66
"license": "MIT",
@@ -91,8 +91,8 @@
9191
"chai": "^4",
9292
"eslint": "^9",
9393
"eslint-config-oclif": "^6",
94-
"eslint-plugin-header": "^3.1.1",
9594
"eslint-config-prettier": "^10",
95+
"eslint-plugin-header": "^3.1.1",
9696
"eslint-plugin-prettier": "^5.5.4",
9797
"mocha": "^10",
9898
"oclif": "^4",

packages/b2c-tooling-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@salesforce/b2c-tooling-sdk",
3-
"version": "0.0.0",
3+
"version": "0.0.1-preview",
44
"description": "Core tooling library for Salesforce Commerce Cloud B2C CLI",
55
"author": "Charles Lavery",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)