Skip to content

Commit f334b26

Browse files
xuanjie22meta-codesync[bot]
authored andcommitted
Bump Client JS SDK to v1.3.1 to publish umdNamedDefine fix
Summary: The `umdNamedDefine: true` webpack fix (D105386494) landed and was tagged as GitHub release v1.3.1, but the npm package was never bumped past 1.3.0. As a result, the bundle served via unpkg (https://unpkg.com/meta-capi-param-builder-clientjs/dist/clientParamBuilder.bundle.js) still ships the old 1.3.0 build with the anonymous `define([], t)`, so consumers pulling from npm/unpkg never received the fix. This was reported in #32. This diff bumps `package.json` from 1.3.0 to 1.3.1, adds a v1.3.1 CHANGELOG entry, and updates the stale Client JS row in the top-level README version table (was 1.2.2). The webpack `DefinePlugin` injects the version from `package.json` into the bundle, so the version must be bumped for a fresh build to embed 1.3.1. Release context (per the CAPI param builder CI/CD cook book): the Client JS SDK is published to npm only when a `vx.x.x-clientjs` git tag is pushed to the public GitHub repo, which triggers a GitHub Actions CD workflow (Trusted Publishers / OIDC — no auth token needed). The tagged GitHub commit must already contain `package.json` at 1.3.1, and `client_js` only reaches GitHub via ShipIt after this diff lands. Therefore this diff must land first; ShipIt then async-syncs it to GitHub; only then can the release tag be pushed. The supported-version prerequisite (`CAPIParamBuilderSupportedVersionUtil.php` must contain the new version for metrics) is already satisfied — `V1_3_1 = 'v1.3.1'` is present in the enum. After this lands and the npm publish runs, unpkg will serve the bundle containing the named `define('clientParamBuilder', [], t)`, resolving the RequireJS / Magento 2 checkout conflict for npm/unpkg consumers. Reviewed By: jyou23github Differential Revision: D107943908 fbshipit-source-id: 79e92b4a669808abe23ef9be7c399b8183af15ba
1 parent cd781a0 commit f334b26

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ examples.
2525
| Python | 1.3.0 | `capi-param-builder-python` | [PyPI](https://pypi.org/project/capi-param-builder-python/) |
2626
| Java | 1.3.0 | `com.facebook.capi.sdk:capi-param-builder` | [Maven Central](https://mvnrepository.com/artifact/com.facebook.capi.sdk/capi-param-builder) |
2727
| Ruby | 1.3.0 | `capi_param_builder_ruby` | [RubyGems](https://rubygems.org/gems/capi_param_builder_ruby) |
28-
| Client JS | 1.2.2 | `meta-capi-param-builder-clientjs` | [npm](https://www.npmjs.com/package/meta-capi-param-builder-clientjs) |
28+
| Client JS | 1.3.1 | `meta-capi-param-builder-clientjs` | [npm](https://www.npmjs.com/package/meta-capi-param-builder-clientjs) |
2929

3030
---
3131

client_js/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
44

55
## Unreleased
66

7+
## Version v1.3.1
8+
- Added `umdNamedDefine: true` to the webpack UMD output so the bundle emits a named `define('clientParamBuilder', [], ...)` instead of an anonymous `define([], ...)`. This prevents RequireJS (e.g. on Magento 2 checkout pages) from intercepting the anonymous module and breaking page JavaScript.
9+
710
## Version v1.3.0
811
- Standardized on yarn as the sole package manager — removed all npm references
912
- Switched CI workflow from npm to yarn (`yarn install --frozen-lockfile`, `yarn test`, `yarn build`)

client_js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "meta-capi-param-builder-clientjs",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Conversions API parameter builder for Client-side JavaScript",
55
"author": "Facebook",
66
"license": "SEE LICENSE IN LICENSE",

0 commit comments

Comments
 (0)