Skip to content

Commit 232ba62

Browse files
authored
Merge pull request #126 from contentstack/v4-release
v3 to v4 code changes
2 parents 7dc2e49 + da15e22 commit 232ba62

File tree

144 files changed

+7425
-11776
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+7425
-11776
lines changed

.eslintrc.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
}
17+
]
18+
}

.talismanrc

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
fileignoreconfig:
2+
- filename: test/unit/image-transform.spec.ts
3+
checksum: 7beabdd07bd35d620668fcd97e1a303b9cbc40170bf3008a376d75ce0895de2a
4+
- filename: test/utils/mocks.ts
5+
checksum: a1cb4b1890a584f1facd30f2a0974c97a66f91417022be79d00516338e244227
26
- filename: package-lock.json
37
checksum: ed6e5d36030448030ea8e0ec251b57481be80366b1cfde6a1b47879de8d006c0
48
- filename: test/typescript/taxonomy.test.ts

CHANGELOG.md

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

3+
### Version: 4.0.0-beta
4+
#### Date: January-15-2024
5+
- Beta release of Typescript SDK
6+
37
### Version: 3.18.0
48
#### Date: January-15-2024
59
##### New Features:
610
- added taxonomy support
711
- X-User-Agent updated
812
- added region gcp_na
13+
914
### Version: 3.17.2
1015
#### Date: November-15-2023
1116
##### Bug fix:

config.js

-20
This file was deleted.

config/fileTransformer.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
process(src, filename, config, options) {
5+
return 'module.exports = ' + JSON.stringify(path.basename(filename)) + ';';
6+
},
7+
};

config/tsconfig.cjs.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../dist/cjs",
5+
"declaration": true,
6+
},
7+
"include": ["../src/**/*.ts"],
8+
"exclude": ["../dist/cjs"]
9+
}

config/tsconfig.esm.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../dist/esm",
5+
"module": "esnext"
6+
},
7+
"include": ["../src/**/*.ts"], // Adjust this path based on your project structure
8+
"exclude": ["../dist/esm"]
9+
}

config/tsconfig.types.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../tsconfig",
3+
"compilerOptions": {
4+
"declaration": true /* Generates corresponding '.d.ts' file. */,
5+
"emitDeclarationOnly": true,
6+
"outDir": "../dist/types" /* Redirect output structure to the directory. */
7+
},
8+
"include": ["../src/**/*.ts"], // Adjust this path based on your project structure
9+
"exclude": ["../dist/types"]
10+
}

config/tsconfig.umd.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../tsconfig",
3+
"compilerOptions": {
4+
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
5+
"declaration": false, /* Generates corresponding '.d.ts' file. */
6+
},
7+
8+
"include": ["../src/**/*.ts"],
9+
"exclude": ["../dist/umd"]
10+
}

config/webpack.config.js

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
mode: 'production',
5+
entry: './src/index.ts',
6+
output: {
7+
path: path.resolve(__dirname, '../dist/umd'),
8+
filename: 'index.js',
9+
library: 'exampleTypescriptPackage',
10+
libraryTarget: 'umd',
11+
globalObject: 'this',
12+
},
13+
module: {
14+
rules: [
15+
{
16+
test: /\.ts(x*)?$/,
17+
exclude: /node_modules/,
18+
use: {
19+
loader: 'ts-loader',
20+
options: {
21+
configFile: 'config/tsconfig.umd.json',
22+
},
23+
},
24+
},
25+
],
26+
},
27+
resolve: {
28+
extensions: ['.ts', '.js', '.tsx', '.jsx'],
29+
},
30+
};

docs-config.json

-25
This file was deleted.

examples/PromiseError/index.js

-59
This file was deleted.

examples/node/contentstack-demo.js

-112
This file was deleted.

examples/node/index.js

-31
This file was deleted.

examples/web/favicon.ico

-14.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)