@o3r/testing 11.7.0-prerelease.3 → 11.7.0-prerelease.30
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/testing",
|
|
3
|
-
"version": "11.7.0-prerelease.
|
|
3
|
+
"version": "11.7.0-prerelease.30",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
"@material/slider": "^14.0.0",
|
|
110
110
|
"@ngrx/store": "^18.0.0",
|
|
111
111
|
"@ngx-translate/core": "^15.0.0",
|
|
112
|
-
"@o3r/core": "^11.7.0-prerelease.
|
|
113
|
-
"@o3r/localization": "^11.7.0-prerelease.
|
|
114
|
-
"@o3r/schematics": "^11.7.0-prerelease.
|
|
112
|
+
"@o3r/core": "^11.7.0-prerelease.30",
|
|
113
|
+
"@o3r/localization": "^11.7.0-prerelease.30",
|
|
114
|
+
"@o3r/schematics": "^11.7.0-prerelease.30",
|
|
115
115
|
"@playwright/test": "^1.49.0",
|
|
116
116
|
"@schematics/angular": "^18.2.0",
|
|
117
117
|
"pixelmatch": "^5.2.1",
|
|
@@ -199,12 +199,12 @@
|
|
|
199
199
|
"@ngx-translate/core": "~15.0.0",
|
|
200
200
|
"@nx/eslint-plugin": "~19.8.0",
|
|
201
201
|
"@nx/jest": "~19.8.0",
|
|
202
|
-
"@o3r/build-helpers": "^11.7.0-prerelease.
|
|
203
|
-
"@o3r/core": "^11.7.0-prerelease.
|
|
204
|
-
"@o3r/eslint-plugin": "^11.7.0-prerelease.
|
|
205
|
-
"@o3r/localization": "^11.7.0-prerelease.
|
|
206
|
-
"@o3r/schematics": "^11.7.0-prerelease.
|
|
207
|
-
"@o3r/test-helpers": "^11.7.0-prerelease.
|
|
202
|
+
"@o3r/build-helpers": "^11.7.0-prerelease.30",
|
|
203
|
+
"@o3r/core": "^11.7.0-prerelease.30",
|
|
204
|
+
"@o3r/eslint-plugin": "^11.7.0-prerelease.30",
|
|
205
|
+
"@o3r/localization": "^11.7.0-prerelease.30",
|
|
206
|
+
"@o3r/schematics": "^11.7.0-prerelease.30",
|
|
207
|
+
"@o3r/test-helpers": "^11.7.0-prerelease.30",
|
|
208
208
|
"@playwright/test": "~1.49.0",
|
|
209
209
|
"@schematics/angular": "~18.2.0",
|
|
210
210
|
"@stylistic/eslint-plugin": "~2.7.0",
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
"@types/node": "^20.0.0",
|
|
214
214
|
"@types/pixelmatch": "^5.2.3",
|
|
215
215
|
"@types/pngjs": "^6.0.0",
|
|
216
|
-
"@typescript-eslint/parser": "~8.
|
|
216
|
+
"@typescript-eslint/parser": "~8.21.0",
|
|
217
217
|
"angular-eslint": "~18.4.0",
|
|
218
218
|
"concurrently": "^8.0.0",
|
|
219
219
|
"cpy-cli": "^5.0.0",
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
"ts-node": "~10.9.2",
|
|
247
247
|
"type-fest": "^4.10.2",
|
|
248
248
|
"typescript": "~5.5.4",
|
|
249
|
-
"typescript-eslint": "~8.
|
|
249
|
+
"typescript-eslint": "~8.21.0",
|
|
250
250
|
"zone.js": "~0.14.2"
|
|
251
251
|
},
|
|
252
252
|
"schematics": "./collection.json",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-replacement.d.ts","sourceRoot":"","sources":["../../../src/tools/path-replacement/path-replacement.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,gBAAgB,EAEjB,MAAM,SAAS,CAAC;AAIjB;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,YAAY,GAAG,YAAY,EAAE,sBAAsB,GAAE,gBAAqB,
|
|
1
|
+
{"version":3,"file":"path-replacement.d.ts","sourceRoot":"","sources":["../../../src/tools/path-replacement/path-replacement.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,gBAAgB,EAEjB,MAAM,SAAS,CAAC;AAIjB;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,YAAY,GAAG,YAAY,EAAE,sBAAsB,GAAE,gBAAqB,QAiDnH"}
|
|
@@ -16,6 +16,7 @@ var module_from_string_1 = require("module-from-string");
|
|
|
16
16
|
function adjustPath(frameworkName, customTransformOptions) {
|
|
17
17
|
if (customTransformOptions === void 0) { customTransformOptions = {}; }
|
|
18
18
|
var modulesCache = {};
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method -- No need to bind the method, we are using `apply`
|
|
19
20
|
var originalRequire = node_module_1.Module.prototype.require;
|
|
20
21
|
var regex = new RegExp("@o3r/testing/core(?!/".concat(frameworkName, ")(.*)"));
|
|
21
22
|
node_module_1.Module.prototype.require = function (id) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-replacement.js","sourceRoot":"","sources":["../../../src/tools/path-replacement/path-replacement.ts"],"names":[],"mappings":";;AAkBA,
|
|
1
|
+
{"version":3,"file":"path-replacement.js","sourceRoot":"","sources":["../../../src/tools/path-replacement/path-replacement.ts"],"names":[],"mappings":";;AAkBA,gCAiDC;;AAnED,4BAA8B;AAC9B,2CAEqB;AACrB,gCAAkC;AAClC,mCAGiB;AACjB,yDAE4B;AAC5B;;;;;GAKG;AACH,SAAgB,UAAU,CAAC,aAA0C,EAAE,sBAA6C;IAA7C,uCAAA,EAAA,2BAA6C;IAClH,IAAM,YAAY,GAAwB,EAAE,CAAC;IAC7C,iHAAiH;IACjH,IAAM,eAAe,GAAG,oBAAM,CAAC,SAAS,CAAC,OAAO,CAAC;IACjD,IAAM,KAAK,GAAG,IAAI,MAAM,CAAC,+BAAwB,aAAa,UAAO,CAAC,CAAC;IACvE,oBAAM,CAAC,SAAS,CAAC,OAAO,GAAG,UAA+B,EAAU;QAClE,IAAM,KAAK,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAA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ACnE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACpB,CAAC;YACH,CAAC;YAED,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC;IACH,CAAmB,CAAC;AACtB,CAAC","sourcesContent":["import * as fs from 'node:fs';\nimport {\n Module,\n} from 'node:module';\nimport * as path from 'node:path';\nimport {\n TransformOptions,\n transformSync,\n} from 'esbuild';\nimport {\n requireFromString,\n} from 'module-from-string';\n/**\n * Switch to the needed implementation of core testing, when running e2e tests\n * transforms ESM into CJS when needed\n * @param frameworkName Name of the framework used for e2e testing (playwright|protractor)\n * @param customTransformOptions\n */\nexport function adjustPath(frameworkName: 'playwright' | 'protractor', customTransformOptions: TransformOptions = {}) {\n const modulesCache: Record<string, any> = {};\n // eslint-disable-next-line @typescript-eslint/unbound-method -- No need to bind the method, we are using `apply`\n const originalRequire = Module.prototype.require;\n const regex = new RegExp(`@o3r/testing/core(?!/${frameworkName})(.*)`);\n Module.prototype.require = function (this: NodeJS.Module, id: string) {\n const newId = id.replace(regex, `@o3r/testing/core/${frameworkName}$1`);\n\n try {\n return Reflect.apply(originalRequire, this, [newId]);\n } catch {\n const paths = ([] as string[])\n .concat(this.paths, this.paths.map((i) => i.replace(/[/\\\\]node_modules$/, '')));\n\n const filePath = require.resolve(newId, { paths });\n if (!modulesCache[filePath]) {\n const fileContent = fs.readFileSync(filePath);\n const cwd = path.resolve(process.cwd(), 'src');\n // we use ESBUILD to transform it into CJS\n const trans = transformSync(fileContent.toString(), {\n loader: 'js',\n format: 'cjs',\n target: 'es2016',\n sourcesContent: true,\n sourceRoot: cwd,\n ...customTransformOptions\n });\n\n /**\n * requireFromString will execute the file apart from just returning a module\n * It can throw an exception which will prevent stop the execution\n *\n * That main blocker includes IVY-compatible libraries which have\n * no compiler facade in a global scope.\n */\n try {\n modulesCache[filePath] = requireFromString(trans.code, {\n dirname: path.dirname(filePath),\n useCurrentGlobal: true\n });\n } catch (ex) {\n // eslint-disable-next-line no-console -- no other logger available\n console.error(ex);\n }\n }\n\n return modulesCache[filePath];\n }\n } as NodeJS.Require;\n}\n"]}
|