@contract-case/case-connector 0.28.1 → 0.28.2
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 +19 -0
- package/dist/cjs/src/entities/versionString.cjs +1 -1
- package/dist/cjs/src/entities/versionString.d.cts +1 -1
- package/dist/cjs/{tsconfig.4b16e40d.tsbuildinfo → tsconfig.cbc5fc9c.tsbuildinfo} +1 -1
- package/dist/src/entities/versionString.d.ts +1 -1
- package/dist/src/entities/versionString.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/eslint.config.mjs +4 -1
- package/package/case-connector.js +2 -2
- package/package/case-connector.js.LICENSE.txt +1 -1
- package/package/case-connector.js.map +1 -1
- package/package.json +7 -7
- package/rename-inner-webpack-vars-loader.cjs +22 -0
- package/webpack.config.cjs +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contract-case/case-connector",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Connector to allow ContractCase to run as a server. Use only if you're creating a custom wrapper for a new language",
|
|
6
6
|
"author": "Timothy Jones <timothy.l.jones@gmail.com> (https://github.com/TimothyJones)",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
55
|
-
"@contract-case/case-maintainer-config": "0.28.
|
|
56
|
-
"@contract-case/eslint-config-case-maintainer": "0.28.
|
|
55
|
+
"@contract-case/case-maintainer-config": "0.28.2",
|
|
56
|
+
"@contract-case/eslint-config-case-maintainer": "0.28.2",
|
|
57
57
|
"@knighted/duel": "^2.1.6",
|
|
58
58
|
"@types/google-protobuf": "^3.15.12",
|
|
59
59
|
"@types/jest": "^30.0.0",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
"webpack-cli": "^6.0.1"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@contract-case/case-connector-proto": "0.28.
|
|
75
|
-
"@contract-case/case-core": "0.28.
|
|
76
|
-
"@contract-case/case-entities-internal": "0.28.
|
|
74
|
+
"@contract-case/case-connector-proto": "0.28.2",
|
|
75
|
+
"@contract-case/case-core": "0.28.2",
|
|
76
|
+
"@contract-case/case-entities-internal": "0.28.2",
|
|
77
77
|
"@grpc/grpc-js": "^1.13.3",
|
|
78
78
|
"@grpc/proto-loader": "^0.8.0",
|
|
79
79
|
"get-port": "^7.1.0",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "eb29d66dea029bba33282340c84cade7b3315305"
|
|
122
122
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webpack loader that renames internal webpack runtime variables in
|
|
3
|
+
* pre-bundled (webpack-compiled) third-party packages.
|
|
4
|
+
*
|
|
5
|
+
* pretty-format v30 ships its CJS build as a webpack bundle with its own
|
|
6
|
+
* __webpack_modules__, __webpack_require__, etc. When our outer webpack
|
|
7
|
+
* processes this file, it replaces bare `require()` calls (e.g.
|
|
8
|
+
* require("react-is")) with __webpack_require__(id). At runtime the inner
|
|
9
|
+
* __webpack_require__ shadows the outer one, so the outer's module ID is
|
|
10
|
+
* looked up in the inner's module map — which fails.
|
|
11
|
+
*
|
|
12
|
+
* By renaming the inner webpack variables, the shadowing is eliminated and
|
|
13
|
+
* the outer webpack can properly resolve and bundle all dependencies.
|
|
14
|
+
*/
|
|
15
|
+
module.exports = function renameInnerWebpackVars(source) {
|
|
16
|
+
return source
|
|
17
|
+
.replaceAll('__webpack_modules__', '__nested_webpack_modules__')
|
|
18
|
+
.replaceAll('__webpack_module_cache__', '__nested_webpack_module_cache__')
|
|
19
|
+
.replaceAll('__webpack_require__', '__nested_webpack_require__')
|
|
20
|
+
.replaceAll('__webpack_exports__', '__nested_webpack_exports__')
|
|
21
|
+
.replaceAll('__unused_webpack_module', '__unused_nested_webpack_module');
|
|
22
|
+
};
|
package/webpack.config.cjs
CHANGED
|
@@ -29,6 +29,13 @@ module.exports = {
|
|
|
29
29
|
use: ['source-map-loader'],
|
|
30
30
|
enforce: 'pre',
|
|
31
31
|
},
|
|
32
|
+
{
|
|
33
|
+
// pretty-format ships a nested webpack bundle as its CJS build.
|
|
34
|
+
// Rename its internal webpack variables so they don't shadow ours.
|
|
35
|
+
test: /pretty-format[/\\]build[/\\]index\.js$/,
|
|
36
|
+
enforce: 'pre',
|
|
37
|
+
use: [path.join(__dirname, 'rename-inner-webpack-vars-loader.cjs')],
|
|
38
|
+
},
|
|
32
39
|
],
|
|
33
40
|
},
|
|
34
41
|
optimization: {
|