@atlaskit/web-config-client 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/web-config-client
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#118385](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/118385)
|
|
8
|
+
[`8f5d53a41e8ef`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8f5d53a41e8ef) -
|
|
9
|
+
Produces two prebuilt files under /dist web-config-client.with-deps.amd.js and
|
|
10
|
+
web-config-client.with-deps.amd.min.js
|
|
11
|
+
|
|
3
12
|
## 0.4.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const crypto = require('crypto');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* START HASH HACKS FOR NODE 18 COMPATIBILITY
|
|
6
|
+
* See: https://stackoverflow.com/a/69761823
|
|
7
|
+
*/
|
|
8
|
+
const createHashOriginal = crypto.createHash;
|
|
9
|
+
crypto.createHash = (algorithm) => createHashOriginal(algorithm === 'md4' ? 'sha256' : algorithm);
|
|
10
|
+
/**
|
|
11
|
+
* END HASH HACKS
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
module.exports = {
|
|
15
|
+
output: {
|
|
16
|
+
path: path.join(__dirname, '../dist'),
|
|
17
|
+
filename: '[name].js',
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
resolve: {
|
|
21
|
+
extensions: ['.ts', '.js', '.json'],
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
module: {
|
|
25
|
+
rules: [
|
|
26
|
+
{
|
|
27
|
+
test: /\.(t|j)sx?$/,
|
|
28
|
+
use: {
|
|
29
|
+
loader: require.resolve('babel-loader'),
|
|
30
|
+
options: {
|
|
31
|
+
envName: 'production:es2019',
|
|
32
|
+
cacheDirectory: true,
|
|
33
|
+
presets: ['@babel/preset-env'],
|
|
34
|
+
configFile: path.join(__dirname, './babel.config.js'),
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
exclude: /node_modules/,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
plugins: [],
|
|
43
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const webpack = require('webpack');
|
|
5
|
+
const merge = require('webpack-merge');
|
|
6
|
+
|
|
7
|
+
const commonConfig = require('./webpack.common');
|
|
8
|
+
|
|
9
|
+
const indexPath = path.resolve(__dirname, '../src/index.ts');
|
|
10
|
+
|
|
11
|
+
const baseConfig = merge(commonConfig, {
|
|
12
|
+
mode: 'none',
|
|
13
|
+
plugins: [
|
|
14
|
+
new webpack.DefinePlugin({
|
|
15
|
+
'process.env': {
|
|
16
|
+
NODE_ENV: JSON.stringify('production'),
|
|
17
|
+
},
|
|
18
|
+
}),
|
|
19
|
+
],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const amdConfig = {
|
|
23
|
+
output: {
|
|
24
|
+
library: 'web-config-client',
|
|
25
|
+
libraryTarget: 'amd',
|
|
26
|
+
umdNamedDefine: true,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
module.exports = [
|
|
31
|
+
// AMD with dependencies
|
|
32
|
+
merge(baseConfig, amdConfig, {
|
|
33
|
+
entry: {
|
|
34
|
+
'web-config-client.with-deps.amd': indexPath,
|
|
35
|
+
},
|
|
36
|
+
optimization: {
|
|
37
|
+
minimize: false,
|
|
38
|
+
},
|
|
39
|
+
}),
|
|
40
|
+
|
|
41
|
+
// AMD with dependencies minified
|
|
42
|
+
merge(baseConfig, amdConfig, {
|
|
43
|
+
entry: {
|
|
44
|
+
'web-config-client.with-deps.amd.min': indexPath,
|
|
45
|
+
},
|
|
46
|
+
optimization: {
|
|
47
|
+
minimize: true,
|
|
48
|
+
},
|
|
49
|
+
}),
|
|
50
|
+
];
|