Skip to content

Commit a1746df

Browse files
committed
chore: update configuration and scripts for improved testing and build process
- Added new entries to .gitignore for compiled test artifacts. - Removed jest.preset.js and updated jest.config files to streamline configuration. - Updated package.json to reflect changes in Node.js version requirements and modified main module paths. - Enhanced README with development instructions and updated Node.js version prerequisites. - Deleted obsolete TypeScript configuration files and scripts related to bundling and testing. - Introduced new sanity report scripts for better integration with Slack notifications.
1 parent 1aed86f commit a1746df

19 files changed

Lines changed: 1389 additions & 6546 deletions

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ test-results/
2525
src/**/*.js
2626
src/**/*.js.map
2727

28+
# Compiled test artifacts (use .ts source only)
29+
test/api/**/*.js
30+
test/api/**/*.js.map
31+
2832
# Browser test bundle (generated)
2933
test/e2e/sdk-browser-bundle.js
3034
test/e2e/sdk-browser-bundle.js.map

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The Typescript SDK can also be used to create Node.js and React native applicati
99

1010
### Prerequisite
1111

12-
You need Node.js version 4.4.7 or later installed to use the Contentstack JavaScript SDK.
12+
You need Node.js version 18 or later installed to use the Contentstack TypeScript SDK.
1313

1414
### Setup and Installation
1515

@@ -214,6 +214,10 @@ const stack = contentstack.stack({
214214

215215
See [@contentstack/delivery-sdk-persistence](https://www.npmjs.com/package/@contentstack/delivery-sdk-persistence) for options (`storeType`, `maxAge`, custom storage).
216216

217+
### Development
218+
219+
When contributing or running tests from the repository, run `npm run build` before running tests. The published package includes a pre-built `dist/` directory.
220+
217221
### Helpful Links
218222

219223
- [Contentstack Website](https://www.contentstack.com)

config/tsconfig.cjs.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

config/tsconfig.esm.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

config/tsconfig.types.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

config/tsconfig.umd.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

config/webpack.config.js

Lines changed: 0 additions & 42 deletions
This file was deleted.

jest.config.browser.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
*/
88
export default {
99
displayName: "browser-environment",
10-
preset: "./jest.preset.js",
11-
1210
// ⚠️ CRITICAL: Use jsdom (browser) instead of node environment
1311
testEnvironment: "jest-environment-jsdom",
1412

jest.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/* eslint-disable */
22
export default {
33
displayName: "contentstack-delivery",
4-
preset: "./jest.preset.js",
4+
testEnvironment: "node",
5+
testMatch: ["**/__tests__/**/*.ts", "**/?(*.)+(spec|test).ts"],
56
transform: {
67
"^.+\\.[tj]s$": [
78
"ts-jest",

jest.preset.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)