mirror of https://github.com/alibaba/ice.git
				
				
				
			fix: add isPHA and isKraken env for backward compatibility
This commit is contained in:
		
							parent
							
								
									0141336861
								
							
						
					
					
						commit
						ea6b08f1f1
					
				|  | @ -1,5 +1,9 @@ | |||
| # Changelog | ||||
| 
 | ||||
| ## 3.6.5 | ||||
| 
 | ||||
| - hotfix: add isPHA and isKraken env for backward compatibility. | ||||
| 
 | ||||
| ## 3.6.4 | ||||
| 
 | ||||
| ### Patch Changes | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| { | ||||
|   "name": "@ice/app", | ||||
|   "version": "3.6.4", | ||||
|   "version": "3.6.5", | ||||
|   "description": "provide scripts and configuration used by web framework ice", | ||||
|   "type": "module", | ||||
|   "main": "./esm/index.js", | ||||
|  |  | |||
|  | @ -11,9 +11,11 @@ export const isKuaiShouMiniProgram = isClient && import.meta.target === 'kuaisho | |||
| export const isWeChatMiniProgram = isClient && import.meta.target === 'wechat-miniprogram'; | ||||
| export const isQuickApp = false; // Now ice.js will not implement quick app target. | ||||
| export const isMiniApp = isAliMiniApp; // in universal-env, isMiniApp is equals to isAliMiniApp | ||||
| export const isKraken = isClient && import.meta.target === 'kraken'; | ||||
| 
 | ||||
| // Following variables are runtime executed envs. | ||||
| // See also @uni/env. | ||||
| export const isPHA = isWeb && typeof pha === 'object'; | ||||
| const ua = typeof navigator === 'object' ? navigator.userAgent || navigator.swuserAgent : ''; | ||||
| export const isThemis = /Themis/.test(ua); | ||||
| export const isWindVane = /WindVane/i.test(ua) && isWeb && typeof WindVane !== 'undefined' && typeof WindVane.call !== 'undefined'; | ||||
|  | @ -25,6 +27,8 @@ export default { | |||
|   isWeb, | ||||
|   isNode, | ||||
|   isWeex, | ||||
|   isKraken, | ||||
|   isPHA, | ||||
|   isThemis, | ||||
|   isMiniApp, | ||||
|   isByteDanceMicroApp, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue