stripe 21.0.0 → 21.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/VERSION +1 -1
- package/cjs/stripe.core.js +5 -1
- package/esm/stripe.core.js +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 21.0.1 - 2026-03-26
|
|
4
|
+
* [#2626](https://github.com/stripe/stripe-node/pull/2626) Fix export for Stripe.Decimal in CJS and ESM. Resolves [#2625](https://github.com/stripe/stripe-node/issues/2625)
|
|
5
|
+
|
|
3
6
|
## 21.0.0 - 2026-03-25
|
|
4
7
|
|
|
5
8
|
This release changes the pinned API version to `2026-03-25.dahlia` and contains breaking changes (prefixed with ⚠️ below). There's also a [detailed migration guide](https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v21) to simplify your upgrade process.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
21.0.
|
|
1
|
+
21.0.1
|
package/cjs/stripe.core.js
CHANGED
|
@@ -8,6 +8,7 @@ const StripeContext_js_1 = require("./StripeContext.js");
|
|
|
8
8
|
const Webhooks_js_1 = require("./Webhooks.js");
|
|
9
9
|
const apiVersion_js_1 = require("./apiVersion.js");
|
|
10
10
|
const CryptoProvider_js_1 = require("./crypto/CryptoProvider.js");
|
|
11
|
+
const Decimal_js_1 = require("./Decimal.js");
|
|
11
12
|
const HttpClient_js_1 = require("./net/HttpClient.js");
|
|
12
13
|
const resources = require("./resources.js");
|
|
13
14
|
const utils_js_1 = require("./utils.js");
|
|
@@ -37,7 +38,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
|
|
|
37
38
|
];
|
|
38
39
|
const defaultRequestSenderFactory = (stripe) => new RequestSender_js_1.RequestSender(stripe, StripeResource_js_1.StripeResource.MAX_BUFFERED_REQUEST_METRICS);
|
|
39
40
|
function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
|
|
40
|
-
Stripe.PACKAGE_VERSION = '21.0.
|
|
41
|
+
Stripe.PACKAGE_VERSION = '21.0.1';
|
|
41
42
|
Stripe.API_VERSION = apiVersion_js_1.ApiVersion;
|
|
42
43
|
const aiAgent = typeof process !== 'undefined' && process.env
|
|
43
44
|
? (0, utils_js_1.detectAIAgent)(process.env)
|
|
@@ -57,6 +58,7 @@ function createStripe(platformFunctions, requestSender = defaultRequestSenderFac
|
|
|
57
58
|
Stripe.HttpClientResponse = HttpClient_js_1.HttpClientResponse;
|
|
58
59
|
Stripe.CryptoProvider = CryptoProvider_js_1.CryptoProvider;
|
|
59
60
|
Stripe.webhooks = (0, Webhooks_js_1.createWebhooks)(platformFunctions);
|
|
61
|
+
Stripe.Decimal = Decimal_js_1.Decimal;
|
|
60
62
|
function Stripe(key, config = {}) {
|
|
61
63
|
if (!(this instanceof Stripe)) {
|
|
62
64
|
return new Stripe(key, config);
|
|
@@ -112,6 +114,8 @@ function createStripe(platformFunctions, requestSender = defaultRequestSenderFac
|
|
|
112
114
|
// Expose StripeResource on the instance too
|
|
113
115
|
// @ts-ignore
|
|
114
116
|
this.StripeResource = Stripe.StripeResource;
|
|
117
|
+
// @ts-ignore
|
|
118
|
+
this.Decimal = Stripe.Decimal;
|
|
115
119
|
}
|
|
116
120
|
Stripe.errors = _Error;
|
|
117
121
|
Stripe.createNodeHttpClient = platformFunctions.createNodeHttpClient;
|
package/esm/stripe.core.js
CHANGED
|
@@ -5,6 +5,7 @@ import { StripeContext } from './StripeContext.js';
|
|
|
5
5
|
import { createWebhooks } from './Webhooks.js';
|
|
6
6
|
import { ApiVersion } from './apiVersion.js';
|
|
7
7
|
import { CryptoProvider } from './crypto/CryptoProvider.js';
|
|
8
|
+
import { Decimal } from './Decimal.js';
|
|
8
9
|
import { HttpClient, HttpClientResponse } from './net/HttpClient.js';
|
|
9
10
|
import * as resources from './resources.js';
|
|
10
11
|
import { createApiKeyAuthenticator, detectAIAgent, determineProcessUserAgentProperties, pascalToCamelCase, validateInteger, } from './utils.js';
|
|
@@ -34,7 +35,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
|
|
|
34
35
|
];
|
|
35
36
|
const defaultRequestSenderFactory = (stripe) => new RequestSender(stripe, StripeResource.MAX_BUFFERED_REQUEST_METRICS);
|
|
36
37
|
export function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
|
|
37
|
-
Stripe.PACKAGE_VERSION = '21.0.
|
|
38
|
+
Stripe.PACKAGE_VERSION = '21.0.1';
|
|
38
39
|
Stripe.API_VERSION = ApiVersion;
|
|
39
40
|
const aiAgent = typeof process !== 'undefined' && process.env
|
|
40
41
|
? detectAIAgent(process.env)
|
|
@@ -54,6 +55,7 @@ export function createStripe(platformFunctions, requestSender = defaultRequestSe
|
|
|
54
55
|
Stripe.HttpClientResponse = HttpClientResponse;
|
|
55
56
|
Stripe.CryptoProvider = CryptoProvider;
|
|
56
57
|
Stripe.webhooks = createWebhooks(platformFunctions);
|
|
58
|
+
Stripe.Decimal = Decimal;
|
|
57
59
|
function Stripe(key, config = {}) {
|
|
58
60
|
if (!(this instanceof Stripe)) {
|
|
59
61
|
return new Stripe(key, config);
|
|
@@ -109,6 +111,8 @@ export function createStripe(platformFunctions, requestSender = defaultRequestSe
|
|
|
109
111
|
// Expose StripeResource on the instance too
|
|
110
112
|
// @ts-ignore
|
|
111
113
|
this.StripeResource = Stripe.StripeResource;
|
|
114
|
+
// @ts-ignore
|
|
115
|
+
this.Decimal = Stripe.Decimal;
|
|
112
116
|
}
|
|
113
117
|
Stripe.errors = _Error;
|
|
114
118
|
Stripe.createNodeHttpClient = platformFunctions.createNodeHttpClient;
|