testeranto 0.129.0 → 0.135.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/.aider.chat.history.md +137798 -0
- package/.aider.input.history +370 -0
- package/.aider.tags.cache.v3/{ec/c0/161c249c35be853cc40cf11f9267.val → 62/f5/8af72140d93c58db2f6aa5bf3f1f.val} +0 -0
- package/.aider.tags.cache.v3/8e/ec/2d4659a1589a0187a757ab1cbefa.val +0 -0
- package/.aider.tags.cache.v3/{b7/e6/5be87b62aeaf2bc244ff41c1b61a.val → a7/97/6d37fce350ad2d588f36729db0cd.val} +0 -0
- package/.aider.tags.cache.v3/{e3/e6/3501625caf5d5eb171f0d248462e.val → ad/3c/10f2ab1397f6d544e613d2a6acaf.val} +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/d8/b0/a8966fcd65890fd9f70d7afe8141.val +0 -0
- package/.aider.tags.cache.v3/dd/5b/0ade824b0841c7c11e9352c5d2ca.val +0 -0
- package/README.md +194 -182
- package/bundle.js +8 -75
- package/dist/common/src/Init.js +6 -1
- package/dist/common/src/Node.js +6 -4
- package/dist/common/src/NodeSidecar.js +15 -0
- package/dist/common/src/PM/PM_WithEslintAndTsc.js +189 -0
- package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +109 -0
- package/dist/common/src/PM/__tests__/pureSidecar.testeranto.js +94 -0
- package/dist/common/src/PM/__tests__/webSidecar.testeranto.js +94 -0
- package/dist/common/src/PM/base.js +33 -16
- package/dist/common/src/PM/main.js +492 -428
- package/dist/common/src/PM/node.js +54 -22
- package/dist/common/src/PM/nodeSidecar.js +65 -0
- package/dist/common/src/PM/pure.js +55 -47
- package/dist/common/src/PM/pureSidecar.js +48 -0
- package/dist/common/src/PM/sidecar.js +11 -0
- package/dist/common/src/PM/web.js +24 -6
- package/dist/common/src/PM/webSidecar.js +47 -0
- package/dist/common/src/PureSidecar.js +13 -0
- package/dist/common/src/SP__Polygon.test.js +10 -0
- package/dist/common/src/WebSidecar.js +14 -0
- package/dist/common/src/build.js +66 -12
- package/dist/common/src/defaultConfig.js +1 -0
- package/dist/common/src/esbuildConfigs/consoleDetectorPlugin.js +27 -0
- package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
- package/dist/common/src/esbuildConfigs/node.js +2 -16
- package/dist/common/src/esbuildConfigs/pure.js +12 -12
- package/dist/common/src/esbuildConfigs/rebuildPlugin.js +22 -0
- package/dist/common/src/esbuildConfigs/web.js +12 -17
- package/dist/common/src/lib/Sidecar.js +6 -0
- package/dist/common/src/lib/abstractBase.js +13 -6
- package/dist/common/src/lib/basebuilder.js +1 -3
- package/dist/common/src/lib/classBuilder.js +6 -20
- package/dist/common/src/lib/core.js +11 -6
- package/dist/common/src/lib/index.js +13 -4
- package/dist/common/src/lib/pmProxy.js +1 -1
- package/dist/common/src/mothership/index.js +16 -0
- package/dist/common/src/mothership/test.js +65 -0
- package/dist/common/src/utils/queue.js +36 -0
- package/dist/common/src/utils.js +34 -5
- package/dist/common/testeranto.config.js +77 -39
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Init.js +6 -1
- package/dist/module/src/Node.js +6 -4
- package/dist/module/src/NodeSidecar.js +11 -0
- package/dist/module/src/PM/PM_WithEslintAndTsc.js +182 -0
- package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +104 -0
- package/dist/module/src/PM/__tests__/pureSidecar.testeranto.js +89 -0
- package/dist/module/src/PM/__tests__/webSidecar.testeranto.js +89 -0
- package/dist/module/src/PM/base.js +33 -16
- package/dist/module/src/PM/main.js +493 -429
- package/dist/module/src/PM/node.js +54 -22
- package/dist/module/src/PM/nodeSidecar.js +58 -0
- package/dist/module/src/PM/pure.js +55 -44
- package/dist/module/src/PM/pureSidecar.js +41 -0
- package/dist/module/src/PM/sidecar.js +7 -0
- package/dist/module/src/PM/web.js +24 -6
- package/dist/module/src/PM/webSidecar.js +40 -0
- package/dist/module/src/Project.js +154 -75
- package/dist/module/src/PureSidecar.js +9 -0
- package/dist/module/src/ReportClient.js +132 -97
- package/dist/module/src/SP__Polygon.test.js +8 -0
- package/dist/module/src/TestReport.js +32 -14
- package/dist/module/src/WebSidecar.js +10 -0
- package/dist/module/src/build.js +66 -12
- package/dist/module/src/defaultConfig.js +1 -0
- package/dist/module/src/esbuildConfigs/consoleDetectorPlugin.js +24 -0
- package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
- package/dist/module/src/esbuildConfigs/node.js +2 -16
- package/dist/module/src/esbuildConfigs/pure.js +12 -12
- package/dist/module/src/esbuildConfigs/rebuildPlugin.js +17 -0
- package/dist/module/src/esbuildConfigs/web.js +12 -17
- package/dist/module/src/lib/Sidecar.js +2 -0
- package/dist/module/src/lib/abstractBase.js +13 -6
- package/dist/module/src/lib/basebuilder.js +1 -3
- package/dist/module/src/lib/classBuilder.js +6 -20
- package/dist/module/src/lib/core.js +11 -6
- package/dist/module/src/lib/index.js +12 -4
- package/dist/module/src/lib/pmProxy.js +1 -1
- package/dist/module/src/mothership/index.js +11 -0
- package/dist/module/src/mothership/test.js +60 -0
- package/dist/module/src/utils/queue.js +32 -0
- package/dist/module/src/utils.js +34 -5
- package/dist/module/testeranto.config.js +77 -36
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Project.js +3287 -385
- package/dist/prebuild/ReportClient.js +0 -24638
- package/dist/prebuild/TestReport.js +26 -22
- package/dist/prebuild/build.mjs +192 -70
- package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +14 -1
- package/dist/prebuild/init-docs.mjs +2 -5
- package/dist/prebuild/mothership/index.mjs +17 -0
- package/dist/prebuild/run.mjs +733 -433
- package/dist/types/src/CoreTypes.d.ts +51 -0
- package/dist/types/src/Node.d.ts +2 -2
- package/dist/types/src/NodeSidecar.d.ts +6 -0
- package/dist/types/src/PM/PM_WithEslintAndTsc.d.ts +23 -0
- package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +2 -0
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +2 -0
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +2 -0
- package/dist/types/src/PM/base.d.ts +6 -5
- package/dist/types/src/PM/index.d.ts +6 -4
- package/dist/types/src/PM/main.d.ts +23 -26
- package/dist/types/src/PM/node.d.ts +8 -6
- package/dist/types/src/PM/nodeSidecar.d.ts +13 -0
- package/dist/types/src/PM/pure.d.ts +4 -3
- package/dist/types/src/PM/pureSidecar.d.ts +11 -0
- package/dist/types/src/PM/sidecar.d.ts +8 -0
- package/dist/types/src/PM/web.d.ts +18 -8
- package/dist/types/src/PM/webSidecar.d.ts +11 -0
- package/dist/types/src/PureSidecar.d.ts +8 -0
- package/dist/types/src/SP__Polygon.test.d.ts +1 -0
- package/dist/types/src/Types.d.ts +80 -58
- package/dist/types/src/Web.d.ts +1 -1
- package/dist/types/src/WebSidecar.d.ts +8 -0
- package/dist/types/src/esbuildConfigs/consoleDetectorPlugin.d.ts +2 -0
- package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +6 -0
- package/dist/types/src/lib/Sidecar.d.ts +5 -0
- package/dist/types/src/lib/abstractBase.d.ts +6 -12
- package/dist/types/src/lib/classBuilder.d.ts +7 -1
- package/dist/types/src/lib/core.d.ts +8 -2
- package/dist/types/src/lib/index.d.ts +10 -4
- package/dist/types/src/lib/types.d.ts +12 -2
- package/dist/types/src/mothership/index.d.ts +2 -0
- package/dist/types/src/mothership/test.d.ts +2 -0
- package/dist/types/src/utils/queue.d.ts +11 -0
- package/dist/types/src/utils.d.ts +4 -7
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docs/index.md +277 -0
- package/package.json +23 -104
- package/src/CoreTypes.ts +171 -0
- package/src/Init.ts +6 -5
- package/src/Node.ts +32 -15
- package/src/NodeSidecar.ts +22 -0
- package/src/PM/PM_WithEslintAndTsc.ts +315 -0
- package/src/PM/__tests__/nodeSidecar.testeranto.ts +173 -0
- package/src/PM/__tests__/pureSidecar.testeranto.ts +157 -0
- package/src/PM/__tests__/webSidecar.testeranto.ts +157 -0
- package/src/PM/base.ts +38 -17
- package/src/PM/index.ts +10 -4
- package/src/PM/main.ts +616 -589
- package/src/PM/node.ts +77 -33
- package/src/PM/nodeSidecar.ts +73 -0
- package/src/PM/pure.ts +68 -58
- package/src/PM/pureSidecar.ts +56 -0
- package/src/PM/sidecar.ts +48 -0
- package/src/PM/web.ts +42 -11
- package/src/PM/webSidecar.ts +55 -0
- package/src/Project.tsx +312 -109
- package/src/Pure.ts +0 -2
- package/src/PureSidecar.ts +14 -0
- package/src/ReportClient.tsx +164 -170
- package/src/SP__Polygon.test.ts +13 -0
- package/src/TestReport.tsx +77 -6
- package/src/Types.ts +278 -157
- package/src/Web.ts +0 -3
- package/src/WebSidecar.ts +14 -0
- package/src/build.ts +104 -16
- package/src/defaultConfig.ts +1 -0
- package/src/esbuildConfigs/README.md +46 -0
- package/src/esbuildConfigs/consoleDetectorPlugin.ts +29 -0
- package/src/esbuildConfigs/eslint-formatter-testeranto.ts +17 -1
- package/src/esbuildConfigs/node.ts +2 -18
- package/src/esbuildConfigs/pure.ts +19 -14
- package/src/esbuildConfigs/rebuildPlugin.ts +23 -0
- package/src/esbuildConfigs/web.ts +15 -18
- package/src/lib/Sidecar.ts +6 -0
- package/src/lib/TEST_ADAPTER_RENAME.md +48 -0
- package/src/lib/abstractBase.ts +18 -10
- package/src/lib/basebuilder.ts +5 -4
- package/src/lib/classBuilder.ts +19 -21
- package/src/lib/core.ts +28 -19
- package/src/lib/index.ts +38 -18
- package/src/lib/pmProxy.ts +3 -1
- package/src/lib/types.ts +15 -2
- package/src/mothership/index.ts +15 -0
- package/src/mothership/test.ts +137 -0
- package/src/run.ts +0 -1
- package/src/utils/queue.ts +41 -0
- package/src/utils.ts +41 -15
- package/testeranto/bundles/node/mothership/chunk-PG6KUKNP.mjs +44 -0
- package/testeranto/bundles/node/mothership/chunk-V2EQEXU2.mjs +1032 -0
- package/testeranto/bundles/node/mothership/metafile.json +389 -0
- package/testeranto/bundles/node/mothership/src/PM/__tests__/nodeSidecar.testeranto.mjs +1219 -0
- package/testeranto/bundles/node/mothership/src/PM/__tests__/pureSidecar.testeranto.mjs +156 -0
- package/testeranto/bundles/node/mothership/src/PM/__tests__/sidecar.testeranto.mjs +1199 -0
- package/testeranto/bundles/node/mothership/src/PM/__tests__/webSidecar.testeranto.mjs +156 -0
- package/testeranto/bundles/node/mothership/src/mothership/test.mjs +24411 -0
- package/testeranto/bundles/pure/mothership/metafile.json +8 -0
- package/testeranto/bundles/web/mothership/metafile.json +8 -0
- package/testeranto/index.html +4 -4
- package/testeranto/reports/mothership/config.json +25 -0
- package/testeranto/reports/{redux → mothership}/index.html +8 -8
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/index.html +20 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +1564 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +22 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +35 -0
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/index.html +20 -0
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/lint_errors.json +80 -0
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +12 -0
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +26 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/bdd_errors.txt +1 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/index.html +20 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/lint_errors.json +1564 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/prompt.txt +22 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/tests.json +56 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/type_errors.txt +29 -0
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/index.html +20 -0
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/lint_errors.json +80 -0
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +12 -0
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +26 -0
- package/testeranto/reports/mothership/src/mothership/test/node/bdd_errors.txt +1 -0
- package/testeranto/reports/mothership/src/mothership/test/node/console_log.txt +4 -0
- package/testeranto/reports/mothership/src/mothership/test/node/index.html +20 -0
- package/testeranto/reports/mothership/src/mothership/test/node/lint_errors.json +1 -0
- package/testeranto/reports/mothership/src/mothership/test/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/mothership/test/node/prompt.txt +12 -0
- package/testeranto/reports/mothership/src/mothership/test/node/tests.json +24 -0
- package/testeranto/reports/mothership/src/mothership/test/node/type_errors.txt +18 -0
- package/testeranto/reports/mothership/summary.json +9 -0
- package/testeranto.config.ts +82 -44
- package/tsc.log +78 -81
- package/dist/common/src/SubPackages/react/component/index.js +0 -20
- package/dist/common/src/SubPackages/react/component/node.js +0 -10
- package/dist/common/src/SubPackages/react/component/pure.js +0 -10
- package/dist/common/src/SubPackages/react/component/web.js +0 -10
- package/dist/common/src/SubPackages/react/jsx/index.js +0 -64
- package/dist/common/src/SubPackages/react/jsx/node.js +0 -10
- package/dist/common/src/SubPackages/react/jsx/pure.js +0 -10
- package/dist/common/src/SubPackages/react/jsx/web.js +0 -10
- package/dist/common/src/SubPackages/react-dom/component/dynamic.js +0 -61
- package/dist/common/src/SubPackages/react-dom/component/node.js +0 -10
- package/dist/common/src/SubPackages/react-dom/component/pure.js +0 -10
- package/dist/common/src/SubPackages/react-dom/component/static.js +0 -26
- package/dist/common/src/SubPackages/react-dom/component/web.js +0 -16
- package/dist/common/src/SubPackages/react-dom/jsx/dynamic.js +0 -31
- package/dist/common/src/SubPackages/react-dom/jsx/node.js +0 -10
- package/dist/common/src/SubPackages/react-dom/jsx/pure.js +0 -10
- package/dist/common/src/SubPackages/react-dom/jsx/static.js +0 -59
- package/dist/common/src/SubPackages/react-dom/jsx/web.js +0 -16
- package/dist/common/src/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -54
- package/dist/common/src/SubPackages/react-test-renderer/component/index.js +0 -15
- package/dist/common/src/SubPackages/react-test-renderer/component/interface.js +0 -70
- package/dist/common/src/SubPackages/react-test-renderer/component/node.js +0 -8
- package/dist/common/src/SubPackages/react-test-renderer/component/pure.js +0 -8
- package/dist/common/src/SubPackages/react-test-renderer/component/test/implementation.js +0 -57
- package/dist/common/src/SubPackages/react-test-renderer/component/test/node.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/component/test/pure.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/component/test/web.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/component/web.js +0 -8
- package/dist/common/src/SubPackages/react-test-renderer/fc/node.js +0 -60
- package/dist/common/src/SubPackages/react-test-renderer/fc/web.js +0 -60
- package/dist/common/src/SubPackages/react-test-renderer/jsx/index.js +0 -67
- package/dist/common/src/SubPackages/react-test-renderer/jsx/node.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/jsx/pure.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/jsx/web.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/index.js +0 -52
- package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/node.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/web.js +0 -10
- package/dist/common/src/examples/react/component/index.js +0 -33
- package/dist/common/src/examples/react/component/test.js +0 -36
- package/dist/module/src/SubPackages/react/component/index.js +0 -13
- package/dist/module/src/SubPackages/react/component/node.js +0 -5
- package/dist/module/src/SubPackages/react/component/pure.js +0 -5
- package/dist/module/src/SubPackages/react/component/web.js +0 -5
- package/dist/module/src/SubPackages/react/jsx/index.js +0 -58
- package/dist/module/src/SubPackages/react/jsx/node.js +0 -5
- package/dist/module/src/SubPackages/react/jsx/pure.js +0 -5
- package/dist/module/src/SubPackages/react/jsx/web.js +0 -5
- package/dist/module/src/SubPackages/react-dom/component/dynamic.js +0 -54
- package/dist/module/src/SubPackages/react-dom/component/node.js +0 -5
- package/dist/module/src/SubPackages/react-dom/component/pure.js +0 -5
- package/dist/module/src/SubPackages/react-dom/component/static.js +0 -22
- package/dist/module/src/SubPackages/react-dom/component/web.js +0 -11
- package/dist/module/src/SubPackages/react-dom/jsx/dynamic.js +0 -27
- package/dist/module/src/SubPackages/react-dom/jsx/node.js +0 -5
- package/dist/module/src/SubPackages/react-dom/jsx/pure.js +0 -5
- package/dist/module/src/SubPackages/react-dom/jsx/static.js +0 -53
- package/dist/module/src/SubPackages/react-dom/jsx/web.js +0 -11
- package/dist/module/src/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -16
- package/dist/module/src/SubPackages/react-test-renderer/component/index.js +0 -14
- package/dist/module/src/SubPackages/react-test-renderer/component/interface.js +0 -31
- package/dist/module/src/SubPackages/react-test-renderer/component/node.js +0 -3
- package/dist/module/src/SubPackages/react-test-renderer/component/pure.js +0 -3
- package/dist/module/src/SubPackages/react-test-renderer/component/test/implementation.js +0 -54
- package/dist/module/src/SubPackages/react-test-renderer/component/test/node.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/component/test/pure.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/component/test/web.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/component/web.js +0 -3
- package/dist/module/src/SubPackages/react-test-renderer/fc/node.js +0 -22
- package/dist/module/src/SubPackages/react-test-renderer/fc/web.js +0 -22
- package/dist/module/src/SubPackages/react-test-renderer/jsx/index.js +0 -28
- package/dist/module/src/SubPackages/react-test-renderer/jsx/node.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/jsx/pure.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/jsx/web.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/index.js +0 -16
- package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/node.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/web.js +0 -5
- package/dist/module/src/examples/react/component/index.js +0 -26
- package/dist/module/src/examples/react/component/test.js +0 -32
- package/dist/prebuild/ReportClient.css +0 -11342
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/src/SubPackages/react/component/index.d.ts +0 -4
- package/dist/types/src/SubPackages/react/component/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react/component/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react/component/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react/jsx/index.d.ts +0 -5
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react/jsx/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/component/dynamic.d.ts +0 -20
- package/dist/types/src/SubPackages/react-dom/component/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/component/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/component/static.d.ts +0 -9
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/jsx/dynamic.d.ts +0 -5
- package/dist/types/src/SubPackages/react-dom/jsx/index.d.ts +0 -6
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/jsx/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/jsx/static.d.ts +0 -5
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -6
- package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +0 -3
- package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/component/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/component/test/implementation.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/component/test/node.d.ts +0 -3
- package/dist/types/src/SubPackages/react-test-renderer/component/test/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/component/test/web.d.ts +0 -3
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/fc/web.d.ts +0 -9
- package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +0 -11
- package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/jsx/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -15
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -5
- package/dist/types/src/examples/react/component/index.d.ts +0 -13
- package/dist/types/src/examples/react/component/test.d.ts +0 -17
- package/src/SubPackages/react/component/index.ts +0 -28
- package/src/SubPackages/react/component/node.ts +0 -17
- package/src/SubPackages/react/component/pure.ts +0 -17
- package/src/SubPackages/react/component/web.ts +0 -17
- package/src/SubPackages/react/jsx/index.ts +0 -75
- package/src/SubPackages/react/jsx/node.ts +0 -23
- package/src/SubPackages/react/jsx/pure.ts +0 -23
- package/src/SubPackages/react/jsx/web.ts +0 -24
- package/src/SubPackages/react-dom/component/dynamic.ts +0 -107
- package/src/SubPackages/react-dom/component/node.ts +0 -17
- package/src/SubPackages/react-dom/component/pure.ts +0 -17
- package/src/SubPackages/react-dom/component/static.ts +0 -41
- package/src/SubPackages/react-dom/component/web.ts +0 -32
- package/src/SubPackages/react-dom/jsx/dynamic.ts +0 -46
- package/src/SubPackages/react-dom/jsx/index.ts +0 -6
- package/src/SubPackages/react-dom/jsx/node.ts +0 -18
- package/src/SubPackages/react-dom/jsx/pure.ts +0 -18
- package/src/SubPackages/react-dom/jsx/static.ts +0 -87
- package/src/SubPackages/react-dom/jsx/web.ts +0 -26
- package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +0 -54
- package/src/SubPackages/react-test-renderer/component/index.ts +0 -32
- package/src/SubPackages/react-test-renderer/component/interface.ts +0 -43
- package/src/SubPackages/react-test-renderer/component/node.ts +0 -18
- package/src/SubPackages/react-test-renderer/component/pure.ts +0 -18
- package/src/SubPackages/react-test-renderer/component/test/implementation.ts +0 -63
- package/src/SubPackages/react-test-renderer/component/test/node.ts +0 -14
- package/src/SubPackages/react-test-renderer/component/test/pure.ts +0 -14
- package/src/SubPackages/react-test-renderer/component/test/web.ts +0 -14
- package/src/SubPackages/react-test-renderer/component/web.ts +0 -18
- package/src/SubPackages/react-test-renderer/fc/node.ts +0 -83
- package/src/SubPackages/react-test-renderer/fc/web.ts +0 -80
- package/src/SubPackages/react-test-renderer/jsx/index.ts +0 -61
- package/src/SubPackages/react-test-renderer/jsx/node.ts +0 -31
- package/src/SubPackages/react-test-renderer/jsx/pure.ts +0 -31
- package/src/SubPackages/react-test-renderer/jsx/web.ts +0 -32
- package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +0 -73
- package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +0 -36
- package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +0 -36
- package/src/examples/react/component/index.tsx +0 -35
- package/src/examples/react/component/test.ts +0 -83
- package/testeranto/bundles/node/redux/metafile.json +0 -559
- package/testeranto/bundles/pure/redux/metafile.json +0 -554
- package/testeranto/bundles/web/redux/metafile.json +0 -504
- package/testeranto/bundles/web/redux/test/web.html +0 -19
- package/testeranto/reports/redux/config.json +0 -38
- package/testeranto/reports/redux/summary.json +0 -20
- /package/dist/common/src/{SubPackages/react-dom/jsx/index.js → CoreTypes.js} +0 -0
- /package/dist/module/src/{SubPackages/react-dom/jsx/index.js → CoreTypes.js} +0 -0
package/src/build.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1
3
|
import ansiC from "ansi-colors";
|
|
2
4
|
import fs, { watch } from "fs";
|
|
3
5
|
import path from "path";
|
|
@@ -21,7 +23,7 @@ import {
|
|
|
21
23
|
readline.emitKeypressEvents(process.stdin);
|
|
22
24
|
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
const testName = process.argv[2];
|
|
25
27
|
|
|
26
28
|
let mode = process.argv[3] as "once" | "dev";
|
|
27
29
|
if (mode !== "once" && mode !== "dev") {
|
|
@@ -58,6 +60,24 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
58
60
|
return Array.from(meta(config.tests, new Set()));
|
|
59
61
|
};
|
|
60
62
|
|
|
63
|
+
const getSideCars = (runtime?: IRunTime): string[] => {
|
|
64
|
+
return Array.from(
|
|
65
|
+
new Set(
|
|
66
|
+
config.tests
|
|
67
|
+
.reduce((mm, t) => {
|
|
68
|
+
mm = mm.concat(t[3]);
|
|
69
|
+
return mm;
|
|
70
|
+
}, [] as ITestTypes[])
|
|
71
|
+
.filter((t) => {
|
|
72
|
+
return t[1] === runtime;
|
|
73
|
+
})
|
|
74
|
+
.map((t) => {
|
|
75
|
+
return t[0];
|
|
76
|
+
})
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
61
81
|
const config: IBuiltConfig = {
|
|
62
82
|
...rawConfig,
|
|
63
83
|
buildDir: process.cwd() + "/testeranto/bundles/" + testName,
|
|
@@ -86,10 +106,19 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
86
106
|
|
|
87
107
|
let status: "build" | "built" = "build";
|
|
88
108
|
|
|
89
|
-
const {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
109
|
+
const {
|
|
110
|
+
nodeEntryPoints,
|
|
111
|
+
nodeEntryPointSidecars,
|
|
112
|
+
webEntryPoints,
|
|
113
|
+
webEntryPointSidecars,
|
|
114
|
+
pureEntryPoints,
|
|
115
|
+
pureEntryPointSidecars,
|
|
116
|
+
} = getRunnables(config.tests, testName);
|
|
117
|
+
|
|
118
|
+
// const { nodeEntryPointsSidecars, webEntryPointsSidecars, importEntryPointsSideCars } = getRunnableSidecars(
|
|
119
|
+
// config.tests,
|
|
120
|
+
// testName
|
|
121
|
+
// );
|
|
93
122
|
|
|
94
123
|
const onNodeDone = () => {
|
|
95
124
|
nodeDone = true;
|
|
@@ -116,6 +145,7 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
116
145
|
}
|
|
117
146
|
};
|
|
118
147
|
|
|
148
|
+
console.log(`testeranto/reports/${testName}`);
|
|
119
149
|
if (!fs.existsSync(`testeranto/reports/${testName}`)) {
|
|
120
150
|
fs.mkdirSync(`testeranto/reports/${testName}`);
|
|
121
151
|
}
|
|
@@ -165,13 +195,14 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
165
195
|
<title>${pckge.name} - testeranto</title>
|
|
166
196
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
167
197
|
<meta name="author" content="" />
|
|
198
|
+
<base href="https://adamwong246.github.io/spacetrash_v8" target="_blank">
|
|
168
199
|
|
|
169
200
|
<script type="application/json" id="bigConfig">
|
|
170
201
|
${JSON.stringify(Object.keys(bigConfig.projects))}
|
|
171
202
|
</script>
|
|
172
203
|
|
|
173
|
-
<link rel="stylesheet" href="Project.css" />
|
|
174
|
-
<script type="module" src="Project.js"></script>
|
|
204
|
+
<link rel="stylesheet" href="/reports/Project.css" />
|
|
205
|
+
<script type="module" src="/reports/Project.js"></script>
|
|
175
206
|
|
|
176
207
|
</head>
|
|
177
208
|
|
|
@@ -224,12 +255,25 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
224
255
|
// });
|
|
225
256
|
|
|
226
257
|
const x: [IRunTime, string[]][] = [
|
|
227
|
-
["pure", Object.keys(
|
|
258
|
+
["pure", Object.keys(pureEntryPoints)],
|
|
228
259
|
["node", Object.keys(nodeEntryPoints)],
|
|
229
260
|
["web", Object.keys(webEntryPoints)],
|
|
261
|
+
// [
|
|
262
|
+
// "pure",
|
|
263
|
+
// [...Object.keys(pureEntryPoints), ...Object.keys(pureEntryPointSidecars)],
|
|
264
|
+
// ],
|
|
265
|
+
// [
|
|
266
|
+
// "node",
|
|
267
|
+
// [...Object.keys(nodeEntryPoints), ...Object.keys(nodeEntryPointSidecars)],
|
|
268
|
+
// ],
|
|
269
|
+
// [
|
|
270
|
+
// "web",
|
|
271
|
+
// [...Object.keys(webEntryPoints), ...Object.keys(webEntryPointSidecars)],
|
|
272
|
+
// ],
|
|
230
273
|
];
|
|
231
274
|
|
|
232
275
|
x.forEach(async ([runtime, keys]) => {
|
|
276
|
+
console.log(runtime, keys);
|
|
233
277
|
keys.forEach(async (k) => {
|
|
234
278
|
const folder = `testeranto/reports/${testName}/${k
|
|
235
279
|
.split(".")
|
|
@@ -250,8 +294,8 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
250
294
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
251
295
|
<meta name="author" content="" />
|
|
252
296
|
|
|
253
|
-
<link rel="stylesheet" href="
|
|
254
|
-
<script src="
|
|
297
|
+
<link rel="stylesheet" href="../../../../../../TestReport.css" />
|
|
298
|
+
<script src="../../../../../../TestReport.js"></script>
|
|
255
299
|
|
|
256
300
|
</head>
|
|
257
301
|
|
|
@@ -263,16 +307,60 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
263
307
|
});
|
|
264
308
|
});
|
|
265
309
|
|
|
310
|
+
[
|
|
311
|
+
[pureEntryPoints, pureEntryPointSidecars, "pure"],
|
|
312
|
+
[webEntryPoints, webEntryPointSidecars, "web"],
|
|
313
|
+
[nodeEntryPoints, nodeEntryPointSidecars, "node"],
|
|
314
|
+
].forEach(
|
|
315
|
+
([eps, eps2, runtime]: [
|
|
316
|
+
Record<string, string>,
|
|
317
|
+
Record<string, string>,
|
|
318
|
+
IRunTime
|
|
319
|
+
]) => {
|
|
320
|
+
[...Object.keys(eps), ...Object.keys(eps2)].forEach((ep) => {
|
|
321
|
+
const fp = path.resolve(
|
|
322
|
+
`testeranto`,
|
|
323
|
+
`reports`,
|
|
324
|
+
testName,
|
|
325
|
+
ep.split(".").slice(0, -1).join("."),
|
|
326
|
+
runtime
|
|
327
|
+
);
|
|
328
|
+
fs.mkdirSync(fp, { recursive: true });
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
);
|
|
332
|
+
|
|
266
333
|
await Promise.all([
|
|
267
334
|
...(
|
|
268
335
|
[
|
|
269
|
-
[
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
336
|
+
[
|
|
337
|
+
esbuildImportConfiger,
|
|
338
|
+
pureEntryPoints,
|
|
339
|
+
pureEntryPointSidecars,
|
|
340
|
+
onImportDone,
|
|
341
|
+
],
|
|
342
|
+
[
|
|
343
|
+
esbuildNodeConfiger,
|
|
344
|
+
nodeEntryPoints,
|
|
345
|
+
nodeEntryPointSidecars,
|
|
346
|
+
onNodeDone,
|
|
347
|
+
],
|
|
348
|
+
[esbuildWebConfiger, webEntryPoints, webEntryPointSidecars, onWebDone],
|
|
349
|
+
] as [
|
|
350
|
+
(a, b, c) => any,
|
|
351
|
+
Record<string, string>,
|
|
352
|
+
Record<string, string>,
|
|
353
|
+
() => void
|
|
354
|
+
][]
|
|
355
|
+
).map(([configer, entryPoints, sidecars, done]) => {
|
|
274
356
|
esbuild
|
|
275
|
-
.context(
|
|
357
|
+
.context(
|
|
358
|
+
configer(
|
|
359
|
+
config,
|
|
360
|
+
[...Object.keys(entryPoints), ...Object.keys(sidecars)],
|
|
361
|
+
testName
|
|
362
|
+
)
|
|
363
|
+
)
|
|
276
364
|
.then(async (ctx) => {
|
|
277
365
|
if (mode === "dev") {
|
|
278
366
|
await ctx.watch().then((v) => {
|
package/src/defaultConfig.ts
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Console Detector Plugin
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
This esbuild plugin detects usage of `console.*` methods in code that will run under the Pure runtime. Since Pure runtime doesn't allow IO operations, these calls will fail silently. The plugin provides warnings during build time to alert developers.
|
|
5
|
+
|
|
6
|
+
## Why This Exists
|
|
7
|
+
1. **Pure Runtime Constraints**:
|
|
8
|
+
- Pure runtime has no access to IO operations
|
|
9
|
+
- Console methods are IO operations
|
|
10
|
+
- Failed calls won't throw errors, just silently fail
|
|
11
|
+
|
|
12
|
+
2. **Developer Experience**:
|
|
13
|
+
- Catches issues at build time rather than runtime
|
|
14
|
+
- Clearly indicates which files/lines need attention
|
|
15
|
+
- Guides developers to use Node runtime when IO is needed
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
```javascript
|
|
19
|
+
import { consoleDetectorPlugin } from './consoleDetectorPlugin';
|
|
20
|
+
|
|
21
|
+
// Add to your esbuild config
|
|
22
|
+
esbuild.build({
|
|
23
|
+
plugins: [consoleDetectorPlugin],
|
|
24
|
+
// ... other config
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Behavior
|
|
29
|
+
- Scans all .js and .ts files
|
|
30
|
+
- Detects any `console.*` method calls
|
|
31
|
+
- Generates warnings with file locations
|
|
32
|
+
- Doesn't fail the build (just warns)
|
|
33
|
+
|
|
34
|
+
## Recommendations
|
|
35
|
+
1. For Pure runtime code:
|
|
36
|
+
- Remove all console.* calls
|
|
37
|
+
- Use alternative debugging methods
|
|
38
|
+
|
|
39
|
+
2. When you need console output:
|
|
40
|
+
- Switch to Node runtime
|
|
41
|
+
- Use the appropriate test interface
|
|
42
|
+
|
|
43
|
+
## Implementation Notes
|
|
44
|
+
- Uses esbuild's onLoad hook
|
|
45
|
+
- Checks for 20+ different console methods
|
|
46
|
+
- Provides exact line numbers for warnings
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Plugin } from 'esbuild';
|
|
2
|
+
|
|
3
|
+
export const consoleDetectorPlugin: Plugin = {
|
|
4
|
+
name: 'console-detector',
|
|
5
|
+
setup(build) {
|
|
6
|
+
build.onLoad({ filter: /\.(js|ts)$/ }, async (args) => {
|
|
7
|
+
const contents = await require('fs').promises.readFile(args.path, 'utf8');
|
|
8
|
+
|
|
9
|
+
const consolePattern = /console\.(log|error|warn|info|debug|trace|dir|dirxml|table|group|groupEnd|clear|count|countReset|assert|profile|profileEnd|time|timeLog|timeEnd|timeStamp|context|memory)/g;
|
|
10
|
+
const matches = contents.match(consolePattern);
|
|
11
|
+
|
|
12
|
+
if (matches) {
|
|
13
|
+
const uniqueMethods = [...new Set(matches)];
|
|
14
|
+
return {
|
|
15
|
+
warnings: uniqueMethods.map(method => ({
|
|
16
|
+
text: `Detected ${method} call - Pure runtime does not allow IO operations. Use Node runtime instead.`,
|
|
17
|
+
location: {
|
|
18
|
+
file: args.path,
|
|
19
|
+
line: contents.split('\n').findIndex(line => line.includes(method)) + 1,
|
|
20
|
+
column: 0
|
|
21
|
+
}
|
|
22
|
+
}))
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return null;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import { LintResult } from "eslint/lib/linter";
|
|
2
2
|
|
|
3
3
|
export default function (results: LintResult[]) {
|
|
4
|
-
return
|
|
4
|
+
return results
|
|
5
|
+
.filter((r) => r.messages.length)
|
|
6
|
+
.map((r) => {
|
|
7
|
+
const path = r.filePath.replace(process.cwd() + "/", "");
|
|
8
|
+
return [
|
|
9
|
+
path,
|
|
10
|
+
...r.messages.map((m) =>
|
|
11
|
+
[
|
|
12
|
+
`${m.line}:${m.column} ${m.message} (${m.ruleId || ""})`,
|
|
13
|
+
...(m.suggestions?.map(
|
|
14
|
+
(s) => `- ${s.message}${s.fix ? " (fix)" : ""}`
|
|
15
|
+
) || []),
|
|
16
|
+
].join("\n")
|
|
17
|
+
),
|
|
18
|
+
].join("\n");
|
|
19
|
+
})
|
|
20
|
+
.join("\n\n");
|
|
5
21
|
}
|
|
@@ -5,6 +5,7 @@ import { ITestconfig } from "../lib/index.js";
|
|
|
5
5
|
import baseEsBuildConfig from "./index.js";
|
|
6
6
|
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
7
7
|
import featuresPlugin from "./featuresPlugin";
|
|
8
|
+
import rebuildPlugin from "./rebuildPlugin.js";
|
|
8
9
|
|
|
9
10
|
export default (
|
|
10
11
|
config: ITestconfig,
|
|
@@ -44,24 +45,7 @@ export default (
|
|
|
44
45
|
featuresPlugin,
|
|
45
46
|
|
|
46
47
|
inputFilesPluginFactory,
|
|
47
|
-
|
|
48
|
-
name: "rebuild-notify",
|
|
49
|
-
setup: (build) => {
|
|
50
|
-
build.onStart(() => {
|
|
51
|
-
console.log(`> node build starting...`);
|
|
52
|
-
});
|
|
53
|
-
build.onEnd((result) => {
|
|
54
|
-
console.log(
|
|
55
|
-
`> node build ended with ${result.errors.length} errors`
|
|
56
|
-
);
|
|
57
|
-
if (result.errors.length > 0) {
|
|
58
|
-
console.log(result);
|
|
59
|
-
}
|
|
60
|
-
// console.log(result);
|
|
61
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
},
|
|
48
|
+
rebuildPlugin("node"),
|
|
65
49
|
|
|
66
50
|
...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
|
|
67
51
|
],
|
|
@@ -6,6 +6,10 @@ import baseEsBuildConfig from "./index.js";
|
|
|
6
6
|
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
7
7
|
import featuresPlugin from "./featuresPlugin.js";
|
|
8
8
|
|
|
9
|
+
import { isBuiltin } from "node:module";
|
|
10
|
+
import { consoleDetectorPlugin } from "./consoleDetectorPlugin.js";
|
|
11
|
+
import rebuildPlugin from "./rebuildPlugin.js";
|
|
12
|
+
|
|
9
13
|
export default (
|
|
10
14
|
config: ITestconfig,
|
|
11
15
|
entryPoints: string[],
|
|
@@ -18,7 +22,7 @@ export default (
|
|
|
18
22
|
return {
|
|
19
23
|
...baseEsBuildConfig(config),
|
|
20
24
|
|
|
21
|
-
drop: [
|
|
25
|
+
drop: [],
|
|
22
26
|
|
|
23
27
|
splitting: true,
|
|
24
28
|
|
|
@@ -46,25 +50,26 @@ export default (
|
|
|
46
50
|
featuresPlugin,
|
|
47
51
|
|
|
48
52
|
inputFilesPluginFactory,
|
|
53
|
+
|
|
54
|
+
consoleDetectorPlugin,
|
|
55
|
+
|
|
49
56
|
{
|
|
50
|
-
name: "
|
|
51
|
-
setup
|
|
52
|
-
build.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
`> pure build ended with ${result.errors.length} errors`
|
|
58
|
-
);
|
|
59
|
-
if (result.errors.length > 0) {
|
|
60
|
-
console.log(result);
|
|
57
|
+
name: "native-node-import-filter",
|
|
58
|
+
setup(build) {
|
|
59
|
+
build.onResolve({ filter: /fs/ }, (args) => {
|
|
60
|
+
if (isBuiltin(args.path)) {
|
|
61
|
+
throw new Error(
|
|
62
|
+
`cannot use native node package "${args.path}" in a "pure" test. If you really want to use this package, convert this test from "pure" to "node"`
|
|
63
|
+
);
|
|
61
64
|
}
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
|
|
66
|
+
return { path: args.path };
|
|
64
67
|
});
|
|
65
68
|
},
|
|
66
69
|
},
|
|
67
70
|
|
|
71
|
+
rebuildPlugin("pure"),
|
|
72
|
+
|
|
68
73
|
...((config.nodePlugins || []).map((p) => p(register, entryPoints)) ||
|
|
69
74
|
[]),
|
|
70
75
|
],
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
|
|
3
|
+
import { IRunTime } from "../lib";
|
|
4
|
+
|
|
5
|
+
export default (r: IRunTime) => {
|
|
6
|
+
return {
|
|
7
|
+
name: "rebuild-notify",
|
|
8
|
+
setup: (build) => {
|
|
9
|
+
build.onStart(() => {
|
|
10
|
+
console.log(`> web build starting...`);
|
|
11
|
+
});
|
|
12
|
+
build.onEnd((result) => {
|
|
13
|
+
console.log(`> web build ended with ${result.errors.length} errors`);
|
|
14
|
+
if (result.errors.length > 0) {
|
|
15
|
+
fs.writeFileSync(
|
|
16
|
+
`./testeranto/reports${r}_build_errors`,
|
|
17
|
+
JSON.stringify(result, null, 2)
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { polyfillNode } from "esbuild-plugin-polyfill-node";
|
|
2
|
+
|
|
1
3
|
import { BuildOptions } from "esbuild";
|
|
2
4
|
import path from "path";
|
|
3
5
|
|
|
@@ -6,6 +8,7 @@ import { ITestconfig } from "../lib/index.js";
|
|
|
6
8
|
import baseEsBuildConfig from "./index.js";
|
|
7
9
|
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
8
10
|
import featuresPlugin from "./featuresPlugin.js";
|
|
11
|
+
import rebuildPlugin from "./rebuildPlugin.js";
|
|
9
12
|
|
|
10
13
|
export default (
|
|
11
14
|
config: ITestconfig,
|
|
@@ -20,6 +23,7 @@ export default (
|
|
|
20
23
|
return {
|
|
21
24
|
...baseEsBuildConfig(config),
|
|
22
25
|
|
|
26
|
+
treeShaking: true,
|
|
23
27
|
outdir: `testeranto/bundles/web/${testName}`,
|
|
24
28
|
|
|
25
29
|
alias: {
|
|
@@ -55,24 +59,17 @@ export default (
|
|
|
55
59
|
plugins: [
|
|
56
60
|
featuresPlugin,
|
|
57
61
|
inputFilesPluginFactory,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
console.log(result);
|
|
70
|
-
}
|
|
71
|
-
// console.log(result);
|
|
72
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
},
|
|
62
|
+
|
|
63
|
+
polyfillNode({
|
|
64
|
+
// You might need to configure specific Node.js modules you want to polyfill
|
|
65
|
+
// Example:
|
|
66
|
+
// modules: {
|
|
67
|
+
// 'util': true,
|
|
68
|
+
// 'fs': false,
|
|
69
|
+
// }
|
|
70
|
+
}),
|
|
71
|
+
|
|
72
|
+
rebuildPlugin("web"),
|
|
76
73
|
|
|
77
74
|
...((config.webPlugins || []).map((p) => p(register, entryPoints)) || []),
|
|
78
75
|
],
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Test Adapter Rename Proposal
|
|
2
|
+
|
|
3
|
+
## Current Problems
|
|
4
|
+
1. `interface` is:
|
|
5
|
+
- Too vague/overloaded term
|
|
6
|
+
- Conflicts with TypeScript keyword
|
|
7
|
+
- Doesn't convey the wrapping/mediation purpose
|
|
8
|
+
|
|
9
|
+
## Proposed Solution
|
|
10
|
+
Rename to `TestAdapter` because:
|
|
11
|
+
- Standard pattern name in testing frameworks
|
|
12
|
+
- Precisely describes the wrapping/adaptation role
|
|
13
|
+
- Avoids language conflicts
|
|
14
|
+
- Matches industry terminology
|
|
15
|
+
|
|
16
|
+
## Required Changes
|
|
17
|
+
### File Renames:
|
|
18
|
+
- `testInterface.ts` → `testAdapter.ts`
|
|
19
|
+
|
|
20
|
+
### Type Changes:
|
|
21
|
+
- `ITestInterface` → `ITestAdapter`
|
|
22
|
+
- All related interface types
|
|
23
|
+
|
|
24
|
+
### Documentation Updates:
|
|
25
|
+
- Update all JSDoc references
|
|
26
|
+
- Update README examples
|
|
27
|
+
|
|
28
|
+
## Benefits
|
|
29
|
+
1. Clearer code intent
|
|
30
|
+
2. Better pattern alignment
|
|
31
|
+
3. Reduced naming collisions
|
|
32
|
+
4. More discoverable architecture
|
|
33
|
+
|
|
34
|
+
## Risks/Mitigations
|
|
35
|
+
1. Breaking change → Major version bump
|
|
36
|
+
2. Need to update all test files → Codemod script
|
|
37
|
+
3. Documentation updates → Batch update before release
|
|
38
|
+
|
|
39
|
+
## Implementation Plan
|
|
40
|
+
1. First create new types alongside old ones
|
|
41
|
+
2. Deprecate old names with warnings
|
|
42
|
+
3. Provide migration guide
|
|
43
|
+
4. Remove old names in next major version
|
|
44
|
+
|
|
45
|
+
## References
|
|
46
|
+
- [xUnit Test Patterns](http://xunitpatterns.com/)
|
|
47
|
+
- [VS Test Adapters](https://devblogs.microsoft.com/devops/how-to-write-a-visual-studio-test-adapter/)
|
|
48
|
+
- [JUnit TestEngine](https://junit.org/junit5/docs/current/user-guide/)
|
package/src/lib/abstractBase.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
+
import type { IT, OT } from "../Types.js";
|
|
2
4
|
|
|
3
5
|
import { ITTestResourceConfiguration, ITestArtifactory, ITLog } from ".";
|
|
4
6
|
import { IPM } from "./types.js";
|
|
@@ -118,7 +120,7 @@ export abstract class BaseSuite<I extends IT = IT, O extends OT = OT> {
|
|
|
118
120
|
} catch (e) {
|
|
119
121
|
this.failed = true;
|
|
120
122
|
this.fails = this.fails + 1;
|
|
121
|
-
|
|
123
|
+
console.error(e);
|
|
122
124
|
// this.fails.push(giver);
|
|
123
125
|
// return this;
|
|
124
126
|
}
|
|
@@ -204,7 +206,12 @@ export abstract class BaseGiven<I extends IT = IT> {
|
|
|
204
206
|
return {
|
|
205
207
|
key: this.key,
|
|
206
208
|
name: this.name,
|
|
207
|
-
whens: this.whens.map((w) =>
|
|
209
|
+
whens: this.whens.map((w) => {
|
|
210
|
+
if (w && w.toObj) return w.toObj();
|
|
211
|
+
|
|
212
|
+
console.error("w is not as expected!", w);
|
|
213
|
+
return {};
|
|
214
|
+
}),
|
|
208
215
|
thens: this.thens.map((t) => t.toObj()),
|
|
209
216
|
error: this.error ? [this.error, this.error.stack] : null,
|
|
210
217
|
failed: this.failed,
|
|
@@ -292,8 +299,7 @@ export abstract class BaseGiven<I extends IT = IT> {
|
|
|
292
299
|
pm,
|
|
293
300
|
`suite-${suiteNdx}/given-${key}/then-${thenNdx}`
|
|
294
301
|
);
|
|
295
|
-
|
|
296
|
-
return tester(t);
|
|
302
|
+
tester(t);
|
|
297
303
|
// ((t) => {
|
|
298
304
|
// return tester(t);
|
|
299
305
|
// })();
|
|
@@ -326,7 +332,7 @@ export abstract class BaseGiven<I extends IT = IT> {
|
|
|
326
332
|
export abstract class BaseWhen<I extends IT> {
|
|
327
333
|
public name: string;
|
|
328
334
|
whenCB: (x: I["iselection"]) => I["then"];
|
|
329
|
-
error:
|
|
335
|
+
error: Error;
|
|
330
336
|
|
|
331
337
|
constructor(name: string, whenCB: (xyz: I["iselection"]) => I["then"]) {
|
|
332
338
|
this.name = name;
|
|
@@ -341,9 +347,10 @@ export abstract class BaseWhen<I extends IT> {
|
|
|
341
347
|
): Promise<any>;
|
|
342
348
|
|
|
343
349
|
toObj() {
|
|
350
|
+
console.log("toObj error", this.error);
|
|
344
351
|
return {
|
|
345
352
|
name: this.name,
|
|
346
|
-
error: this.error,
|
|
353
|
+
error: this.error && this.error.name + this.error.stack,
|
|
347
354
|
};
|
|
348
355
|
}
|
|
349
356
|
|
|
@@ -361,9 +368,10 @@ export abstract class BaseWhen<I extends IT> {
|
|
|
361
368
|
this.whenCB,
|
|
362
369
|
testResourceConfiguration,
|
|
363
370
|
andWhenProxy(pm, filepath)
|
|
364
|
-
).catch((e) => {
|
|
365
|
-
|
|
366
|
-
|
|
371
|
+
).catch((e: Error) => {
|
|
372
|
+
console.log("MARK9", e);
|
|
373
|
+
this.error = e;
|
|
374
|
+
throw e;
|
|
367
375
|
});
|
|
368
376
|
}
|
|
369
377
|
}
|
package/src/lib/basebuilder.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
3
|
+
/* eslint-disable no-async-promise-executor */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
5
|
import { PassThrough } from "stream";
|
|
2
6
|
|
|
3
7
|
import { IT, ITestSpecification, OT } from "../Types.js";
|
|
@@ -105,21 +109,18 @@ export abstract class BaseBuilder<
|
|
|
105
109
|
receiveTestResourceConfig: async function (
|
|
106
110
|
puppetMaster: IPM
|
|
107
111
|
): Promise<IFinalResults> {
|
|
108
|
-
const start = await puppetMaster.start();
|
|
109
|
-
|
|
110
112
|
const logFilePath = "log.txt";
|
|
111
113
|
const access: number = await puppetMaster.createWriteStream(
|
|
112
114
|
logFilePath
|
|
113
115
|
);
|
|
114
116
|
|
|
115
117
|
const tLog = async (...l: string[]) => {
|
|
116
|
-
const x = await puppetMaster.write(access, `${l.toString()}\n`);
|
|
117
118
|
// console.log("x", x);
|
|
118
119
|
};
|
|
119
120
|
|
|
120
121
|
const suiteDone: BaseSuite<I, O> = await runner(puppetMaster, tLog);
|
|
121
122
|
|
|
122
|
-
const logPromise = new Promise(async (res
|
|
123
|
+
const logPromise = new Promise(async (res) => {
|
|
123
124
|
await puppetMaster.end(access);
|
|
124
125
|
res(true);
|
|
125
126
|
});
|