You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BREAKING CHANGE: Drop IE 11, Safari 8, iOS 8, Android 4.4 browser support.
Minimum browser targets are now rolling modern versions aligned with
Shopify Online Store themes. The library now emits ES2015+ JavaScript
(native classes, arrow functions, template literals) and no longer
transpiles to ES5.
- Update browserslist to union of @shopify/browserslist-config + Theme Store
requirements
- Remove 15 Babel ES5 transform plugins + dead @babel/plugin-external-helpers
- Remove 7 polyfill imports from buybutton.js (whatwg-fetch, core-js/*)
- Replace UglifyJS with terser for ES2015+-compatible minification
- Add terser error guard against silent minification failure
- Keep @babel/plugin-transform-modules-commonjs for Browserify test pipeline
(until PR 7a)
- Native ES2015 classes replace loose-mode Babel classes (non-enumerable
prototype methods)
- Create major changeset for 4.0.0 version bump
- Pin pnpm/action-setup to commit SHA in ci.yml (supply chain hardening)
- Add @changesets/changelog-github as explicit devDependency (was phantom)
Drop IE 11, Safari 8, iOS 8, Android 4.4 browser support. Minimum browser targets are now rolling modern versions aligned with Shopify Online Store themes. The library now emits ES2015+ JavaScript (native classes, arrow functions, template literals) and no longer transpiles to ES5.
@@ -211,7 +211,7 @@ All 49 source files are categorized by dependency depth. Each tier must be conve
211
211
**Rationale:** Buy-button-js is embedded on merchant storefronts — the same browser environment as the theme itself. If the theme works, the buy button must work. Auto-advancing rolling targets mean zero maintenance.
1. Remove 15 Babel ES5 transform plugins (retain `@babel/plugin-transform-modules-commonjs` for Browserify test pipeline until PR 7a)
215
215
2. Replace UglifyJS with terser as interim minifier (UglifyJS can't parse ES2015+ — blocking the Vite migration). Terser is removed once Vite handles minification.
Copy file name to clipboardExpand all lines: docs/tasks/tasks-prd-typescript-migration.md
+30-65Lines changed: 30 additions & 65 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This migration is structured across ~28 PRs in 5 phases. Phases 1-2 are complete
6
6
7
7
**Exit criteria for every PR:**`pnpm test` passes, `pnpm run build` produces correct bundles, `pnpm run type-check` passes, `pnpm run lint` passes.
8
8
9
-
**Note on package manager commands:** All commands in this document use `pnpm` (the target state after PR 3). Before PR 3 is complete, the project uses Yarn (`yarn test`, `yarn run build`, etc.). The `pretest` script in package.json also uses `npm run` — this should be updated to `pnpm run` in PR 3.
9
+
**Note on package manager commands:** All commands in this document use `pnpm`, which is the active package manager since PR 3.
10
10
11
11
## Source File Inventory (49 files)
12
12
@@ -196,82 +196,47 @@ Use Graphite (gt) commands for managing stacked branches:
-[ ] 3.5. Update `.github/workflows/npm-release.yml`: replace `yarn install` with `pnpm install`, `npx changeset` with `pnpx changeset`. Add pnpm setup step.
210
210
211
-
-[] 3.6. Update `.github/workflows/snapit.yml`: same pattern — replace yarn/npm with pnpm equivalents. Add pnpm setup step.
211
+
-[x] 3.6. Update `.github/workflows/snapit.yml`: same pattern — replace yarn/npm with pnpm equivalents. Add pnpm setup step.
212
212
213
-
-[] 3.7. Verify: `pnpm test` passes, `pnpm run build` produces correct output, `pnpm run type-check` passes
213
+
-[x] 3.7. Verify: `pnpm test` passes, `pnpm run build` produces correct output, `pnpm run type-check` passes
214
214
215
-
-[] 3.8. **[PR BOUNDARY]** Submit PR 3 using `gt submit`
215
+
-[x] 3.8. **[PR BOUNDARY]** Submit PR 3 using `gt submit`
216
216
217
-
-[]4. Drop IE 11 + Modernize Browser Targets — MAJOR VERSION BUMP (PR 4)
217
+
-[x]4. Drop IE 11 + Modernize Browser Targets — MAJOR VERSION BUMP (PR 4) — PR 4a: [PR #945](https://github.com/Shopify/buy-button-js/pull/945), PR 4b: [PR #946](https://github.com/Shopify/buy-button-js/pull/946)
218
218
219
-
-[] 4.1. Create new branch using `gt create typescript-migration-part-4`
219
+
-[x] 4.1. Create new branch using `gt create typescript-migration-part-4`
220
220
221
-
-[] 4.2. Update `package.json` and create changeset:
221
+
-[x] 4.2. Update `package.json` and create changeset:
222
222
- Create a major changeset via `pnpm changeset` (select `major` bump) with description: "Drop IE 11, Safari 8, iOS 8, Android 4.4 browser support. Minimum browser targets are now rolling modern versions aligned with Shopify Online Store themes." Do NOT edit `version` in package.json directly — changesets manages this.
223
-
- Replace `browserslist` with modern rolling targets:
- [ ] 4.6. Replace UglifyJS with terser in `script/build.js`: Install `terser` as devDep, replace `uglify-js` calls with terser equivalents. Terser supports ES2015+ syntax (unlike UglifyJS) and serves as the interim minifier until Vite replaces the build pipeline in PR 6.
267
-
268
-
- [ ] 4.7. Remove UglifyJS from dependencies: `uglify-js`
- Replace `browserslist` with modern rolling targets (union of `@shopify/browserslist-config` + Theme Store requirements)
224
+
225
+
-[x] 4.3. Update `.babelrc`: remove 15 ES5 transform plugins; retain `@babel/plugin-transform-modules-commonjs` in development env for Browserify test pipeline (removed in PR 7a)
-[x] 4.5. Remove polyfill dependencies from `package.json`: `core-js`, `whatwg-fetch`
230
+
231
+
-[x] 4.6. Replace UglifyJS with terser in `script/build.js`: Install `terser` as devDep, replace `uglify-js` calls with terser equivalents. Terser supports ES2015+ syntax (unlike UglifyJS) and serves as the interim minifier until Vite replaces the build pipeline in PR 6.
232
+
233
+
-[x] 4.7. Remove UglifyJS from dependencies: `uglify-js`
234
+
235
+
-[x] 4.8. CHANGELOG breaking change is documented via major changeset (automatic CHANGELOG generation enabled in PR 4a)
236
+
237
+
-[x] 4.9. Verify: `pnpm test` passes, `pnpm run build` produces correct output, `pnpm run type-check` passes
238
+
239
+
-[x] 4.10. **[PR BOUNDARY]** Submit PR 4 using `gt submit`
@@ -784,7 +749,7 @@ Since Vitest natively handles both `.js` and `.ts` test files, test conversion i
784
749
## Important Learnings from Initial Setup
785
750
786
751
### Package Manager
787
-
**CRITICAL:** This project currently uses **Yarn v1**, but will migrate to **pnpm** in PR 3. Until PR 3 is complete, use `yarn` commands. After PR 3, use `pnpm` exclusively.
752
+
This project uses **pnpm** (migrated from Yarn v1 in PR 3).
788
753
789
754
### Build System Architecture
790
755
- Currently: Rollup with Babel for builds (migrates to Vite in PR 6)
0 commit comments