Compare commits

..

2 Commits

Author SHA1 Message Date
ZeroLing cf3bb16c44
Merge f5005afad5 into ace5e1dd15 2025-07-24 16:30:06 +08:00
ClarkXia ace5e1dd15
Merge pull request #7127 from alibaba/hotfix/env
CI / build (16.x, ubuntu-latest) (push) Has been cancelled Details
CI / build (16.x, windows-latest) (push) Has been cancelled Details
CI / build (18.x, ubuntu-latest) (push) Has been cancelled Details
CI / build (18.x, windows-latest) (push) Has been cancelled Details
Coverage / coverage (16.x) (push) Has been cancelled Details
Release / Release (16) (push) Has been cancelled Details
hotfix: add isPHA and isKraken env for backward compatibility
2025-07-24 15:27:08 +08:00
3 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## 3.6.5
- hotfix: add isPHA and isKraken env for backward compatibility.
## 3.6.4
### Patch Changes

View File

@ -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",

View File

@ -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,