Commit Graph
100 Commits
Author SHA1 Message Date
John Lees-Miller df5c9fd8ea Merge pull request #36881 from overleaf/jlm-recurly-stripe-payment-heal-review
Heal migrated payment methods before renewal

GitOrigin-RevId: 72e33e73b3ca0b771ff0124e8a59e12118922573
2026-09-17 12:05:09 +00:00
John Lees-Miller 35271cb33c Merge pull request #36639 from overleaf/jlm-github-sync-distinguish-404s
Distinguish GitHub's repo-lookup 404 from its commit-comparison 404

GitOrigin-RevId: 67cd1d3af1fde553fc200371f5d2ec020c7245fa
2026-09-17 12:00:40 +00:00
John Lees-MillerandClaude Opus 5 1ecdd122d0 Add Stripe migration features for stage 7 testing (part 2) (#35890)
* upsert: migrate US/CA PayPal without a payment method when flagged

getPaymentMethod no longer throws for a PayPal billing agreement destined for
Stripe US/CA when the account is flagged ignore_payment_method; instead it
returns null so the customer is migrated without a default payment method
(the send_invoice paymentMethodPending flow). Unflagged accounts still throw.

* finalize: expect the plan-code remap for legacy-plan subscriptions

When a subscription carries legacy_remap=1 metadata, compare the Stripe product's planCode against the recorded target plan code instead of the raw Recurly plan code, so the intentional remap is not misread as drift (the price is preserved, so the amount comparison is unchanged). Clear the legacy_remap metadata during post-migration cleanup.

* finalize: expect the assistant add-on reprice

When a subscription carries assist_addon_repriced=1 metadata, compare the assistant item against the recorded target amount (Stripe minor units) instead of the raw Recurly amount, so the intended reprice is not misread as drift. Clear the reprice metadata during post-migration cleanup.

* create_coupons: create migration coupons by name with amount_off, currency and product scope

Create the pipeline's per-region coupon_specs_<region>.csv coupons by name (idempotent, auto-paginated), supporting amount_off + currency (fixed) or percent_off, duration, and applies_to.products, with no promotion code. Region comes from the existing --region flag. The existing name-based percent-off + promotion-code path is unchanged.

* finalize: schedule the pending change as a phase 2

For a subscription flagged pending_change_scheduled, compare drift against the current Recurly state (not the pending change), then in Step 7 release the toolkit schedule and create a fresh two-phase subscription schedule (current until renewal; pending state from renewal with proration disabled and end_behavior release), clearing the scheduling metadata once the schedule exists.

* finalize: flag address-pending migrations and push the needs_to_update_address trait

When a migrated subscription carries metadata.addressPending, append -address-pending to the finalization status and push needs_to_update_address to customer.io (alongside the existing tax-info-pending handling), so the customer can be driven to add a billing address. The flag stays on the subscription so the customer.updated webhook can enable automatic_tax and clear it once the address resolves.

* webhook: heal address-pending migrations when the tax location resolves

On customer.updated (address/tax change), for a customer whose location is no longer unrecognized_location, enable automatic_tax on their migrated subscriptions still flagged metadata.addressPending and clear the flag. Enabling automatic_tax is rejected by Stripe while the location is still invalid, so the update is a safe idempotent no-op until the address is fixed; the cancellation state is never touched.

* cron: cancel unresolved address-pending subscriptions before they renew untaxed

Backstop for the address-pending cohort: searches the address-pending subscriptions in a region and, for any about to renew (within a configurable lead window) whose customer location is still unrecognized_location, cancels it at period end so it never renews untaxed. Skips subscriptions that are already cancelling and those whose location has resolved (healed by the webhook). Dry-run unless --commit.

* upsert: set tax.validate_location=auto on customer update

Conform PAN-copied customers to the account's default tax-location validation. Uses 'auto' rather than 'immediately' (which throws for country-only addresses and would break the address-pending migration flow).

* finalize-migration: send payment method info to customer.io

Add payment_method (card/paypal/none) and needs_to_add_payment_method
traits to the stripe_migration customer.io payload so the migration
email campaign can personalise per payment method without enumerating
the full cross-join. The payment method is read from the already-fetched
customer/subscription (default_payment_method now expanded on that fetch),
so no extra Stripe request is made. Also report a -payment-method-pending
status suffix in the CSV output.

* upsert: flag customers whose address Stripe cannot resolve

After pushing the Recurly address, read customer.tax.automatic_tax; when it is 'unrecognized_location', record address_unrecognized in the output so the subscription is migrated untaxed (address-pending) instead of failing at the billing-migration toolkit. This is the authoritative, region-agnostic detector (covers US/CA country-only and broken non-US addresses, e.g. India with a postal but no state/city). Adds isCustomerAddressUnrecognized helper + unit tests.

* Close reactivation-without-valid-address loophole

* webhook: detect newly-set address/tax with !== undefined

Review follow-up: the address-pending heal guard used a truthy check, which
would miss an address newly set from empty. Harmonise with _billingChanges,
which already uses !== undefined.

* upsert: set tax.validate_location via customerParams

Review follow-up: move the tax.validate_location='auto' directive into the
assembled customerParams instead of overriding it inline at the update call,
so it also appears in the dry-run output.

* create_coupons: guard migration coupons against ambiguous discount specs

Review follow-up: throw a clear per-coupon error if a migration coupon spec
has neither or both of amount_off/percent_off, catching data-processing
issues instead of silently sending percent_off=NaN.

* Rely on presence of customer.tax

* webhook: cover the address-pending heal path in unit tests

The customer.updated fixtures carried no `tax` hash and the mocked region
client had no `stripe` property, so the one test that reached the heal branch
threw and was swallowed by the caller's error handler. The heal logic had no
real coverage as a result.

Add the missing fixture fields and tests covering the heal itself, the
still-unrecognized early return, the skip rules for unflagged and cancelled
subscriptions, the Stripe rejection path that leaves the flag set, and the
missing-tax guard.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
GitOrigin-RevId: 8162e3e0f01e136d3aa560c22e98f43e36da4eb5
2026-09-17 11:58:48 +00:00
John Lees-Miller b263fd2144 Merge pull request #35464 from overleaf/jlm-recurly-stripe-axis-c-review
Add Stripe migration features for stage 7 testing (part 1)

GitOrigin-RevId: 2750aea7cf611da8e53a2748a11601d617d260e0
2026-09-17 11:28:09 +00:00
John Lees-Miller e4dd97936a Remove mirror-documentation job (#35399)
* Remove mirror-documentation job

* Update yarn.lock after removing mirror-documentation

GitOrigin-RevId: b6be94f44ff4d2aaeda14798f7232cf89a54eeee
2026-09-17 11:23:23 +00:00
John Lees-Miller aa97f5794c [git-bridge] fix symlink handling (#35133)
GitOrigin-RevId: 282823db63f64bfae950b00e77a6cdc2a048b0ce
2026-09-17 11:16:15 +00:00
John Lees-Miller b514ebcc8e Support analytics data in user export bundle
GitOrigin-RevId: 49739297f40831cf035e2a9d4f3343a8cb2d7fdb
2025-11-25 09:06:20 +00:00
John Lees-Miller 241a4b6b03 Use worker for analytics user export
GitOrigin-RevId: 3e49d483c0d93fa67986332e77e9928889aab7a7
2025-11-25 09:06:16 +00:00
John Lees-Miller 9408d253da Remove apparently unused files
GitOrigin-RevId: 60a4427c9c8a58ae700244f06d80c574002e923c
2025-11-18 09:05:25 +00:00
John Lees-Miller 0d71c825a9 Bump fake-gcs version and fix resumable uploads
GitOrigin-RevId: b1f3cf74f59ff53961665e19826b2f10ac235016
2025-11-18 09:05:21 +00:00
John Lees-Miller e21a165050 Merge pull request #28505 from overleaf/jlm-fix-recurly-webhook-manual-charge
Handle manual charge in recurly webhook

GitOrigin-RevId: 0e84725cc99433f3e6bebbd4fd424a47b233b966
2025-09-23 08:06:16 +00:00
John Lees-Miller aa10bc92af Merge pull request #27890 from overleaf/jlm-spam-safe-email
Apply new spam check to email address

GitOrigin-RevId: 9e204ea75e930455971769a73843d015fc4a9033
2025-08-14 08:06:28 +00:00
John Lees-Miller cee0276eef Merge pull request #22418 from overleaf/jlm-spam-safe-length
Reduce spam safe project length

GitOrigin-RevId: 2bb128a24c4ad7630bf1c511d2e23a9bf45072ab
2024-12-10 09:05:29 +00:00
John Lees-Miller 05ac4b956d Merge pull request #18812 from overleaf/mj-mathjax-unicode
[web] Disable mathjax unicode package

GitOrigin-RevId: 0c42a7a531576af35c31377068763bee4674394d
2024-06-10 08:04:38 +00:00
John Lees-Miller 8f1dac6d68 Merge pull request #15195 from overleaf/tm-compile-timeout-20s-phase-two-date-change
Update new/existing user cut off date for compile timeout

GitOrigin-RevId: 382e8bc171f1d3728cfbaefa85d9c2d13779d4ee
2023-10-11 08:03:46 +00:00
John Lees-Miller 7939abdcab Merge pull request #14878 from overleaf/tm-compile-timeout-20s-split-test-fix
Fix for incorrect split test assignment function calls

GitOrigin-RevId: e942ee78a2a5fb3a6a50b6f73eb212afdccbe63d
2023-09-19 08:04:06 +00:00
John Lees-Miller 3487ddbc81 Merge pull request #14874 from overleaf/tm-compile-timeout-20s-plans-pages
Changes to the plans/interstitial pages for compile timeout reduction

GitOrigin-RevId: 753e6eaf98d70b8aa994ec9dcad5185dbbeb5a42
2023-09-19 08:04:01 +00:00
John Lees-Miller 2d9db134a2 Merge pull request #14544 from overleaf/jlm-add-history-restore-script
Add project recovery script

GitOrigin-RevId: b98fb2988245d2b67f8fc0711742294e895b1f07
2023-08-31 08:04:31 +00:00
John Lees-Miller 401f9d6297 Merge pull request #14526 from overleaf/jlm-improve-confirmed-email-check
Check confirmation on subscription new and create

GitOrigin-RevId: daf95be86d529427a128973f8185b2cf91ec940b
2023-08-28 08:04:52 +00:00
John Lees-Miller 2ad98aa61c Merge pull request #14460 from overleaf/tm-prevent-checkout-unconfirmed-email
Restrict checkout page for users without confirmed primary email

GitOrigin-RevId: a02b0f64824f8adc8f15ae24b9132569bd1029f3
2023-08-24 08:03:21 +00:00
John Lees-Miller 48ee8779f0 Merge pull request #14221 from overleaf/mj-regex-fix
[cm6] Remove negative lookbehind in regex

GitOrigin-RevId: 30c19680b1e20011945a7185a966100dc5e25d13
2023-08-09 08:04:36 +00:00
John Lees-Miller 7c7a3d7a9c Merge pull request #14143 from overleaf/jlm-unsampled-compiles
Remove compile sampling for analysis

GitOrigin-RevId: 2457977d61756be52db506d7c84531b22a26abe0
2023-08-03 08:04:12 +00:00
John Lees-Miller 26ebe22975 Link to global security policy
GitOrigin-RevId: 1711afb1aa1d6877b57e4ca4ded90c1522f93e0e
2023-03-10 09:04:40 +00:00
John Lees-Miller f4a9b7bf60 Remove incorrect trial filter
GitOrigin-RevId: b99d1560eb8aa2df259b1e892c3a8218e5c4ba5e
2023-02-23 09:04:21 +00:00
John Lees-Miller a880026cd9 Remove old overleaf-error-type library (#8643)
* Remove overleaf-error-type library

* Remove core tarball and prune error-type

* Remove local packages from project-history

GitOrigin-RevId: 8c9813dd950afa8f23d19bf503249a978fb23779
2022-07-01 08:05:03 +00:00
John Lees-Miller 82fadea82e Merge pull request #8569 from overleaf/msm-editor-core-oerror
[overleaf-core-editor] replace `overleaf-error-type` with `OError`

GitOrigin-RevId: 48e262cc0843abb9c6985b2a02463fd7589418af
2022-06-29 08:05:25 +00:00
John Lees-Miller 478898c437 Merge pull request #1024 from gucci-on-fleek/main
Parse class/`expl3`/`luatexbase` warnings
2022-06-22 22:28:58 +01:00
John Lees-Miller 092ef7925c Handle no splitTestVariants metadata
GitOrigin-RevId: c59262c51cffc92a38e40c1e3f08a92e5fa030b0
2022-06-22 08:05:02 +00:00
John Lees-Miller fcf9c92160 Split test for log parser changes
GitOrigin-RevId: efe9fb29c5ae56889b686692f8533ae0ae4a3b1d
2022-06-22 08:04:55 +00:00
John Lees-Miller 96a8f7ffa1 Merge pull request #8220 from overleaf/jlm-dependabot-tidy
Update and tidy dependabot configs

GitOrigin-RevId: dc3c37f7fca5c632a520d74dbbe0194c31ac9746
2022-05-31 08:04:15 +00:00
John Lees-Miller 01e0dfde26 Fix copybara PR import permissions issue (and cleanup) (#5433)
* Remove old copybara setup from web

* Fix copybara pr import file permissions

* Remove web copybara exclusion from copybara

* Remove misleading internal PR link

* Remove comma from generated PR title

GitOrigin-RevId: 1c2f70486cbcb45610b99cf6599064bc4944d766
2021-10-19 08:03:43 +00:00
John Lees-Miller c4f1020f2a Merge pull request #5440 from overleaf/revert-5430-import-public-pr-947
Revert "[Imported] Update real-time app.js, (#947)"

GitOrigin-RevId: 9aadf63459b861c4316ead76741a2a9aeea7aad3
2021-10-13 08:04:05 +00:00
John Lees-Miller faf93a6df1 Merge pull request #4905 from overleaf/revert-4900-import-public-pr-948
Revert "[Imported] It's 2021, (#948)"

GitOrigin-RevId: 0117c8aa391e99ddf906eb14c6ca102857f718c6
2021-08-30 08:03:07 +00:00
John Lees-Miller 1724daa2c5 Merge pull request #4900 from overleaf/import-public-pr-948
[Imported] It's 2021, (#948)

GitOrigin-RevId: 2054a1df37861a5c0a704ded7100f3a8b854b289
2021-08-30 08:03:04 +00:00
John Lees-Miller a1f66a5252 Fix ObjectId/String comparison in ensureRootDocumentIsValid (#4229)
GitOrigin-RevId: 8af2a74cd24cb5bfdfdcd1a25c16b94a66fa0843
2021-06-24 02:07:10 +00:00
John Lees-Miller acf603993b Fix some old README links
Some of these were redirects / inconsistent. Also clarify wording for SP link.
2021-06-14 11:57:40 +01:00
John Lees-Miller 2045ae02d1 Make it clear that the screenshot is Server Pro 2021-05-13 15:00:07 +01:00
John Lees-Miller 354fd3c3a6 Bump version to 3.3.1 2021-01-26 12:10:25 +00:00
John Lees-Miller 3a392fd8c1 Bump version to 3.3.0 2021-01-25 19:45:24 +00:00
John Lees-Miller 1f80139c40 Merge pull request #202 from overleaf/add-license
Add correct license
2020-12-03 10:37:50 +00:00
John Lees-Miller 8fec6723d8 Add correct license 2020-12-03 10:27:38 +00:00
John Lees-Miller 9b739f1c7d Bump version to 3.1.0 2020-09-25 16:10:12 +01:00
258cc08717 Add a limit on the number of tags, OError.maxTags (#13)
* Add OError.maxTags

* Tidy up package scripts and add a build script

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
2020-09-17 15:17:44 +01:00
John Lees-MillerandJakob Ackermann ea2d76de51 Improve tagging for a (maybe) null error (#12)
* Document a way of handling an error that might be null

* Make typecheck strict

* Test some edge cases

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
2020-09-11 10:05:54 +01:00
John Lees-Miller 0cebce64c8 Merge pull request #11 from overleaf/dependabot/npm_and_yarn/lodash-4.17.19
Bump lodash from 4.17.15 to 4.17.19
2020-07-20 09:50:34 +01:00
John Lees-Miller 6cc03cad0c Add coverage 2020-05-15 17:18:01 +01:00
John Lees-Miller c9d9982615 Update package.json metadata 2020-05-15 16:50:37 +01:00
John Lees-Miller 676bdb794b Merge pull request #10 from overleaf/v3
Rework to favor tagging over wrapping
2020-05-15 14:53:24 +01:00
John Lees-Miller d2f47e69a8 Bump version to 3.0.0 2020-05-15 11:25:12 +01:00
John Lees-Miller fd6ea2bb70 Add typescript types 2020-05-15 11:24:14 +01:00
John Lees-Miller 497f2a7936 Make tag check stricter and use a map 2020-05-15 11:07:08 +01:00
John Lees-Miller 4b0060f0b1 Remove HTTPErrors from v3 2020-05-15 10:45:08 +01:00
John Lees-Miller 90494fd75f Fix demo require path 2020-05-15 10:36:00 +01:00
John Lees-Miller 8af22ae878 Improve assertion messages in test utility 2020-05-15 10:32:18 +01:00
John Lees-Miller c44054a31b Add cast for the fake TaggedError 2020-05-05 09:06:15 +01:00
John Lees-MillerandEric Mc Sween fc197630be Avoid capturing stack trace twice
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
2020-05-05 09:02:11 +01:00
John Lees-Miller 6078aa963d Add typecheck to CI 2020-04-30 10:29:23 +01:00
John Lees-Miller f6eb185f84 Update README for v3 2020-04-30 10:29:23 +01:00
John Lees-Miller 09cd72d51c Rework to favor tagging over wrapping 2020-04-29 21:08:58 +01:00
John Lees-Miller 1a38f4e4ff Add typescript for type checking 2020-04-29 21:03:41 +01:00
John Lees-Miller c46075aaab Make constructor take only message and info 2020-04-17 15:45:08 +01:00
John Lees-Miller 0acf1d338d Merge pull request #9 from overleaf/lint
Set up linting
2020-04-17 14:43:43 +01:00
John Lees-Miller c000bdc43c Add standard and fix complaints 2020-04-17 10:59:27 +01:00
John Lees-Miller 4b903626b4 Apply linting rules 2020-04-17 09:14:35 +01:00
John Lees-Miller f80753fe40 Add linting and formatting 2020-04-17 09:14:35 +01:00
John Lees-Miller 113c2cc5ec Add CI badge 2020-04-17 09:13:04 +01:00
John Lees-Miller f2a9a3e240 Merge pull request #8 from overleaf/circleci-project-setup
Add .circleci/config.yml
2020-04-17 09:11:46 +01:00
John Lees-Miller ad6b25e2c1 Add .circleci/config.yml 2020-04-17 09:10:47 +01:00
John Lees-Miller 2a5b6ccd98 Merge pull request #7 from overleaf/fix-expect
Fix incorrect expect
2020-01-28 13:44:15 +00:00
John Lees-Miller 59156ec89e Fix incorrect expect 2020-01-27 10:45:31 +00:00
John Lees-Miller 618bd624e6 Merge pull request #60 from overleaf/config-update
Update config
2019-09-28 16:10:39 +01:00
John Lees-Miller 8b99551d9f Merge pull request #90 from overleaf/config-update
Update config
2019-09-28 16:10:28 +01:00
John Lees-Miller e2f32b544d Merge pull request #28 from overleaf/config-update
Update config
2019-09-28 16:08:24 +01:00
John Lees-Miller 98a438112b Update config 2019-09-28 11:54:17 +01:00
John Lees-Miller c5d9bf1093 Update config 2019-09-28 11:08:32 +01:00
John Lees-Miller c5a9105c33 Update config 2019-09-28 11:07:33 +01:00
John Lees-Miller 626511fa73 Bump version number 2019-09-19 16:11:59 +01:00
John Lees-Miller 9dc65ebc82 Update mailing list link 2019-08-15 10:55:25 +01:00
John Lees-Miller f0d59bc192 Bump lodash version 2019-07-30 09:34:49 +01:00
John Lees-Miller 1482e6841b Bump to 1.8.0 and include license 2019-07-11 13:07:47 +01:00
John Lees-Miller 0dd8b124bd Remove private from package.json 2019-07-08 13:24:03 +01:00
John Lees-Miller bc224b43c9 Add repository to package.json 2019-07-08 13:22:49 +01:00
John Lees-Miller bf8448073c Merge pull request #5 from overleaf/publish
Prepare to publish v2
2019-07-08 13:18:56 +01:00
John Lees-Miller 79804a8e2f Remove unreachable code 2019-07-08 11:57:28 +01:00
John Lees-Miller 9725b1bf0c Bump to 2.0.0 2019-07-08 11:52:59 +01:00
John Lees-Miller 96ab30883a Remove ES5 interface 2019-07-08 11:52:59 +01:00
John Lees-Miller bdde7fac65 Move shrinkwrap to package-lock 2019-07-08 11:46:11 +01:00
John Lees-Miller 295a603ca5 Update readme for @overleaf/o-error 2019-07-08 11:45:41 +01:00
John Lees-Miller 970dcb4e8e Update metadata for publishing 2019-07-08 11:35:29 +01:00
John Lees-Miller 5563844151 Merge pull request #4 from overleaf/ta-update
Update to OError
2019-07-08 11:32:59 +01:00
John Lees-Miller 5bf235c549 Merge pull request #2 from overleaf/es6
Add support for errors based on ES6 classes
2019-07-01 11:48:03 +01:00
John Lees-Miller c167ad9bdb Upgrade mocha version 2019-07-01 11:35:24 +01:00
John Lees-Miller ed7dc939ac Add support for errors with ES6 classes 2019-07-01 11:34:15 +01:00
John Lees-Miller 234f7e1c4d Merge pull request #615 from sharelatex/cla-link
Update CLA and other links
2019-04-10 16:50:10 +01:00
John Lees-Miller 960d6afc9f Merge pull request #14 from sharelatex/shrinkwrap-dev
Add dev dependencies to shrinkwrap
2018-11-28 10:48:20 +00:00
John Lees-Miller 4f56c952df Add dev dependencies to shrinkwrap 2018-11-27 15:12:25 +00:00
John Lees-Miller 0a08a4956e Merge pull request #1 from overleaf/tidy-up
Tidy up for release
2018-04-23 09:51:32 +01:00
John Lees-Miller 138b339c0f Tidy up for release 2018-04-23 08:11:08 +01:00
John Lees-Miller 72f8fb553c Fix typos 2018-01-16 18:30:17 +00:00
John Lees-Miller 30f67008a0 Fix typo 2017-10-20 09:19:18 +01:00