Skip to content

Commit 2096b94

Browse files
committed
Docs and packages update
1 parent 51d4749 commit 2096b94

File tree

7 files changed

+2210
-3347
lines changed

7 files changed

+2210
-3347
lines changed

package-lock.json

Lines changed: 2167 additions & 3283 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"author": "Contentstack",
4747
"license": "MIT",
4848
"dependencies": {
49-
"axios": "^0.21.1",
49+
"axios": "^0.21.4",
5050
"form-data": "^3.0.1",
5151
"lodash": "^4.17.21",
5252
"qs": "^6.10.1"
@@ -57,39 +57,40 @@
5757
"management api"
5858
],
5959
"devDependencies": {
60-
"@babel/cli": "^7.14.5",
61-
"@babel/core": "^7.14.6",
62-
"@babel/plugin-transform-runtime": "^7.14.5",
63-
"@babel/preset-env": "^7.14.7",
64-
"@babel/register": "^7.14.5",
65-
"@babel/runtime": "^7.14.6",
60+
"@babel/cli": "^7.15.7",
61+
"@babel/core": "^7.15.8",
62+
"@babel/plugin-transform-runtime": "^7.15.8",
63+
"@babel/preset-env": "^7.15.8",
64+
"@babel/register": "^7.15.3",
65+
"@babel/runtime": "^7.15.4",
6666
"@types/mocha": "^7.0.2",
67-
"axios-mock-adapter": "^1.19.0",
68-
"babel-loader": "^8.2.2",
67+
"axios-mock-adapter": "^1.20.0",
68+
"babel-loader": "^8.2.3",
6969
"babel-plugin-add-module-exports": "^1.0.4",
7070
"babel-plugin-rewire": "^1.2.0",
7171
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
7272
"babel-polyfill": "^6.26.0",
7373
"chai": "^4.3.4",
74+
"clean-webpack-plugin": "^4.0.0",
7475
"docdash": "^1.2.0",
7576
"dotenv": "^8.6.0",
76-
"eslint": "^6.6.0",
77+
"eslint": "^8.1.0",
7778
"eslint-config-standard": "^13.0.1",
78-
"eslint-plugin-import": "^2.23.4",
79+
"eslint-plugin-import": "^2.25.2",
7980
"eslint-plugin-node": "^9.1.0",
8081
"eslint-plugin-promise": "^4.3.1",
8182
"eslint-plugin-standard": "^4.1.0",
8283
"jsdoc": "^3.6.7",
83-
"mocha": "^7.2.0",
84-
"mochawesome": "^4.1.0",
84+
"mocha": "^9.1.3",
85+
"mochawesome": "^6.3.1",
8586
"multiparty": "^4.2.2",
8687
"nock": "^10.0.6",
8788
"nyc": "^14.1.1",
8889
"rimraf": "^2.7.1",
8990
"sinon": "^7.3.2",
9091
"string-replace-loader": "^2.3.0",
91-
"webpack": "^5.45.1",
92-
"webpack-cli": "^3.3.12",
92+
"webpack": "^5.60.0",
93+
"webpack-cli": "^4.9.1",
9394
"webpack-merge": "4.1.0"
9495
},
9596
"homepage": "https://www.contentstack.com"

webpack/webpack.common.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11

22
const packages = require('../package.json')
33
const webpack = require('webpack')
4+
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
45

56
module.exports = function () {
67
return {
78
entry: {
89
contentstack: './lib/contentstack'
910
},
1011
resolve: {
11-
extensions: ['.js']
12+
extensions: ['.js'],
13+
modules: [
14+
'../lib',
15+
'node_modules'
16+
]
1217
},
1318
externals: { fs: 'commonjs fs' },
1419
module: {
@@ -23,7 +28,7 @@ module.exports = function () {
2328
},
2429
{
2530
loader: 'string-replace-loader',
26-
query: {
31+
options: {
2732
search: '{{VERSION}}',
2833
replace: packages.version
2934
}
@@ -32,7 +37,13 @@ module.exports = function () {
3237
}]
3338
},
3439
plugins: [
35-
new webpack.IgnorePlugin(/vertx/)
40+
new webpack.WatchIgnorePlugin({
41+
paths: [/vertx/]
42+
}),
43+
new CleanWebpackPlugin({
44+
protectWebpackAssets: false,
45+
cleanAfterEveryBuildPatterns: ['*.LICENSE.txt']
46+
})
3647
]
3748
}
3849
}

webpack/webpack.nativescript.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict'
2-
31
const path = require('path')
42
const webpackMerge = require('webpack-merge')
53

@@ -8,28 +6,22 @@ const commonConfig = require('./webpack.common.js')
86
module.exports = function (options) {
97
return webpackMerge(commonConfig(), {
108
output: {
11-
library: 'contentstack-management',
129
libraryTarget: 'commonjs2',
1310
path: path.join(__dirname, '../dist/nativescript'),
1411
filename: 'contentstack-management.js'
1512
},
1613
resolve: {
17-
alias: {
18-
// runtime: path.resolve(__dirname, '../src/runtime/nativescript')
19-
},
20-
modules: [
21-
'../src',
22-
// '../src/runtimes/native-script',
23-
'node_modules'
24-
]
14+
fallback: {
15+
os: false
16+
}
2517
},
2618
module: {
2719
rules: [{
2820
test: /\.js?$/,
2921
exclude: ['/node_modules'],
3022
use: [{
3123
loader: 'string-replace-loader',
32-
query: {
24+
options: {
3325
search: '{{PLATFORM}}',
3426
replace: 'react-native'
3527
}

webpack/webpack.node.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,18 @@ const commonConfig = require('./webpack.common')
55
module.exports = function (options) {
66
return webpackMerge(commonConfig(), {
77
output: {
8-
library: 'contentstack-management',
98
libraryTarget: 'commonjs2',
109
path: path.join(__dirname, '../dist/node'),
1110
filename: 'contentstack-management.js'
1211
},
1312
target: 'node',
14-
resolve: {
15-
alias: {
16-
// runtime: path.resolve(__dirname, '../src/runtime/node')
17-
},
18-
modules: [
19-
'../lib',
20-
// '../src/runtimes/node',
21-
'node_modules'
22-
]
23-
},
2413
module: {
2514
rules: [{
2615
test: /\.js?$/,
2716
exclude: ['/node_modules'],
2817
use: [{
2918
loader: 'string-replace-loader',
30-
query: {
19+
options: {
3120
search: '{{PLATFORM}}',
3221
replace: 'nodejs'
3322
}

webpack/webpack.react-native.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict'
2-
31
const path = require('path')
42
const webpackMerge = require('webpack-merge')
53

@@ -8,28 +6,22 @@ const commonConfig = require('./webpack.common.js')
86
module.exports = function (options) {
97
return webpackMerge(commonConfig(), {
108
output: {
11-
library: 'contentstack-management',
129
libraryTarget: 'commonjs2',
1310
path: path.join(__dirname, '../dist/react-native'),
1411
filename: 'contentstack-management.js'
1512
},
1613
resolve: {
17-
alias: {
18-
// runtime: path.resolve(__dirname, '../src/runtime/react-native')
19-
},
20-
modules: [
21-
'../src',
22-
// '../src/runtimes/react-native',
23-
'node_modules'
24-
]
14+
fallback: {
15+
os: false
16+
}
2517
},
2618
module: {
2719
rules: [{
2820
test: /\.js?$/,
2921
exclude: ['/node_modules'],
3022
use: [{
3123
loader: 'string-replace-loader',
32-
query: {
24+
options: {
3325
search: '{{PLATFORM}}',
3426
replace: 'react-native'
3527
}

webpack/webpack.web.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,22 @@ const commonConfig = require('./webpack.common.js')
88
module.exports = function (options) {
99
return webpackMerge(commonConfig(), {
1010
output: {
11-
library: 'contentstack-management',
1211
libraryTarget: 'umd',
1312
path: path.join(__dirname, '../dist/web'),
1413
filename: 'contentstack-management.js'
1514
},
1615
resolve: {
17-
alias: {
18-
// runtime: path.resolve(__dirname, '../src/runtime/web')
19-
},
20-
modules: [
21-
'../src',
22-
// '../src/runtimes/web',
23-
'node_modules'
24-
]
16+
fallback: {
17+
os: require.resolve('os-browserify/browser')
18+
}
2519
},
2620
module: {
2721
rules: [{
2822
test: /\.js?$/,
2923
exclude: ['/node_modules'],
3024
use: [{
3125
loader: 'string-replace-loader',
32-
query: {
26+
options: {
3327
search: '{{PLATFORM}}',
3428
replace: 'web'
3529
}

0 commit comments

Comments
 (0)