{"_id":"@asos/web-toggle-point-webpack","_rev":"8-9fd17f0b265140b44464d8c4b8ebfdc2","name":"@asos/web-toggle-point-webpack","dist-tags":{"latest":"0.9.0"},"versions":{"0.7.4":{"name":"@asos/web-toggle-point-webpack","version":"0.7.4","license":"MIT","_id":"@asos/web-toggle-point-webpack@0.7.4","maintainers":[{"name":"asos-bradleyabel","email":"bradley.abel@asos.com"},{"name":"asos-rupeshghelani","email":"rupesh.ghelani@asos.com"},{"name":"asos-roberth","email":"robert.hill@asos.com"},{"name":"asos-tonygorman","email":"Tony.Gorman@asos.com"},{"name":"asos-danielc","email":"DanielC@ASOS.com"}],"homepage":"https://github.com/asos/web-toggle-point#readme","bugs":{"url":"https://github.com/asos/web-toggle-point/issues"},"dist":{"shasum":"1130664d2f42e37999631d00737cfd794ca7c846","tarball":"https://registry.npmjs.org/@asos/web-toggle-point-webpack/-/web-toggle-point-webpack-0.7.4.tgz","fileCount":7,"integrity":"sha512-nQ+dlHDKa0M3c5V3iaBK2B8hDaInwoJVI29xJw14YvZk0eRN9PtqbEe53edMujr6DqDlzw9bGL1UorI8rX2ilg==","signatures":[{"sig":"MEUCIEu/MXQHkuMN01BJgN67TIMeeaDlldubfZA8j2WyOYP7AiEAy42w6XXb2+ASOmIPa7rKIGrrOuiGDb73UBS4IBnJQS8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3684314},"main":"./lib/main.cjs","type":"module","exports":{"./plugins":{"import":"./lib/main.js","require":"./lib/main.cjs"},"./pathSegmentToggleHandler":"./lib/pathSegmentToggleHandler.js"},"gitHead":"ca3f68325cff83644fab664414627fd3a5edc5e5","scripts":{"docs":"rimraf ./docs/**/*.html && jsdoc -c ../jsdoc.conf.js","lint":"eslint build src docs --flag unstable_config_lookup_from_file","test":"jest","build":"npm run clean && rollup -c build/rollup.mjs","clean":"rimraf ./lib","lint:fix":"npm run lint -- --fix","prepublishOnly":"npm run build"},"_npmUser":{"name":"asos-danielc","email":"DanielC@ASOS.com"},"repository":{"url":"git+https://github.com/asos/web-toggle-point.git","type":"git","directory":"packages/webpack"},"_npmVersion":"10.9.2","description":"toggle point webpack plugin","directories":{"doc":"docs"},"_nodeVersion":"22.14.0","dependencies":{"regexgen":"^1.3.0","fast-glob":"^3.2.12","@babel/runtime":"^7.26.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jsdoc":"^4.0.2","memfs":"^4.15.0","rimraf":"^6.0.1","webpack":"^5.88.2","webpack-cli":"^4.10.0","schema-utils":"^4.2.0","@types/webpack-env":"^1.18.0","rollup-plugin-copy":"^3.5.0","webpack-test-utils":"^2.1.0","@rollup/plugin-json":"^6.1.0","eslint-plugin-jsdoc":"^50.5.0","@rollup/plugin-babel":"^6.0.2","jsdoc-tsimport-plugin":"^1.0.5","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-node-resolve":"^15.2.1","rollup-plugin-auto-external":"^2.0.0"},"peerDependencies":{"next":">14","webpack":">=5.70"},"peerDependenciesMeta":{"next":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-toggle-point-webpack_0.7.4_1741271153024_0.3170124415032347","host":"s3://npm-registry-packages-npm-production"}},"0.7.5":{"name":"@asos/web-toggle-point-webpack","version":"0.7.5","license":"MIT","_id":"@asos/web-toggle-point-webpack@0.7.5","maintainers":[{"name":"asos-bradleyabel","email":"bradley.abel@asos.com"},{"name":"asos-rupeshghelani","email":"rupesh.ghelani@asos.com"},{"name":"asos-roberth","email":"robert.hill@asos.com"},{"name":"asos-tonygorman","email":"Tony.Gorman@asos.com"},{"name":"asos-danielc","email":"DanielC@ASOS.com"}],"homepage":"https://github.com/asos/web-toggle-point/tree/main/packages/webpack","bugs":{"url":"https://github.com/asos/web-toggle-point/issues"},"dist":{"shasum":"f0ab2960c37c0c944753a64c5821c99d2142c974","tarball":"https://registry.npmjs.org/@asos/web-toggle-point-webpack/-/web-toggle-point-webpack-0.7.5.tgz","fileCount":8,"integrity":"sha512-0AkF/cTkKTuFllLua//fRsACod54mCcO9/5GwQG7k8cLJPLnjuiRrLosXlOs0CUtkd0pqZV1cfXpxwlXtO1CFQ==","signatures":[{"sig":"MEYCIQCfur45CY1CHqxQKYM4IPRZ7zdn4LtvXDoI0oibzoOLZwIhAIq/3pzy8nupUs9JwowsBXr/X92Ke4kjx55M1SZIEvaE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3698612},"main":"./lib/main.cjs","type":"module","exports":{"./plugins":{"import":"./lib/main.js","require":"./lib/main.cjs"},"./pathSegmentToggleHandler":"./lib/pathSegmentToggleHandler.js"},"gitHead":"0ba42cc822c3326d5e6853b24b34070f3e357143","scripts":{"docs":"rimraf ./docs/**/*.html && jsdoc -c ../jsdoc.conf.js","lint":"eslint build src docs --flag unstable_config_lookup_from_file","test":"jest","build":"npm run clean && rollup -c build/rollup.mjs","clean":"rimraf ./lib","lint:fix":"npm run lint -- --fix","prepublishOnly":"npm run build"},"_npmUser":{"name":"asos-danielc","email":"DanielC@ASOS.com"},"repository":{"url":"git+https://github.com/asos/web-toggle-point.git","type":"git","directory":"packages/webpack"},"_npmVersion":"10.9.2","description":"toggle point webpack plugin","directories":{"doc":"docs"},"_nodeVersion":"22.17.0","dependencies":{"regexgen":"^1.3.0","fast-glob":"^3.2.12","@babel/runtime":"^7.26.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jsdoc":"^4.0.2","memfs":"^4.15.0","rimraf":"^6.0.1","webpack":"^5.88.2","webpack-cli":"^4.10.0","schema-utils":"^4.2.0","@types/webpack-env":"^1.18.0","rollup-plugin-copy":"^3.5.0","webpack-test-utils":"^2.1.0","@rollup/plugin-json":"^6.1.0","eslint-plugin-jsdoc":"^50.5.0","@rollup/plugin-babel":"^6.0.2","jsdoc-tsimport-plugin":"^1.0.5","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-node-resolve":"^15.2.1","rollup-plugin-auto-external":"^2.0.0"},"peerDependencies":{"next":">14","webpack":">=5.70"},"peerDependenciesMeta":{"next":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-toggle-point-webpack_0.7.5_1752505308623_0.48775981421454206","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@asos/web-toggle-point-webpack","version":"0.8.0","license":"MIT","_id":"@asos/web-toggle-point-webpack@0.8.0","maintainers":[{"name":"asos-bradleyabel","email":"bradley.abel@asos.com"},{"name":"asos-rupeshghelani","email":"rupesh.ghelani@asos.com"},{"name":"asos-roberth","email":"robert.hill@asos.com"},{"name":"asos-tonygorman","email":"Tony.Gorman@asos.com"},{"name":"asos-danielc","email":"DanielC@ASOS.com"}],"homepage":"https://github.com/asos/web-toggle-point/tree/main/packages/webpack","bugs":{"url":"https://github.com/asos/web-toggle-point/issues"},"dist":{"shasum":"73240397fae118a98c7cabe56a6f0ab5575f5594","tarball":"https://registry.npmjs.org/@asos/web-toggle-point-webpack/-/web-toggle-point-webpack-0.8.0.tgz","fileCount":8,"integrity":"sha512-/Rn/f8x5yV+QpTVIcbRN9BJscz4b2i0rOAUC3CTKDasTlpVz5K5yMeH7I7hZAMtlUD/H3AYthzSoOTPyg9hiWw==","signatures":[{"sig":"MEUCIB2OtN+siL3ULvUTFLwo/XswNInVQ55ax2aNhwA7VuvjAiEA/KJ6kQWxN38lgvrGrPMxBpZuzeQsqfFMlIbR+ptW5MQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3699738},"main":"./lib/main.cjs","type":"module","exports":{"./plugins":{"import":"./lib/main.js","require":"./lib/main.cjs"},"./pathSegmentToggleHandler":"./lib/pathSegmentToggleHandler.js"},"gitHead":"e84d4b3d02124838c00f045a3382e217b6139062","scripts":{"docs":"rimraf ./docs/**/*.html && jsdoc -c ../jsdoc.conf.js","lint":"eslint build src docs --flag unstable_config_lookup_from_file","test":"jest","build":"npm run clean && rollup -c build/rollup.mjs","clean":"rimraf ./lib","lint:fix":"npm run lint -- --fix","prepublishOnly":"npm run build"},"_npmUser":{"name":"asos-danielc","email":"DanielC@ASOS.com"},"repository":{"url":"git+https://github.com/asos/web-toggle-point.git","type":"git","directory":"packages/webpack"},"_npmVersion":"10.9.2","description":"toggle point webpack plugin","directories":{"doc":"docs"},"_nodeVersion":"22.17.0","dependencies":{"regexgen":"^1.3.0","fast-glob":"^3.2.12","@babel/runtime":"^7.26.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jsdoc":"^4.0.2","memfs":"^4.15.0","rimraf":"^6.0.1","webpack":"^5.88.2","webpack-cli":"^4.10.0","schema-utils":"^4.2.0","@types/webpack-env":"^1.18.0","rollup-plugin-copy":"^3.5.0","webpack-test-utils":"^2.1.0","@rollup/plugin-json":"^6.1.0","eslint-plugin-jsdoc":"^50.5.0","@rollup/plugin-babel":"^6.0.2","jsdoc-tsimport-plugin":"^1.0.5","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-node-resolve":"^15.2.1","rollup-plugin-auto-external":"^2.0.0"},"peerDependencies":{"next":">14","webpack":">=5.70"},"peerDependenciesMeta":{"next":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-toggle-point-webpack_0.8.0_1752510208633_0.7194182827544022","host":"s3://npm-registry-packages-npm-production"}},"0.8.1":{"name":"@asos/web-toggle-point-webpack","version":"0.8.1","keywords":["toggle point","feature toggles","feature flags","webpack","module proxy"],"license":"MIT","_id":"@asos/web-toggle-point-webpack@0.8.1","maintainers":[{"name":"asos-bradleyabel","email":"bradley.abel@asos.com"},{"name":"asos-rupeshghelani","email":"rupesh.ghelani@asos.com"},{"name":"asos-roberth","email":"robert.hill@asos.com"},{"name":"asos-tonygorman","email":"Tony.Gorman@asos.com"},{"name":"asos-danielc","email":"DanielC@ASOS.com"}],"homepage":"https://github.com/asos/web-toggle-point/tree/main/packages/webpack","bugs":{"url":"https://github.com/asos/web-toggle-point/issues"},"dist":{"shasum":"f4cdb7aa3de8a8071a6ca91969267dbe3c68d7a2","tarball":"https://registry.npmjs.org/@asos/web-toggle-point-webpack/-/web-toggle-point-webpack-0.8.1.tgz","fileCount":8,"integrity":"sha512-ldoReXocaca8hXqmgr1OJsk8R5J0xCPSAZcwAvvWzZhQNfYFKhm86TGYp+xDllwoG7BdPGVluLIz1CeKukIZ4w==","signatures":[{"sig":"MEYCIQD972Hy1JqL8zL0ovP6N9NmAtmBY9jugBzNVFhMezyMJQIhAIEOzbf3h1d4GufiV4SzlL8bz5aJeG8v7xaDRRMseo9h","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3697871},"main":"./lib/main.cjs","type":"module","exports":{"./plugins":{"import":"./lib/main.js","require":"./lib/main.cjs"},"./pathSegmentToggleHandler":"./lib/pathSegmentToggleHandler.js"},"gitHead":"bc7f6fd20141dd6f9ba026c45d748eb976cabd98","scripts":{"docs":"rimraf ./docs/**/*.html && jsdoc -c ../jsdoc.conf.js","lint":"eslint build src docs --flag unstable_config_lookup_from_file","test":"jest","build":"npm run clean && rollup -c build/rollup.mjs","clean":"rimraf ./lib","lint:fix":"npm run lint -- --fix","postpublish":"shx rm ./README.md LICENSE","prepublishOnly":"shx cp docs/README.md ../../LICENSE . && npm run build"},"_npmUser":{"name":"asos-danielc","email":"DanielC@ASOS.com"},"repository":{"url":"git+https://github.com/asos/web-toggle-point.git","type":"git","directory":"packages/webpack"},"_npmVersion":"10.9.3","description":"toggle point webpack plugin","directories":{"doc":"docs"},"_nodeVersion":"22.19.0","dependencies":{"regexgen":"^1.3.0","fast-glob":"^3.2.12","@babel/runtime":"^7.26.0"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","jest":"^29.7.0","jsdoc":"^4.0.2","memfs":"^4.15.0","rimraf":"^6.0.1","webpack":"^5.88.2","webpack-cli":"^4.10.0","schema-utils":"^4.2.0","@types/webpack-env":"^1.18.0","rollup-plugin-copy":"^3.5.0","webpack-test-utils":"^2.1.0","@rollup/plugin-json":"^6.1.0","eslint-plugin-jsdoc":"^50.5.0","@rollup/plugin-babel":"^6.0.2","jsdoc-tsimport-plugin":"^1.0.5","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-node-resolve":"^15.2.1","rollup-plugin-auto-external":"^2.0.0"},"peerDependencies":{"next":">14","webpack":">=5.70"},"peerDependenciesMeta":{"next":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-toggle-point-webpack_0.8.1_1759150823351_0.032192263992127046","host":"s3://npm-registry-packages-npm-production"}},"0.8.2":{"name":"@asos/web-toggle-point-webpack","version":"0.8.2","keywords":["toggle point","feature toggles","feature flags","webpack","module proxy"],"license":"MIT","_id":"@asos/web-toggle-point-webpack@0.8.2","maintainers":[{"name":"asos-bradleyabel","email":"bradley.abel@asos.com"},{"name":"asos-rupeshghelani","email":"rupesh.ghelani@asos.com"},{"name":"asos-roberth","email":"robert.hill@asos.com"},{"name":"asos-tonygorman","email":"Tony.Gorman@asos.com"},{"name":"asos-danielc","email":"DanielC@ASOS.com"}],"homepage":"https://github.com/asos/web-toggle-point/tree/main/packages/webpack","bugs":{"url":"https://github.com/asos/web-toggle-point/issues"},"dist":{"shasum":"7bcc7703a4329011751fca639395929865a5c48c","tarball":"https://registry.npmjs.org/@asos/web-toggle-point-webpack/-/web-toggle-point-webpack-0.8.2.tgz","fileCount":8,"integrity":"sha512-Xx35CbVXp7oG5rC/ZE8cSmJSyZRLDQT+G7ytYbMvdVY0+YAxhP8YMRYtqKitFe7CHfpS9X8gx6uumm+SWmDfAg==","signatures":[{"sig":"MEUCIQDFAH1riYtRUl2p0f9nKfgrlRLb0d8QmDDgnToStHTTdQIgdyZVD4w7Nb6t6H8R/OQXT2LePEUHN/qh7/idEkt3KOg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3697711},"main":"./lib/main.cjs","type":"module","exports":{"./plugins":{"import":"./lib/main.js","require":"./lib/main.cjs"},"./pathSegmentToggleHandler":"./lib/pathSegmentToggleHandler.js"},"gitHead":"bf5b97318a2fffb1dd86254fd3527869f58654f6","scripts":{"docs":"rimraf ./docs/**/*.html && jsdoc -c ../jsdoc.conf.js","lint":"eslint build src docs --flag unstable_config_lookup_from_file","test":"jest","build":"npm run clean && rollup -c build/rollup.mjs","clean":"rimraf ./lib","lint:fix":"npm run lint -- --fix","postpublish":"shx rm ./README.md LICENSE","prepublishOnly":"shx cp docs/README.md ../../LICENSE . && npm run build"},"_npmUser":{"name":"asos-danielc","email":"DanielC@ASOS.com"},"repository":{"url":"git+https://github.com/asos/web-toggle-point.git","type":"git","directory":"packages/webpack"},"_npmVersion":"10.9.3","description":"toggle point webpack plugin","directories":{"doc":"docs"},"_nodeVersion":"22.19.0","dependencies":{"regexgen":"^1.3.0","fast-glob":"^3.2.12","@babel/runtime":"^7.26.0"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","jest":"^29.7.0","jsdoc":"^4.0.2","memfs":"^4.15.0","rimraf":"^6.0.1","webpack":"^5.88.2","webpack-cli":"^4.10.0","schema-utils":"^4.2.0","@types/webpack-env":"^1.18.0","rollup-plugin-copy":"^3.5.0","webpack-test-utils":"^2.1.0","@rollup/plugin-json":"^6.1.0","eslint-plugin-jsdoc":"^50.5.0","@rollup/plugin-babel":"^6.0.2","jsdoc-tsimport-plugin":"^1.0.5","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-node-resolve":"^15.2.1","rollup-plugin-auto-external":"^2.0.0"},"peerDependencies":{"next":">14","webpack":">=5.70"},"peerDependenciesMeta":{"next":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-toggle-point-webpack_0.8.2_1759222825308_0.5807403390925971","host":"s3://npm-registry-packages-npm-production"}},"0.8.3":{"name":"@asos/web-toggle-point-webpack","version":"0.8.3","keywords":["toggle point","feature toggles","feature flags","webpack","module proxy"],"license":"MIT","_id":"@asos/web-toggle-point-webpack@0.8.3","maintainers":[{"name":"asos-roberth","email":"robert.hill@asos.com"},{"name":"asos-tonygorman","email":"Tony.Gorman@asos.com"},{"name":"asos-danielc","email":"DanielC@ASOS.com"}],"homepage":"https://github.com/asos/web-toggle-point/tree/main/packages/webpack","bugs":{"url":"https://github.com/asos/web-toggle-point/issues"},"dist":{"shasum":"0b4502f9a72068c2b861cc95937708ac4ed08335","tarball":"https://registry.npmjs.org/@asos/web-toggle-point-webpack/-/web-toggle-point-webpack-0.8.3.tgz","fileCount":8,"integrity":"sha512-tlLFAtvKf8WOVs2thKze8bLYpkcuVat2SNhHrjIi0UM1+S2l451VJVVz5Pwe7olphG/0bbn0ZU/mKzI3zeCLxw==","signatures":[{"sig":"MEUCIHIlhaooeSKvOu50DO9HnmBLFbU51FwWg1xTz9NmWVyTAiEAhPfwYEXP8lr1poHOZiwosGeWG2PwrXZBRbCqNB0+LzU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3697743},"main":"./lib/main.cjs","type":"module","exports":{"./plugins":{"import":"./lib/main.js","require":"./lib/main.cjs"},"./pathSegmentToggleHandler":"./lib/pathSegmentToggleHandler.js"},"gitHead":"daed26d56eaae55b1cc27df051ed69f0136f4767","scripts":{"docs":"rimraf ./docs/**/*.html && jsdoc -c ../jsdoc.conf.js","lint":"eslint build src docs --flag unstable_config_lookup_from_file","test":"jest","build":"npm run clean && rollup -c build/rollup.mjs","clean":"rimraf ./lib","lint:fix":"npm run lint -- --fix","postpublish":"shx rm ./README.md LICENSE","prepublishOnly":"node ../prepare-publish.mjs && npm run build"},"_npmUser":{"name":"asos-danielc","email":"DanielC@ASOS.com"},"repository":{"url":"git+https://github.com/asos/web-toggle-point.git","type":"git","directory":"packages/webpack"},"_npmVersion":"10.9.3","description":"toggle point webpack plugin","directories":{"doc":"docs"},"_nodeVersion":"22.20.0","dependencies":{"regexgen":"^1.3.0","fast-glob":"^3.2.12","@babel/runtime":"^7.26.0"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","jest":"^29.7.0","jsdoc":"^4.0.2","memfs":"^4.15.0","rimraf":"^6.0.1","webpack":"^5.88.2","webpack-cli":"^4.10.0","schema-utils":"^4.2.0","@types/webpack-env":"^1.18.0","rollup-plugin-copy":"^3.5.0","webpack-test-utils":"^2.1.0","@rollup/plugin-json":"^6.1.0","eslint-plugin-jsdoc":"^50.5.0","@rollup/plugin-babel":"^6.0.2","jsdoc-tsimport-plugin":"^1.0.5","@rollup/plugin-commonjs":"^25.0.4","transform-markdown-links":"^2.1.0","@rollup/plugin-node-resolve":"^15.2.1","rollup-plugin-auto-external":"^2.0.0"},"peerDependencies":{"next":">14","webpack":">=5.70"},"peerDependenciesMeta":{"next":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-toggle-point-webpack_0.8.3_1760971498156_0.8550068303749998","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"name":"@asos/web-toggle-point-webpack","description":"toggle point webpack plugin","version":"0.9.0","license":"MIT","type":"module","main":"./lib/main.cjs","exports":{"./plugins":{"import":"./lib/main.js","require":"./lib/main.cjs"},"./pathSegmentToggleHandler":"./lib/pathSegmentToggleHandler.js"},"keywords":["toggle point","feature toggles","feature flags","webpack","module proxy"],"repository":{"type":"git","url":"git+https://github.com/asos/web-toggle-point.git","directory":"packages/webpack"},"bugs":{"url":"https://github.com/asos/web-toggle-point/issues"},"homepage":"https://github.com/asos/web-toggle-point/tree/main/packages/webpack","directories":{"doc":"docs"},"scripts":{"build":"npm run clean && rollup -c build/rollup.mjs","prepublishOnly":"node ../prepare-publish.mjs && npm run build","postpublish":"shx rm ./README.md LICENSE","clean":"rimraf ./lib","docs":"rimraf ./docs/**/*.html && jsdoc -c ../jsdoc.conf.js","lint":"eslint build src docs --flag unstable_config_lookup_from_file","lint:fix":"npm run lint -- --fix","test":"jest"},"dependencies":{"@babel/runtime":"^7.26.0","fast-glob":"^3.2.12"},"devDependencies":{"@rollup/plugin-babel":"^6.0.2","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.2.1","@types/webpack-env":"^1.18.0","eslint-plugin-jsdoc":"^50.5.0","jest":"^29.7.0","jsdoc":"^4.0.2","jsdoc-tsimport-plugin":"^1.0.5","memfs":"^4.15.0","rimraf":"^6.0.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-copy":"^3.5.0","schema-utils":"^4.2.0","webpack":"^5.88.2","webpack-cli":"^4.10.0","webpack-test-utils":"^2.1.0","shx":"^0.4.0","transform-markdown-links":"^2.1.0"},"peerDependencies":{"webpack":">=5.70"},"_id":"@asos/web-toggle-point-webpack@0.9.0","gitHead":"710d15fd2f025b3bb7d1ec3e1b108891cc88dfda","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-vixjocQoywvujAk2SOmZR4fkCU8bvwspAuDMmrGzzZKvP5KfY73nW9ophRqb9AD23UMwIqdlClw/ehVFSr5MwA==","shasum":"2f2e0105d0ab8472efc1fd49d10f19c44b2bf1b7","tarball":"https://registry.npmjs.org/@asos/web-toggle-point-webpack/-/web-toggle-point-webpack-0.9.0.tgz","fileCount":8,"unpackedSize":3708563,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCVFrBRaNMfZ0baO4Dz9Zzn+518K0RhwW0/rtpQYXwB9QIhAIEGHG42HK+Nn0zV32zbCKI9W01gR+TdY35RjpeFxpBO"}]},"_npmUser":{"name":"asos-danielc","email":"DanielC@ASOS.com"},"maintainers":[{"name":"asos-roberth","email":"robert.hill@asos.com"},{"name":"asos-tonygorman","email":"Tony.Gorman@asos.com"},{"name":"asos-danielc","email":"DanielC@ASOS.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/web-toggle-point-webpack_0.9.0_1761044800153_0.8287994127625051"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-06T14:25:52.925Z","modified":"2025-10-21T11:06:40.565Z","0.7.4":"2025-03-06T14:25:53.284Z","0.7.5":"2025-07-14T15:01:49.038Z","0.8.0":"2025-07-14T16:23:28.843Z","0.8.1":"2025-09-29T13:00:23.588Z","0.8.2":"2025-09-30T09:00:25.537Z","0.8.3":"2025-10-20T14:44:58.400Z","0.9.0":"2025-10-21T11:06:40.354Z"},"bugs":{"url":"https://github.com/asos/web-toggle-point/issues"},"license":"MIT","homepage":"https://github.com/asos/web-toggle-point/tree/main/packages/webpack","keywords":["toggle point","feature toggles","feature flags","webpack","module proxy"],"repository":{"type":"git","url":"git+https://github.com/asos/web-toggle-point.git","directory":"packages/webpack"},"description":"toggle point webpack plugin","maintainers":[{"name":"asos-roberth","email":"robert.hill@asos.com"},{"name":"asos-tonygorman","email":"Tony.Gorman@asos.com"},{"name":"asos-danielc","email":"DanielC@ASOS.com"}],"readme":"# @asos/web-toggle-point-webpack\n\nThis package provides a [webpack plugin](https://webpack.js.org/concepts/plugins/) that's designed to identify [join points](https://en.wikipedia.org/wiki/Join_point) during a build process based on a configurable filesystem convention, then re-direct requests to those modules to a proxy.  The proxy makes a decision at runtime, based on some context, to either enact the original module, or a variant.\n\nThe join points are configured as a [pointcut](https://en.wikipedia.org/wiki/Pointcut) which defines the convention to identify the join points within the input file system, and the toggle handler that should enact decisions at runtime, choosing the appropriate module to run.\n\nThe join points are configured using a [glob](https://en.wikipedia.org/wiki/Glob_(programming)) to specify the varied modules. These modules are ideally colocated next to the base/default module that will act as the join point.[^1]\n\n- This colocation empowers a guiding principle of the project, which aims to vary code without the cost of conditional logic being introduced, yet keeping the varied code obtrusive enough that it is not overlooked when change is needed in that area of the codebase.\n- The default setup implies a folder for storing varied code, so that peripheral modules used by the varied code are held out-of-sight of the base codebase, and enabling the bulk merge or removal of the variation as a whole.\n  - This is born of the origins of the project being for short-term experimental toggles.  However, other schemes are possible for longer-lived toggle types.\n- The default setup also implies consistent naming when varying code; in that a variation module should have the same name as the module it is varying.[^1]  Again, this is designed to lower friction when accepting a variation as the new base line.\n\n> [!WARNING]  \n> N.B. All varied modules must have a single `default` export.  Currently, named exports are not made available, and attempts to access will produce a build error. Could be enforced via [`eslint-plugin-import/no-named-export`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-export.md)\n\n[^1]:The aforementioned locality / naming concerns can be subverted by supplying a custom `joinPointResolver` to the point cut configuration, allowing the join point to be located far from the variant code, and with any name transformation, should this be needed.\n\n## Usage\n\n### Configuration\n\nSee [JSDoc output](https://asos.github.io/web-toggle-point/module-web-toggle-point-webpack.html)\n\nDifferent code paths may have different toggling needs, and may want a toggle point applied in differing ways. Independent point cuts should be configured for each different:\n\n- [toggle type](https://martinfowler.com/articles/feature-toggles.html#:~:text=feature%2Dtoggled%20system.-,Categories%20of%20toggles,-We%27ve%20seen%20the) or concern, e.g. experimentation vs configuration\n  - this specifies how the variation is chosen\n- toggling [advice](https://en.wikipedia.org/wiki/Advice_(programming)) required\n  - this specifies what effects occur when the choice is reified & enacted\n\nThe plugin constructor takes `TogglePointInjectionOptions` thus:\n\n```typescript\nimport webpack from 'webpack';\n\ninterface PointCut {\n  name: string;\n  togglePointModule: string;\n  variantGlobs?: string[];\n  joinPointResolver?: (variantPath: string) => string;\n  toggleHandler?: string;\n}\n\ninterface TogglePointInjectionOptions {\n  pointCuts: PointCut[];\n  webpackNormalModule?: typeof webpack.NormalModule;\n}\n```\n\n#### Point Cuts\n\n> [!IMPORTANT]\n> N.B. when setting up multiple pointcuts, the path matched by the [globs](https://en.wikipedia.org/wiki/Glob_(programming)) must be mutually exclusive.  Otherwise, the pointcut defined earlier in the array \"wins\", and a warning is emitted into the compilation indicating that the subsequent cuts are neutered for those matching files.\n>\n> Also, due to the way Webpack works, there should only be a single `TogglePointInjection` plugin per webpack configuration, so utilize the point cuts array, rather than having separate plugin instances per point cut.\n\n#### _`name`_\n\nEach toggling concern should be expressed in the configured `name` of the `PointCut`.  This name appears in logs and in dev tools for browser code, but otherwise can be anything.\n\n#### _`togglePointModule`_\n\nThe module definition should be resolvable by webpack, either as a path within the codebase, or a module accessible from `node_modules` using webpack module resolution.\n\nIt's paramount that this module is compatible with the modules it is varying.  e.g.\n\n- a toggle point that utilises browser APIs as part of making its choice or enacting side-effects should only target browser code.  \n- a toggle point that utilises [React](https://react.dev/) can only toggle react code, since use of such APIs outside of the react runtime would produce a runtime error.\n\nAlso, the interface of the toggle point, and the variations that it may supplant, needs to be interchangeable with the base/default module. [Liskov Substitution Principle](https://en.wikipedia.org/wiki/Liskov_substitution_principle) must apply; functionality may differ, but it must still be compatible with all the consumers of the base module.\n\n#### _`variantGlobs`_\n\nAn array of [globs](https://en.wikipedia.org/wiki/Glob_(programming)) which point at varied code modules.  The default/base modules are extrapolated from these source locations.[^2]\n\nThese can be as specific or generic as needed, but ideally the most specific possible for the use-cases in effect.\n\nThe common case is a single glob, but an array is provided to mitigate the need for complex [\"brace expansion\"](https://github.com/micromatch/braces) or [extended globs](https://github.com/micromatch/micromatch#extglobs), which could be complex when targeting variations which are located in disparate parts of a codebase.\n\nIt should match modules that are compatible with the `togglePointModule` - e.g. if all React code is held within a `/components` folder, it makes sense to include this in the glob path to avoid inadvertently toggling non-react code (should a variant be set up for non-React code without considering the configuration).\n\nThis glob holds the key for the naming convention approach that underpins the toggle point project, since it is the definition of the join point triggers.\n\nIf not supplied, a default `glob` of `/**/__variants__/*/*/!(*.test).{js,jsx,ts,tsx}` is used.\n\n- this finds variant modules two folders deeper than a `__variants__`[^3] \"trigger\" folder.\n  - the outermost folder is assumed to be a \"feature\" and the innermost a \"variant\" of that feature.\n- `.test.*` files are ignored (these are assumed to be colocated unit tests)\n- javascript / typescript filename extensions are assumed\n  - the plugin can vary other types of file, but requires appropriate webpack loaders etc.\n\n> [!NOTE]\n> N.B. The matched files must be resolvable by webpack.\n\n[^2]: This is done for efficiency, since the assumption is that a small proportion of modules are variations, so the plugin just seeks these out at the start of the compilation, then identifies suitable candidates for base/default module based on them.\n\n[^3]: The double underscore aligns with a convention from jest (that used `__mocks__`) and supports natively opting-out of the filesystem conventions used by popular filesystem routing frameworks [Next.js](https://nextjs.org/) and [Remix](https://remix.run/) (rollup/vite version of this plugin to be made available in [Issue #7](https://github.com/ASOS/web-toggle-point/issues/7))\n\n#### _`toggleHandler`_\n\nThis module unpicks the [WebPack context module](https://webpack.js.org/guides/dependency-management/#context-module-api) produced by enacting the configured `variantGlobs` and converts it into a form suitable for the configured `togglePoint`.\n\nIf not supplied, a default handler (`@asos/web-toggle-point-webpack/pathSegmentToggleHandler`) is used, compatible with the default `variantGlobs`, that converts the matched paths into a tree data structure held in a `Map`, with each path segment as a node in the tree, and the variant modules as the leaf nodes.\n\n#### _`joinPointResolver`_\n\nThis marries with the `variantGlobs`, in that it \"undoes\" the variation in file path made to the base/default module.\n\nFor every variant path found, the plugin executes this method to locate the related base/default path.\n\nIf not supplied, a default resolver is used (compatible with the default `variantGlob`), which looks three folders above for a same-named base/default module:\n\n```js\nimport { resolve, basename } from \"path\";\n\nexport default (variantPath) => resolve(variantPath, \"..\", \"..\", \"..\", \"..\", basename(variantPath));\n```\n\ne.g. a variant at `./__variants__/feature-name/variant-name/module.js` will resolve to a base at `./module.js`.\n\n> [!TIP]\n> An \"escape hatch\" exists to prevent untoward convention-based variation, via creation of `__toggleConfig.json` files, sitting in the same folder as potential join points / base modules.  This can contain a `joinPoints` array, listing the filenames in the directory that should be considered eligible.  Any empty array disables all toggling for that folder. e.g.\n> ```json\n>{\n>   \"joinPoints\": [\"validJoinPoint.js\", \"anotherValidJoinPoint.js\"] \n>}\n>```\n\n#### Other configuration\n\n#### _`webpackNormalModule`_\n\nIf using [`Next.js`](https://nextjs.org/), an additional configuration parameter is needed, to inject the Webpack `NormalModule`, since the plugin is reliant on its hooks, and Next.js pre-compiles and packages Webpack, rather than referencing it as a normal package dependency.  This can be specified thus (ESM):\n\n```js\nimport webpackNormalModule from \"next/dist/compiled/webpack/NormalModule.js\";\nconst plugin = new TogglePointInjection({\n  pointCuts,\n  webpackNormalModule\n});\n```\n\n### How it Works\n\nGiven the following file structure in the repo:\n\n```bash\n├── src\n│   ├── modules\n│   │   ├── withTogglePoint.js\n│   │   ├── myModule.js\n│   │   └── __variants__\n│   │       ├── feature1\n│   │       │   └── variant1\n│   │       │       ├── myModule.js\n│   │       │       └── mySupportModule.js\n│   │       └── feature2\n│   │           ├── variant1\n│   │           │   └── myModule.js\n│   │           └── variant2\n│   │               └── myModule.js\n```\n\n...and the following configuration to the plugin:\n\n```javascript\nconst plugin = new TogglePointInjection({\n  pointCuts: [{\n    name: \"my point cut\",\n    togglePointModule: \"/src/modules/withTogglePoint\",\n    variantGlobs: [\"./src/modules/**/__variants__/*/*/*.js\"]\n  }]\n});\n```\n\n...the plugin inject a proxy module with the id `toggle:/join-points:/src/modules/myModule.js` into the compilation, to which all requests for `/src/modules/myModule.js` will be redirected.[^4]\n\nThat proxy module will, in turn, import a module with id `toggle:/point-cuts:/my point cut`, and pass it the original module for `/src/modules/myModule.js` as a `pointCut` argument, plus all the possible variation modules (`./feature1/variant1/myModule.js`, `./feature2/variant1/myModule.js`, `./feature2/variant2/myModule.js`) in a [WebPack context module](https://webpack.js.org/guides/dependency-management/#context-module-api).\n\nThe `toggle:/point-cuts:/my point cut` then imports the configured toggle point (and toggle handler, if configured), then calls the handler with the toggle point, join point module, and variants. The handler is expected to unpick the webpack-specific context module, and mutate it into something consumable by the toggle point.\n\nThis toggle point is then expected to return the outcome, having chosen the appropriate module at runtime.\n\n```javascript\nconst togglePoint = (joinPoint, featuresMap) => {\n  if (feature2Variant1ShouldApply()) { // some bespoke logic held in the toggle point for this type of toggle\n    return featuresMap.get(\"feature2\").get(\"variant1\").default;\n  };\n  return joinPoint.default;\n}\n```\n\n[^4]: An exception to this would be modules that are themselves referenced, in some chain of requests, from the `toggle:/join-points:/src/modules/myModule.js` module.  This exception avoids circular references, and allows variation code to import and augment the base, supporting implementation of the [open-closed principle](https://en.wikipedia.org/wiki/Open%E2%80%93closed_principle).\n\n#### Sequence Diagram\n\n```mermaid\nsequenceDiagram\n  participant issuer as Issuer Module\n  participant joinPoint as toggle:/join-point:/src/modulePath\n  participant pointCut as toggle:/point-cut:/experiments\n  participant handler as Toggle Handler\n  participant togglePoint as Toggle Point\n  participant default as /src/modulePath\n  participant variant1 as /src/variant1/modulePath\n  participant variant2 as /src/variant2/modulePath\n\n  issuer ->> joinPoint: import\n  joinPoint ->> default: import\n  default -->> joinPoint: joinPoint\n  joinPoint ->> pointCut: import\n  pointCut ->> handler: import\n  pointCut ->> togglePoint: import\n  par\n    joinPoint ->> variant1: require.context\n    variant1 -->> joinPoint: variant1\n  and\n    joinPoint ->> variant2: require.context\n    variant2 -->> joinPoint: variant2\n  end\n  issuer ->> joinPoint: default(args)\n  joinPoint ->> pointCut: default({ joinPoint, variants: <require.context>[variant1, variant2] })\n  pointCut ->> handler: default({ togglePoint, joinPoint, variants })\n  handler ->> handler: construct Map from variants\n  handler ->> togglePoint: default(joinPoint, featuresMap)\n  alt base/default is relevant, via toggle point logic\n    togglePoint ->> default: default(args)\n    default -->> togglePoint: result\n    togglePoint -->> issuer: result\n  else variant1 is relevant, via toggle point logic\n    togglePoint ->> variant1: default(args)\n    variant1 -->> togglePoint: result\n    togglePoint -->> issuer: result\n  else variant2 is relevant, via toggle point logic\n    togglePoint ->> variant2: default(args)\n    variant2 -->> togglePoint: result\n    togglePoint -->> issuer: result\n  end\n```\n\n<script src=\"./mermaidJsdoc.js\"></script>\n","readmeFilename":"README.md"}