4809421990 
								
							 
						 
						
							
							
								
								refactor(types): more  
							
							
							
						 
						
							2023-06-21 19:00:24 +03:00  
				
					
						
							
							
								 
						
							
								148c136e07 
								
							 
						 
						
							
							
								
								fix: test  
							
							
							
						 
						
							2023-06-16 23:04:57 +08:00  
				
					
						
							
							
								 
						
							
								c90f2b35f6 
								
							 
						 
						
							
							
								
								fix: forgot .d  
							
							
							
						 
						
							2023-06-16 22:52:27 +08:00  
				
					
						
							
							
								 
						
							
								6e62cf40cf 
								
							 
						 
						
							
							
								
								fix: tla for await won't run  
							
							
							
						 
						
							2023-06-16 20:39:13 +08:00  
				
					
						
							
							
								 
						
							
								5efc30a0b0 
								
							 
						 
						
							
							
								
								refactor: rebase  
							
							
							
						 
						
							2023-06-14 19:47:52 +03:00  
				
					
						
							
							
								 
						
							
								9894226149 
								
							 
						 
						
							
							
								
								refactor(types): more  
							
							
							
						 
						
							2023-06-14 19:46:53 +03:00  
				
					
						
							
							
								 
						
							
								869e59d198 
								
							 
						 
						
							
							
								
								refactor: code  
							
							
							
						 
						
							2023-06-13 00:32:42 +03:00  
				
					
						
							
							
								 
						
							
								0391116e8c 
								
							 
						 
						
							
							
								
								refactor: use runtime logic but only when needed  
							
							
							
						 
						
							2023-06-13 00:17:53 +03:00  
				
					
						
							
							
								 
						
							
								236a2ae56e 
								
							 
						 
						
							
							
								
								fix: reduce size more  
							
							
							
						 
						
							2023-06-12 21:55:53 +03:00  
				
					
						
							
							
								 
						
							
								4649dc0025 
								
							 
						 
						
							
							
								
								fix: reduce runtime size  
							
							
							
						 
						
							2023-06-12 21:55:53 +03:00  
				
					
						
							
							
								 
						
							
								fcbbacf730 
								
							 
						 
						
							
							
								
								refactor: logic  
							
							
							
						 
						
							2023-06-12 21:55:52 +03:00  
				
					
						
							
							
								 
						
							
								f68ab55320 
								
							 
						 
						
							
							
								
								Adding option to set fetchPriority on script tags  
							
							
							
						 
						
							2023-06-12 21:55:52 +03:00  
				
					
						
							
							
								 
						
							
								839e2bf6ad 
								
							 
						 
						
							
							
								
								refactor: use global runtime constants for webpack exports  
							
							
							
						 
						
							2023-05-26 21:04:26 +05:30  
				
					
						
							
							
								 
						
							
								620c8d5fa4 
								
							 
						 
						
							
							
								
								refactor: more types  
							
							
							
						 
						
							2023-05-24 22:37:58 +03:00  
				
					
						
							
							
								 
						
							
								8d8a0e0e56 
								
							 
						 
						
							
							
								
								refactor: use global constant instead of string literal  
							
							
							
						 
						
							2023-05-19 21:25:47 +05:30  
				
					
						
							
							
								 
						
							
								ddb9627661 
								
							 
						 
						
							
							
								
								Merge pull request  #16990  from Zlatkovsky/zlatkovsky/trusted-types-options  
							
							... 
							
							
							
							Allow specifying "onPolicyCreationFailure" mode for trusted types 
							
						 
						
							2023-05-03 09:39:48 -07:00  
				
					
						
							
							
								 
						
							
								2203e24900 
								
							 
						 
						
							
							
								
								Add option to continue on trusted-types policy-creation failure  
							
							... 
							
							
							
							Webpack already allows for specifying a trusted-types policy name. However, its current implementation is such that if a call to trustedTypes.createPolicy fails, the code will immediately stop executing. This isn't necessarily desirable, as an application could be in the early phases of rolling out trusted types, and thus have the CSP rule for trusted-types LibraryA LibraryB etc, BUT have require-trusted-types-for 'script' be in "report only" mode (Content-Security-Policy-Report-Only). In such a configuration, and when the webpacked code is dynamically-loaded into an application, adding the policy name to the webpack config will break old versions.
This PR keeps the original behavior, but introduces a new option for onPolicyCreationFailure: "continue" | "stop" (with "stop" remaining the default). If a developer chooses the "continue" option, the policy-creation will be wrapped in a try/catch. There is no security risk to this, since for host applications that DO have strict enforcement of trusted-types, the code will simply fail when the dangerous sink is used (e.g., when doing parseFromString). And likewise, wrapping in try/catch and doing nothing on catch is OK, because the code already deals with the possibility of the trustedTypes API not being available on the browser. 
							
						 
						
							2023-05-02 10:12:56 -07:00  
				
					
						
							
							
								 
						
							
								ede77bcb20 
								
							 
						 
						
							
							
								
								refactor(type): small improve  
							
							
							
						 
						
							2023-05-01 00:58:34 +03:00  
				
					
						
							
							
								 
						
							
								308ee42f74 
								
							 
						 
						
							
							
								
								fix: detection automatic public path  
							
							
							
						 
						
							2023-04-23 17:36:59 +03:00  
				
					
						
							
							
								 
						
							
								44256c25cf 
								
							 
						 
						
							
							
								
								fix: add missing semicolon in `AutoPublicPathRuntimeModule`  
							
							
							
						 
						
							2023-03-14 18:44:23 +05:30  
				
					
						
							
							
								 
						
							
								04c2737a29 
								
							 
						 
						
							
							
								
								chore: Remove redundant semicolons after onScriptComplete function close: #16346add route match  
							
							
							
						 
						
							2022-11-18 16:32:49 +08:00  
				
					
						
							
							
								 
						
							
								761a54285e 
								
							 
						 
						
							
							
								
								fix semicolon position  
							
							
							
						 
						
							2022-11-09 13:00:33 +01:00  
				
					
						
							
							
								 
						
							
								402d152ccf 
								
							 
						 
						
							
							
								
								Merge pull request  #15642  from webpack/set-use-credentials-without-origin-check  
							
							... 
							
							
							
							set crossOrigin=use-credentials without origin check 
							
						 
						
							2022-07-25 09:25:12 +02:00  
				
					
						
							
							
								 
						
							
								780abb3f95 
								
							 
						 
						
							
							
								
								remove unnecessary moduleId property on Promise  
							
							
							
						 
						
							2022-06-30 12:35:17 +02:00  
				
					
						
							
							
								 
						
							
								509a060025 
								
							 
						 
						
							
							
								
								fix quadratic evaluation performance of async modules  
							
							... 
							
							
							
							improve runtime code for async modules 
							
						 
						
							2022-06-02 12:37:36 +02:00  
				
					
						
							
							
								 
						
							
								ce56e3b61c 
								
							 
						 
						
							
							
								
								add NonceRuntimeModule  
							
							
							
						 
						
							2022-05-09 21:45:42 +03:00  
				
					
						
							
							
								 
						
							
								8729f2e787 
								
							 
						 
						
							
							
								
								set crossOrigin=use-credentials without origin check  
							
							
							
						 
						
							2022-04-08 15:53:28 +03:00  
				
					
						
							
							
								 
						
							
								26f3a1d21c 
								
							 
						 
						
							
							
								
								add base uri runtime module if chunkLoading=false  
							
							
							
						 
						
							2022-03-07 12:28:03 +03:00  
				
					
						
							
							
								 
						
							
								804f49c32c 
								
							 
						 
						
							
							
								
								fix handling of errors thrown in async modules  
							
							
							
						 
						
							2022-01-27 16:28:28 +01:00  
				
					
						
							
							
								 
						
							
								1ed8aaf2e2 
								
							 
						 
						
							
							
								
								Merge pull request  #14173  from tosmolka/tosmolka/14075  
							
							... 
							
							
							
							Support Trusted Types in EvalSourceMapDevToolPlugin 
							
						 
						
							2022-01-20 17:36:55 +01:00  
				
					
						
							
							
								 
						
							
								ab34ffb2ae 
								
							 
						 
						
							
							
								
								Revert to use ['catch'] directly  
							
							
							
						 
						
							2021-11-02 12:52:00 +08:00  
				
					
						
							
							
								 
						
							
								4c50786098 
								
							 
						 
						
							
							
								
								use propertyAccess to generate .catch code  
							
							
							
						 
						
							2021-11-02 12:51:59 +08:00  
				
					
						
							
							
								 
						
							
								3f9643cb05 
								
							 
						 
						
							
							
								
								Merge branch 'main' of  https://github.com/webpack/webpack  into tosmolka/14075  
							
							
							
						 
						
							2021-09-10 13:52:36 +02:00  
				
					
						
							
							
								 
						
							
								9dfcc27f6b 
								
							 
						 
						
							
							
								
								remove unnecessary Object.assign  
							
							
							
						 
						
							2021-09-09 00:28:44 +02:00  
				
					
						
							
							
								 
						
							
								1339272be6 
								
							 
						 
						
							
							
								
								Support Trusted Types in EvalSourceMapDevToolPlugin  
							
							
							
						 
						
							2021-09-08 12:34:00 +02:00  
				
					
						
							
							
								 
						
							
								b16568a253 
								
							 
						 
						
							
							
								
								upgrade filename runtime module to full hash module when referencing a full hash chunk  
							
							
							
						 
						
							2021-09-02 10:29:59 +02:00  
				
					
						
							
							
								 
						
							
								c469adc265 
								
							 
						 
						
							
							
								
								fix handling of onChunksLoaded with prefetching  
							
							
							
						 
						
							2021-07-16 18:11:29 +02:00  
				
					
						
							
							
								 
						
							
								68b020ee42 
								
							 
						 
						
							
							
								
								use es5 for async module runtime  
							
							
							
						 
						
							2021-06-29 16:17:18 +08:00  
				
					
						
							
							
								 
						
							
								b0fa9ccada 
								
							 
						 
						
							
							
								
								pretty files  
							
							
							
						 
						
							2021-05-11 09:31:46 +02:00  
				
					
						
							
							
								 
						
							
								88da3f8ed2 
								
							 
						 
						
							
							
								
								normalize output.trustedTypes to an object  
							
							
							
						 
						
							2021-05-10 10:34:21 +02:00  
				
					
						
							
							
								 
						
							
								a86974b7aa 
								
							 
						 
						
							
							
								
								rename to CreateScriptUrlRuntimeModule to have same name as RuntimeGlobal  
							
							
							
						 
						
							2021-05-10 10:09:18 +02:00  
				
					
						
							
							
								 
						
							
								1879f243dd 
								
							 
						 
						
							
							
								
								generate shorter code  
							
							
							
						 
						
							2021-05-10 09:58:27 +02:00  
				
					
						
							
							
								 
						
							
								869f9c8a8c 
								
							 
						 
						
							
							
								
								use createScriptUrl only when needed  
							
							
							
						 
						
							2021-05-10 09:58:27 +02:00  
				
					
						
							
							
								 
						
							
								4b1592d07a 
								
							 
						 
						
							
							
								
								rename createScriptURL to createScriptUrl  
							
							
							
						 
						
							2021-05-10 09:09:34 +02:00  
				
					
						
							
							
								 
						
							
								bb8ba1cd05 
								
							 
						 
						
							
							
								
								disable trustedTypes by default  
							
							... 
							
							
							
							allow to pass a boolean as trustedTypesPolicy 
							
						 
						
							2021-05-10 09:02:46 +02:00  
				
					
						
							
							
								 
						
							
								3561285ea8 
								
							 
						 
						
							
							
								
								Skip using Trusted Types checks if trustedTypesPolicyName is empty.  
							
							
							
						 
						
							2021-05-07 10:30:57 +02:00  
				
					
						
							
							
								 
						
							
								b6e112dabe 
								
							 
						 
						
							
							
								
								Only expose createScriptURL function from Trusted Types policy  
							
							... 
							
							
							
							Since createScriptURL is the only function that is used on webpack's
Trusted Types policy, replace the getTrustedTypesPolicy global with a
simpler createScriptURL global.
In terms of compiled code, this replaces the non-minifiable
tt().createScriptURL(url) with tu(url), which is more compact in terms
of code size. 
							
						 
						
							2021-05-04 16:26:22 +02:00  
				
					
						
							
							
								 
						
							
								c71184958d 
								
							 
						 
						
							
							
								
								Move Trusted Types policy into TrustedTypesRuntimeModule  
							
							... 
							
							
							
							Also make the policy available at runtime through
RuntimeGlobals.getTrustedTypesPolicy(), and update runtime dependencies
accordingly. 
							
						 
						
							2021-05-04 16:12:41 +02:00  
				
					
						
							
							
								 
						
							
								dbd095b44a 
								
							 
						 
						
							
							
								
								Added the Trusted Types logic.  
							
							
							
						 
						
							2021-05-04 16:12:34 +02:00  
				
					
						
							
							
								 
						
							
								2df8267220 
								
							 
						 
						
							
							
								
								handle falsy entry options correctly  
							
							
							
						 
						
							2021-04-14 20:21:17 +02:00