🗑 add warning for deprecated apis (#1836)
* 🗑 add warning for deprecated apis
* 💚 remove 12.x version in ci for compatible
This commit is contained in:
parent
80f7c786bb
commit
4691c652ec
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x]
|
||||
node-version: [14.x, 16.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ function emitGlobal(state: Record<string, any>, prevState: Record<string, any>)
|
|||
}
|
||||
|
||||
export function initGlobalState(state: Record<string, any> = {}) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.warn(`[qiankun] globalState tools will be removed in 3.0, pls don't use it!`);
|
||||
}
|
||||
|
||||
if (state === globalState) {
|
||||
console.warn('[qiankun] state has not changed!');
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -156,8 +156,8 @@ function getRender(appName: string, appContent: string, legacyRender?: HTMLConte
|
|||
const render: ElementRender = ({ element, loading, container }, phase) => {
|
||||
if (legacyRender) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.warn(
|
||||
'[qiankun] Custom rendering function is deprecated, you can use the container element setting instead!',
|
||||
console.error(
|
||||
'[qiankun] Custom rendering function is deprecated and will be removed in 3.0, you can use the container element setting instead!',
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -275,6 +275,13 @@ export async function loadApp<T extends ObjectType>(
|
|||
const appContent = getDefaultTplWrapper(appInstanceId, appName)(template);
|
||||
|
||||
const strictStyleIsolation = typeof sandbox === 'object' && !!sandbox.strictStyleIsolation;
|
||||
|
||||
if (process.env.NODE_ENV === 'development' && strictStyleIsolation) {
|
||||
console.warn(
|
||||
"[qiankun] strictStyleIsolation configuration will be removed in 3.0, pls don't depend on it or use experimentalStyleIsolation instead!",
|
||||
);
|
||||
}
|
||||
|
||||
const scopedCSS = isEnableScopedCSS(sandbox);
|
||||
let initialAppWrapperElement: HTMLElement | null = createElement(
|
||||
appContent,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user