Skip to content

Commit 9b73dd9

Browse files
committed
revert package changes
1 parent 75f8e84 commit 9b73dd9

File tree

9 files changed

+11
-21
lines changed

9 files changed

+11
-21
lines changed

packages/angular-server/src/ionic-server-module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { DOCUMENT } from '@angular/common';
22
import { APP_ID, NgModule } from '@angular/core';
33
import { BEFORE_APP_SERIALIZED } from '@angular/platform-server';
4-
import { printIonError } from '@ionic/core';
54
import { hydrateDocument } from '@ionic/core/hydrate';
65

76
// @dynamic
@@ -51,7 +50,7 @@ export function hydrateIonicComponents(doc: any, appId: any) {
5150
}).then((hydrateResults) => {
5251
hydrateResults.diagnostics.forEach((d) => {
5352
if (d.type === 'error') {
54-
printIonError(d.messageText);
53+
console.error(d.messageText);
5554
} else if (d.type === 'debug') {
5655
console.debug(d.messageText);
5756
} else {

packages/angular/common/src/directives/navigation/nav-params.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { printIonWarning } from '@ionic/core';
2-
31
/**
42
* @description
53
* NavParams are an object that exists on a page and can contain data for that particular view.
@@ -22,8 +20,8 @@ import { printIonWarning } from '@ionic/core';
2220
*/
2321
export class NavParams {
2422
constructor(public data: { [key: string]: any } = {}) {
25-
printIonWarning(
26-
`NavParams has been deprecated in favor of using Angular's input API. Developers should migrate to either the @Input decorator or the Signals-based input API.`
23+
console.warn(
24+
`[Ionic Warning]: NavParams has been deprecated in favor of using Angular's input API. Developers should migrate to either the @Input decorator or the Signals-based input API.`
2725
);
2826
}
2927

packages/angular/common/src/directives/navigation/tabs.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
AfterViewInit,
1111
QueryList,
1212
} from '@angular/core';
13-
import { printIonError } from '@ionic/core';
1413

1514
import { NavController } from '../../providers/nav-controller';
1615

@@ -185,7 +184,7 @@ export abstract class IonTabs implements AfterViewInit, AfterContentInit, AfterC
185184
const selectedTab = tabs.find((t: any) => t.tab === tab);
186185

187186
if (!selectedTab) {
188-
printIonError(`Tab with id: "${tab}" does not exist`);
187+
console.error(`[Ionic Error]: Tab with id: "${tab}" does not exist`);
189188
return;
190189
}
191190

packages/angular/common/src/providers/angular-delegate.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
InjectionToken,
1010
ComponentRef,
1111
} from '@angular/core';
12-
import { printIonError } from '@ionic/core';
1312
import {
1413
FrameworkDelegate,
1514
LIFECYCLE_DID_ENTER,
@@ -165,8 +164,8 @@ export const attachView = (
165164
* which will cause collisions.
166165
*/
167166
if (elementReferenceKey && instance[elementReferenceKey] !== undefined) {
168-
printIonError(
169-
`${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the "${elementReferenceKey}" property from ${
167+
console.error(
168+
`[Ionic Error]: ${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the "${elementReferenceKey}" property from ${
170169
component.name
171170
}.`
172171
);

packages/react/src/components/IonIcon.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { printIonWarning } from '@ionic/core';
21
import React from 'react';
32

43
import { NavContext } from '../contexts/NavContext';
@@ -28,7 +27,7 @@ class IonIconContainer extends React.PureComponent<InternalProps> {
2827
constructor(props: InternalProps) {
2928
super(props);
3029
if (this.props.name) {
31-
printIonWarning(
30+
console.warn(
3231
'In Ionic React, you import icons from "ionicons/icons" and set the icon you imported to the "icon" property. Setting the "name" property has no effect.'
3332
);
3433
}

packages/react/src/components/IonRedirect.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { printIonError } from '@ionic/core';
21
import React from 'react';
32

43
import { NavContext } from '../contexts/NavContext';
@@ -20,7 +19,7 @@ export class IonRedirect extends React.PureComponent<IonRedirectProps, IonRedire
2019
const IonRedirectInner = this.context.getIonRedirect();
2120

2221
if (!this.context.hasIonicRouter() || !IonRedirect) {
23-
printIonError(
22+
console.error(
2423
'You either do not have an Ionic Router package, or your router does not support using <IonRedirect>'
2524
);
2625
return null;

packages/react/src/components/IonRoute.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { printIonError } from '@ionic/core';
21
import React from 'react';
32

43
import { NavContext } from '../contexts/NavContext';
@@ -21,7 +20,7 @@ export class IonRoute extends React.PureComponent<IonRouteProps, IonRouteState>
2120
const IonRouteInner = this.context.getIonRoute();
2221

2322
if (!this.context.hasIonicRouter() || !IonRoute) {
24-
printIonError('You either do not have an Ionic Router package, or your router does not support using <IonRoute>');
23+
console.error('You either do not have an Ionic Router package, or your router does not support using <IonRoute>');
2524
return null;
2625
}
2726

packages/vue/src/components/IonRouterOutlet.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { printIonWarning } from "@ionic/core";
21
import type { AnimationBuilder } from "@ionic/core/components";
32
import {
43
LIFECYCLE_DID_ENTER,
@@ -292,7 +291,7 @@ export const IonRouterOutlet = /*@__PURE__*/ defineComponent({
292291
* methods to work properly.
293292
*/
294293
if (enteringEl === undefined) {
295-
printIonWarning(`The view you are trying to render for path ${routeInfo.pathname} does not have the required <ion-page> component. Transitions and lifecycle methods may not work as expected.
294+
console.warn(`[@ionic/vue Warning]: The view you are trying to render for path ${routeInfo.pathname} does not have the required <ion-page> component. Transitions and lifecycle methods may not work as expected.
296295
297296
See https://ionicframework.com/docs/vue/navigation#ionpage for more information.`);
298297
}

packages/vue/src/hooks/lifecycle.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { printIonWarning } from "@ionic/core";
21
import type { ComponentInternalInstance } from "vue";
32
import { getCurrentInstance } from "vue";
43

@@ -36,7 +35,7 @@ const injectHook = (
3635

3736
return wrappedHook;
3837
} else {
39-
printIonWarning(
38+
console.warn(
4039
"[@ionic/vue]: Ionic Lifecycle Hooks can only be used during execution of setup()."
4140
);
4241
}

0 commit comments

Comments
 (0)