Skip to content

Development #328

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

Merged
merged 18 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
e20d811
Add environment variable checks and refactor live preview tests
harshithad0703 Apr 3, 2025
68d4090
Update environment variable checks and improve error handling in config
harshithad0703 Apr 8, 2025
7a6deb2
Bump version to 3.25.3 and update changelog to handle sanity tests wi…
harshithad0703 Apr 8, 2025
d4abca6
Update changelog date for version 3.25.3
harshithad0703 Apr 8, 2025
0de8500
Update integrity hashes in README
harshithad0703 Apr 8, 2025
e8a4541
Merge pull request #325 from contentstack/fix/dx-2231-handle-envs
harshithad0703 Apr 8, 2025
f8e8422
Fix: initialize live_preview config before setting properties in Live…
sunil-lakshman Apr 8, 2025
78d3401
Merge pull request #326 from contentstack/fix/sanity-testcases
AniketDev7 Apr 8, 2025
c7f13e6
test: added sync test cases with improved structure
harshithad0703 Apr 15, 2025
f117f1c
Fix: pagination token test
harshithad0703 Apr 15, 2025
59670d7
chore: update package-lock.json with dependency version bumps
harshithad0703 Apr 15, 2025
dec7cc4
Merge pull request #327 from contentstack/fix/dx-2392-sync-test-cases
harshithad0703 Apr 15, 2025
353bd24
chore: bump dependencies in package.json and package-lock.json
harshithad0703 Apr 15, 2025
121fb85
Merge branch 'staging' into fix/upgrade-dependencies
harshithad0703 Apr 15, 2025
43e4ba9
Merge pull request #329 from contentstack/fix/upgrade-dependencies
harshithad0703 Apr 15, 2025
085e856
Merge pull request #331 from contentstack/staging
harshithad0703 Apr 16, 2025
6e55a28
Update policy-scan.yml
aravindbuilt Apr 16, 2025
21661c9
Merge pull request #332 from contentstack/master
harshithad0703 Apr 16, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/policy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- uses: actions/checkout@master
- name: Checks for License file
run: |
if ! [[ -f "LICENSE" || -f "License.txt" || -f "LICENSE.md" ]]; then exit 1; fi
if ! [[ -f "LICENSE" || -f "License.txt" || -f "LICENSE.md" || -f "LICENSE.txt" ]]; then exit 1; fi
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Change log

### Version: 3.25.3
#### Date: April-21-2025
##### Fix:
- Handle the sanity tests when ENVs are not provided.

### Version: 3.25.2
#### Date: April-02-2025
##### Fix:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ For browsers, we recommend to download the library via npm or yarn to ensure 100
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:

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

To initialize the SDK, you will need to specify the API Key, Delivery Token, and Environment Name of your stack.
Expand Down
1 change: 0 additions & 1 deletion jest.js.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module.exports = {
"/test/config.js",
"/test/sync_config.js",
"/test/.*/utils.js",
"/test/sync/",
],
reporters: ["default", ["jest-html-reporters",
{
Expand Down
107 changes: 53 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "contentstack",
"version": "3.25.2",
"version": "3.25.3",
"description": "Contentstack Javascript SDK",
"homepage": "https://www.contentstack.com/",
"author": {
Expand Down Expand Up @@ -100,10 +100,10 @@
"webpack-node-externals": "^3.0.0"
},
"dependencies": {
"@contentstack/utils": "^1.3.18",
"@fetch-mock/jest": "^0.2.12",
"@contentstack/utils": "^1.3.20",
"@fetch-mock/jest": "^0.2.15",
"es6-promise": "^4.2.8",
"fetch-mock": "^12.4.0",
"fetch-mock": "^12.5.2",
"localStorage": "1.0.4",
"qs": "^6.14.0"
}
Expand Down
12 changes: 11 additions & 1 deletion test/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
'use strict';
require('dotenv').config()
require('dotenv').config();

const requiredVars = ['HOST', 'API_KEY', 'DELIVERY_TOKEN', 'ENVIRONMENT'];
const missingVars = requiredVars.filter((key) => !process.env[key]);

if (missingVars.length > 0) {
const errorMessage = `\x1b[31mError: Missing environment variables - ${missingVars.join(', ')}`;
const error = new Error(errorMessage);
error.stack = error.message;
throw error;
}

module.exports = {
stack: { 'api_key': process.env.API_KEY, 'delivery_token': process.env.DELIVERY_TOKEN, 'environment': process.env.ENVIRONMENT, },
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require('./entry/findone');
require('./entry/findone-result-wrapper');
require('./entry/spread');

//require('./sync/sync-testcases');
require('./sync/sync-testcases');

// Assets
require('./asset/find');
Expand Down
Loading
Loading