Skip to content

Commit 61eb440

Browse files
Merge pull request #333 from contentstack/staging
DX | 21-04-2025 | Release
2 parents 6e55a28 + 3689437 commit 61eb440

9 files changed

+190
-198
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## Change log
22

3+
### Version: 3.25.3
4+
#### Date: April-21-2025
5+
##### Fix:
6+
- Handle the sanity tests when ENVs are not provided.
7+
38
### Version: 3.25.2
49
#### Date: April-02-2025
510
##### Fix:

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ For browsers, we recommend to download the library via npm or yarn to ensure 100
1919
If you'd like to use a standalone built file you can use the following script tag or download it from [jsDelivr](https://www.jsdelivr.com/package/npm/contentstack), under the `dist` directory:
2020

2121
```html
22-
<script src="https://cdn.jsdelivr.net/npm/contentstack@latest/dist/web/contentstack.min.js" integrity="6El3Ru5ddv5HuY2v9MsRpSanmaMD10k+41XPP1LcLYx1RaSl9uSljArzdZSGGjN/%" crossorigin="anonymous"></script>
22+
<script src="https://cdn.jsdelivr.net/npm/contentstack@latest/dist/web/contentstack.min.js" integrity="12nVcFP1kBh/0Q5rLUvKE34exDRK2DpHUFkGkhRSXTcwGC2PI1D9h64C5arpt5OY" crossorigin="anonymous"></script>
2323
```
2424
You can also specify a specific version number.
2525
```html
26-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web/contentstack.min.js" integrity="gAXklaX6ZWih0Mp3hqDrEZaPkyGyiVfV/+H5yrHG3r6HYOIXVUWRy37XcOvHpfKp%" crossorigin="anonymous"></script>
26+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web/contentstack.min.js" integrity="fXmq+b/kd2EenBR7APjzzy0hLTOhAhrir3C6HZYZKuF9O+g+HuSIU7Usi8Ccy9I5" crossorigin="anonymous"></script>
2727
```
2828

2929
To initialize the SDK, you will need to specify the API Key, Delivery Token, and Environment Name of your stack.

jest.js.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module.exports = {
77
"/test/config.js",
88
"/test/sync_config.js",
99
"/test/.*/utils.js",
10-
"/test/sync/",
1110
],
1211
reporters: ["default", ["jest-html-reporters",
1312
{

package-lock.json

+53-54
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "contentstack",
3-
"version": "3.25.2",
3+
"version": "3.25.3",
44
"description": "Contentstack Javascript SDK",
55
"homepage": "https://www.contentstack.com/",
66
"author": {
@@ -100,10 +100,10 @@
100100
"webpack-node-externals": "^3.0.0"
101101
},
102102
"dependencies": {
103-
"@contentstack/utils": "^1.3.18",
104-
"@fetch-mock/jest": "^0.2.12",
103+
"@contentstack/utils": "^1.3.20",
104+
"@fetch-mock/jest": "^0.2.15",
105105
"es6-promise": "^4.2.8",
106-
"fetch-mock": "^12.4.0",
106+
"fetch-mock": "^12.5.2",
107107
"localStorage": "1.0.4",
108108
"qs": "^6.14.0"
109109
}

test/config.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
'use strict';
2-
require('dotenv').config()
2+
require('dotenv').config();
3+
4+
const requiredVars = ['HOST', 'API_KEY', 'DELIVERY_TOKEN', 'ENVIRONMENT'];
5+
const missingVars = requiredVars.filter((key) => !process.env[key]);
6+
7+
if (missingVars.length > 0) {
8+
const errorMessage = `\x1b[31mError: Missing environment variables - ${missingVars.join(', ')}`;
9+
const error = new Error(errorMessage);
10+
error.stack = error.message;
11+
throw error;
12+
}
313

414
module.exports = {
515
stack: { 'api_key': process.env.API_KEY, 'delivery_token': process.env.DELIVERY_TOKEN, 'environment': process.env.ENVIRONMENT, },

test/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require('./entry/findone');
55
require('./entry/findone-result-wrapper');
66
require('./entry/spread');
77

8-
//require('./sync/sync-testcases');
8+
require('./sync/sync-testcases');
99

1010
// Assets
1111
require('./asset/find');

0 commit comments

Comments
 (0)