Skip to content

fix: use correct ESM syntax #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions firestore-stripe-web-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.7",
"description": "Client SDK for the firestore-stripe-payments Firebase Extension",
"main": "./lib/index.js",
"type": "module",
"typings": "./lib/index.d.ts",
"scripts": {
"api-documenter": "api-documenter markdown --input-folder temp --output-folder markdown",
Expand Down
10 changes: 5 additions & 5 deletions firestore-stripe-web-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export {
StripePaymentsErrorCode,
StripePaymentsOptions,
getStripePayments,
} from "./init";
} from "./init.js";

export {
CREATE_SESSION_TIMEOUT_MILLIS,
Expand All @@ -36,7 +36,7 @@ export {
PriceIdSessionCreateParams,
Session,
SessionCreateParams,
} from "./session";
} from "./session.js";

export {
GetPaymentsOptions,
Expand All @@ -47,7 +47,7 @@ export {
getCurrentUserPayment,
getCurrentUserPayments,
onCurrentUserPaymentUpdate,
} from "./payment";
} from "./payment.js";

export {
GetProductOptions,
Expand All @@ -60,7 +60,7 @@ export {
getPrices,
getProduct,
getProducts,
} from "./product";
} from "./product.js";

export {
getCurrentUserSubscription,
Expand All @@ -71,4 +71,4 @@ export {
SubscriptionChangeType,
SubscriptionSnapshot,
SubscriptionStatus,
} from "./subscription";
} from "./subscription.js";
6 changes: 3 additions & 3 deletions firestore-stripe-web-sdk/src/payment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import {
QuerySnapshot,
where,
} from "@firebase/firestore";
import { StripePayments, StripePaymentsError } from "./init";
import { getCurrentUser, getCurrentUserSync } from "./user";
import { checkNonEmptyArray, checkNonEmptyString } from "./utils";
import { StripePayments, StripePaymentsError } from "./init.js";
import { getCurrentUser, getCurrentUserSync } from "./user.js";
import { checkNonEmptyArray, checkNonEmptyString } from "./utils.js";

/**
* Interface of a Stripe payment stored in the app database.
Expand Down
4 changes: 2 additions & 2 deletions firestore-stripe-web-sdk/src/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import {
where,
WhereFilterOp,
} from "@firebase/firestore";
import { StripePayments, StripePaymentsError } from "./init";
import { checkNonEmptyString } from "./utils";
import { StripePayments, StripePaymentsError } from "./init.js";
import { checkNonEmptyString } from "./utils.js";

/**
* Interface of a Stripe Product stored in the app database.
Expand Down
6 changes: 3 additions & 3 deletions firestore-stripe-web-sdk/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ import {
Timestamp,
Unsubscribe,
} from "@firebase/firestore";
import { StripePayments, StripePaymentsError } from "./init";
import { getCurrentUser } from "./user";
import { StripePayments, StripePaymentsError } from "./init.js";
import { getCurrentUser } from "./user.js";
import {
checkNonEmptyArray,
checkNonEmptyString,
checkPositiveNumber,
} from "./utils";
} from "./utils.js";

/**
* Parameters common across all session types.
Expand Down
6 changes: 3 additions & 3 deletions firestore-stripe-web-sdk/src/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import {
Timestamp,
where,
} from "@firebase/firestore";
import { StripePayments, StripePaymentsError } from "./init";
import { getCurrentUser, getCurrentUserSync } from "./user";
import { checkNonEmptyArray, checkNonEmptyString } from "./utils";
import { StripePayments, StripePaymentsError } from "./init.js";
import { getCurrentUser, getCurrentUserSync } from "./user.js";
import { checkNonEmptyArray, checkNonEmptyString } from "./utils.js";

/**
* Interface of a Stripe Subscription stored in the app database.
Expand Down
2 changes: 1 addition & 1 deletion firestore-stripe-web-sdk/src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import { FirebaseApp } from "@firebase/app";
import { Auth, getAuth } from "@firebase/auth";
import { StripePayments, StripePaymentsError } from "./init";
import { StripePayments, StripePaymentsError } from "./init.js";

/**
* Internal API for retrieving the currently signed in user. Rejects with "unauthenticated" if
Expand Down
Loading