From efd3e0fd2bafd7e77ca192b5a9f54c460cbd8f79 Mon Sep 17 00:00:00 2001 From: Sean Perkins <13732623+sean-perkins@users.noreply.github.com> Date: Mon, 20 Jan 2025 15:15:02 -0600 Subject: [PATCH 01/12] feat(config): add logLevel option to suppress ionic warnings and errors (#30015) resolves #29814 --------- - Developers can assign a value to `logLevel` in the Ionic config to control the log level that Ionic Framework will produce logs for. - `OFF` will completely disable all warnings and errors from Ionic - `WARN` will log warnings and errors - `ERROR` will log only errors - Default behavior is that developers receive both Ionic warnings and errors - Configuration only applies to usages of `printIonWarning` and `printIonError` --------- Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com> --- core/src/utils/config.ts | 10 ++ core/src/utils/logging/index.ts | 22 +++- core/src/utils/logging/test/logging.spec.ts | 114 ++++++++++++++++++++ 3 files changed, 142 insertions(+), 4 deletions(-) create mode 100644 core/src/utils/logging/test/logging.spec.ts diff --git a/core/src/utils/config.ts b/core/src/utils/config.ts index e38d43beb4..6b66417f7f 100644 --- a/core/src/utils/config.ts +++ b/core/src/utils/config.ts @@ -2,6 +2,7 @@ import type { SpinnerTypes } from '../components/spinner/spinner-configs'; import type { TabButtonLayout } from '../components/tab-bar/tab-bar-interface'; import type { AnimationBuilder, Mode } from '../interface'; +import type { LogLevel } from './logging'; import type { PlatformConfig } from './platform'; export interface IonicConfig { @@ -220,6 +221,15 @@ export interface IonicConfig { */ experimentalCloseWatcher?: boolean; + /** + * Configures the logging level for Ionic Framework: + * + * - `'OFF'`: No errors or warnings are logged. + * - `'ERROR'`: Logs only errors. + * - `'WARN'`: Logs errors and warnings. + */ + logLevel?: LogLevel; + // PRIVATE configs keyboardHeight?: number; inputShims?: boolean; diff --git a/core/src/utils/logging/index.ts b/core/src/utils/logging/index.ts index ee4234cb6a..4bf58ce629 100644 --- a/core/src/utils/logging/index.ts +++ b/core/src/utils/logging/index.ts @@ -1,3 +1,11 @@ +import { config } from '@global/config'; + +export const enum LogLevel { + OFF = 'OFF', + ERROR = 'ERROR', + WARN = 'WARN', +} + /** * Logs a warning to the console with an Ionic prefix * to indicate the library that is warning the developer. @@ -5,18 +13,24 @@ * @param message - The string message to be logged to the console. */ export const printIonWarning = (message: string, ...params: any[]) => { - return console.warn(`[Ionic Warning]: ${message}`, ...params); + const logLevel = config.get('logLevel', LogLevel.WARN); + if ([LogLevel.WARN].includes(logLevel)) { + return console.warn(`[Ionic Warning]: ${message}`, ...params); + } }; -/* +/** * Logs an error to the console with an Ionic prefix * to indicate the library that is warning the developer. * * @param message - The string message to be logged to the console. * @param params - Additional arguments to supply to the console.error. */ -export const printIonError = (message: string, ...params: any) => { - return console.error(`[Ionic Error]: ${message}`, ...params); +export const printIonError = (message: string, ...params: any[]) => { + const logLevel = config.get('logLevel', LogLevel.ERROR); + if ([LogLevel.ERROR, LogLevel.WARN].includes(logLevel)) { + return console.error(`[Ionic Error]: ${message}`, ...params); + } }; /** diff --git a/core/src/utils/logging/test/logging.spec.ts b/core/src/utils/logging/test/logging.spec.ts new file mode 100644 index 0000000000..e0f1bdcb92 --- /dev/null +++ b/core/src/utils/logging/test/logging.spec.ts @@ -0,0 +1,114 @@ +import { config } from '@global/config'; +import { LogLevel } from '../index'; + +import { printIonError, printIonWarning } from '../index'; + +describe('Logging', () => { + describe('#printIonWarning', () => { + let consoleWarnSpy: jest.SpyInstance; + + beforeEach(() => { + consoleWarnSpy = jest.spyOn(console, 'warn'); + // Suppress console.warn output from polluting the test output + consoleWarnSpy.mockImplementation(() => {}); + }); + + afterEach(() => { + consoleWarnSpy.mockRestore(); + }); + + describe('when the logLevel configuration is not set', () => { + it('logs a warning to the console', () => { + config.set('logLevel', undefined); + + printIonWarning('This is a warning message'); + + expect(consoleWarnSpy).toHaveBeenCalledWith('[Ionic Warning]: This is a warning message'); + }); + }); + + describe("when the logLevel configuration is set to 'WARN'", () => { + it('logs a warning to the console', () => { + config.set('logLevel', LogLevel.WARN); + + printIonWarning('This is a warning message'); + + expect(consoleWarnSpy).toHaveBeenCalledWith('[Ionic Warning]: This is a warning message'); + }); + }); + + describe("when the logLevel configuration is set to 'ERROR'", () => { + it('does not log a warning to the console', () => { + config.set('logLevel', LogLevel.ERROR); + + printIonWarning('This is a warning message'); + + expect(consoleWarnSpy).not.toHaveBeenCalled(); + }); + }); + + describe("when the logLevel configuration is set to 'OFF'", () => { + it('does not log a warning to the console', () => { + config.set('logLevel', LogLevel.OFF); + + printIonWarning('This is a warning message'); + + expect(consoleWarnSpy).not.toHaveBeenCalled(); + }); + }); + }); + + describe('#printIonError', () => { + let consoleErrorSpy: jest.SpyInstance; + + beforeEach(() => { + consoleErrorSpy = jest.spyOn(console, 'error'); + // Suppress console.error output from polluting the test output + consoleErrorSpy.mockImplementation(() => {}); + }); + + afterEach(() => { + consoleErrorSpy.mockRestore(); + }); + + describe('when the logLevel configuration is not set', () => { + it('logs an error to the console', () => { + config.set('logLevel', undefined); + + printIonError('This is an error message'); + + expect(consoleErrorSpy).toHaveBeenCalledWith('[Ionic Error]: This is an error message'); + }); + }); + + describe("when the logLevel configuration is set to 'ERROR'", () => { + it('logs an error to the console', () => { + config.set('logLevel', LogLevel.ERROR); + + printIonError('This is an error message'); + + expect(consoleErrorSpy).toHaveBeenCalledWith('[Ionic Error]: This is an error message'); + }); + }); + + describe("when the logLevel configuration is set to 'WARN'", () => { + it('logs an error to the console', () => { + config.set('logLevel', LogLevel.WARN); + + printIonError('This is an error message'); + + expect(consoleErrorSpy).toHaveBeenCalledWith('[Ionic Error]: This is an error message'); + }); + }); + + describe("when the logLevel configuration is set to 'OFF'", () => { + it('does not log an error to the console', () => { + config.set('logLevel', LogLevel.OFF); + + printIonError('This is an error message'); + + expect(consoleErrorSpy).not.toHaveBeenCalled(); + }); + }); + }); +}); From f532a5d4b738ad936574cbd2dd46688465d69e2e Mon Sep 17 00:00:00 2001 From: ionitron Date: Wed, 22 Jan 2025 21:33:23 +0000 Subject: [PATCH 02/12] v8.4.2 --- CHANGELOG.md | 12 ++++++++++++ core/CHANGELOG.md | 12 ++++++++++++ core/package-lock.json | 6 +++--- core/package.json | 2 +- lerna.json | 2 +- packages/angular-server/CHANGELOG.md | 8 ++++++++ packages/angular-server/package-lock.json | 8 ++++---- packages/angular-server/package.json | 4 ++-- packages/angular/CHANGELOG.md | 8 ++++++++ packages/angular/package-lock.json | 8 ++++---- packages/angular/package.json | 4 ++-- packages/docs/CHANGELOG.md | 8 ++++++++ packages/docs/package-lock.json | 6 +++--- packages/docs/package.json | 2 +- packages/react-router/CHANGELOG.md | 8 ++++++++ packages/react-router/package-lock.json | 8 ++++---- packages/react-router/package.json | 4 ++-- packages/react/CHANGELOG.md | 8 ++++++++ packages/react/package-lock.json | 8 ++++---- packages/react/package.json | 4 ++-- packages/vue-router/CHANGELOG.md | 8 ++++++++ packages/vue-router/package-lock.json | 8 ++++---- packages/vue-router/package.json | 4 ++-- packages/vue/CHANGELOG.md | 8 ++++++++ packages/vue/package-lock.json | 8 ++++---- packages/vue/package.json | 4 ++-- 26 files changed, 125 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53f56f54e5..c62a972713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.4.2](https://github.com/ionic-team/ionic-framework/compare/v8.4.1...v8.4.2) (2025-01-22) + + +### Bug Fixes + +* **segment:** add logic to connect to segment-view in `componentDidLoad()` callback ([#30060](https://github.com/ionic-team/ionic-framework/issues/30060)) ([000f553](https://github.com/ionic-team/ionic-framework/commit/000f55303e459c583e642337fb1894f419f37d48)), closes [#30000](https://github.com/ionic-team/ionic-framework/issues/30000) +* **select-modal:** match radio styles to iOS native ([#30119](https://github.com/ionic-team/ionic-framework/issues/30119)) ([3f8346e](https://github.com/ionic-team/ionic-framework/commit/3f8346e718ae3a6eb5008d739f10b6898b84ca9b)) + + + + + ## [8.4.1](https://github.com/ionic-team/ionic-framework/compare/v8.4.0...v8.4.1) (2024-11-27) diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 0c1255506f..764da4f1ef 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.4.2](https://github.com/ionic-team/ionic-framework/compare/v8.4.1...v8.4.2) (2025-01-22) + + +### Bug Fixes + +* **segment:** add logic to connect to segment-view in `componentDidLoad()` callback ([#30060](https://github.com/ionic-team/ionic-framework/issues/30060)) ([000f553](https://github.com/ionic-team/ionic-framework/commit/000f55303e459c583e642337fb1894f419f37d48)), closes [#30000](https://github.com/ionic-team/ionic-framework/issues/30000) +* **select-modal:** match radio styles to iOS native ([#30119](https://github.com/ionic-team/ionic-framework/issues/30119)) ([3f8346e](https://github.com/ionic-team/ionic-framework/commit/3f8346e718ae3a6eb5008d739f10b6898b84ca9b)) + + + + + ## [8.4.1](https://github.com/ionic-team/ionic-framework/compare/v8.4.0...v8.4.1) (2024-11-27) diff --git a/core/package-lock.json b/core/package-lock.json index 73408ca5cd..a0fb95e734 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ionic/core", - "version": "8.4.1", + "version": "8.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/core", - "version": "8.4.1", + "version": "8.4.2", "license": "MIT", "dependencies": { "@stencil/core": "4.20.0", @@ -18162,4 +18162,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/core/package.json b/core/package.json index 625f26c136..46fbd0f1be 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/core", - "version": "8.4.1", + "version": "8.4.2", "description": "Base components for Ionic", "keywords": [ "ionic", diff --git a/lerna.json b/lerna.json index 25106cf05b..74bdb316c2 100644 --- a/lerna.json +++ b/lerna.json @@ -3,5 +3,5 @@ "core", "packages/*" ], - "version": "8.4.1" + "version": "8.4.2" } \ No newline at end of file diff --git a/packages/angular-server/CHANGELOG.md b/packages/angular-server/CHANGELOG.md index 4bd9b065c2..860dd176cb 100644 --- a/packages/angular-server/CHANGELOG.md +++ b/packages/angular-server/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.4.2](https://github.com/ionic-team/ionic-framework/compare/v8.4.1...v8.4.2) (2025-01-22) + +**Note:** Version bump only for package @ionic/angular-server + + + + + ## [8.4.1](https://github.com/ionic-team/ionic-framework/compare/v8.4.0...v8.4.1) (2024-11-27) **Note:** Version bump only for package @ionic/angular-server diff --git a/packages/angular-server/package-lock.json b/packages/angular-server/package-lock.json index a7cba511c4..d654e6da4d 100644 --- a/packages/angular-server/package-lock.json +++ b/packages/angular-server/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/angular-server", - "version": "8.4.1", + "version": "8.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/angular-server", - "version": "8.4.1", + "version": "8.4.2", "license": "MIT", "dependencies": { - "@ionic/core": "^8.4.1" + "@ionic/core": "^8.4.2" }, "devDependencies": { "@angular-eslint/eslint-plugin": "^16.0.0", @@ -11111,4 +11111,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/angular-server/package.json b/packages/angular-server/package.json index 277ca8aa43..ec182e0d77 100644 --- a/packages/angular-server/package.json +++ b/packages/angular-server/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/angular-server", - "version": "8.4.1", + "version": "8.4.2", "description": "Angular SSR Module for Ionic", "keywords": [ "ionic", @@ -62,6 +62,6 @@ }, "prettier": "@ionic/prettier-config", "dependencies": { - "@ionic/core": "^8.4.1" + "@ionic/core": "^8.4.2" } } diff --git a/packages/angular/CHANGELOG.md b/packages/angular/CHANGELOG.md index 4d6c522b0f..2c4f586c47 100644 --- a/packages/angular/CHANGELOG.md +++ b/packages/angular/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.4.2](https://github.com/ionic-team/ionic-framework/compare/v8.4.1...v8.4.2) (2025-01-22) + +**Note:** Version bump only for package @ionic/angular + + + + + ## [8.4.1](https://github.com/ionic-team/ionic-framework/compare/v8.4.0...v8.4.1) (2024-11-27) **Note:** Version bump only for package @ionic/angular diff --git a/packages/angular/package-lock.json b/packages/angular/package-lock.json index 0cd39ba861..e9cf76267d 100644 --- a/packages/angular/package-lock.json +++ b/packages/angular/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/angular", - "version": "8.4.1", + "version": "8.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/angular", - "version": "8.4.1", + "version": "8.4.2", "license": "MIT", "dependencies": { - "@ionic/core": "^8.4.1", + "@ionic/core": "^8.4.2", "ionicons": "^7.0.0", "jsonc-parser": "^3.0.0", "tslib": "^2.3.0" @@ -15021,4 +15021,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/angular/package.json b/packages/angular/package.json index 6b11db9bf6..e83e0a2465 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/angular", - "version": "8.4.1", + "version": "8.4.2", "description": "Angular specific wrappers for @ionic/core", "keywords": [ "ionic", @@ -47,7 +47,7 @@ } }, "dependencies": { - "@ionic/core": "^8.4.1", + "@ionic/core": "^8.4.2", "ionicons": "^7.0.0", "jsonc-parser": "^3.0.0", "tslib": "^2.3.0" diff --git a/packages/docs/CHANGELOG.md b/packages/docs/CHANGELOG.md index c55c8ff471..e4bb2af5dc 100644 --- a/packages/docs/CHANGELOG.md +++ b/packages/docs/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.4.2](https://github.com/ionic-team/ionic-framework/compare/v8.4.1...v8.4.2) (2025-01-22) + +**Note:** Version bump only for package @ionic/docs + + + + + ## [8.4.1](https://github.com/ionic-team/ionic-framework/compare/v8.4.0...v8.4.1) (2024-11-27) **Note:** Version bump only for package @ionic/docs diff --git a/packages/docs/package-lock.json b/packages/docs/package-lock.json index 23673b495d..2aea83fe0c 100644 --- a/packages/docs/package-lock.json +++ b/packages/docs/package-lock.json @@ -1,13 +1,13 @@ { "name": "@ionic/docs", - "version": "8.4.1", + "version": "8.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/docs", - "version": "8.4.1", + "version": "8.4.2", "license": "MIT" } } -} +} \ No newline at end of file diff --git a/packages/docs/package.json b/packages/docs/package.json index 62ce152ba6..17647ad790 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/docs", - "version": "8.4.1", + "version": "8.4.2", "description": "Pre-packaged API documentation for the Ionic docs.", "main": "core.json", "types": "core.d.ts", diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index 686c6fc924..268704c837 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.4.2](https://github.com/ionic-team/ionic-framework/compare/v8.4.1...v8.4.2) (2025-01-22) + +**Note:** Version bump only for package @ionic/react-router + + + + + ## [8.4.1](https://github.com/ionic-team/ionic-framework/compare/v8.4.0...v8.4.1) (2024-11-27) **Note:** Version bump only for package @ionic/react-router diff --git a/packages/react-router/package-lock.json b/packages/react-router/package-lock.json index 7f96b76fd0..4ae467daee 100644 --- a/packages/react-router/package-lock.json +++ b/packages/react-router/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/react-router", - "version": "8.4.1", + "version": "8.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/react-router", - "version": "8.4.1", + "version": "8.4.2", "license": "MIT", "dependencies": { - "@ionic/react": "^8.4.1", + "@ionic/react": "^8.4.2", "tslib": "*" }, "devDependencies": { @@ -6670,4 +6670,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 5d3161028a..b688ffa1c6 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/react-router", - "version": "8.4.1", + "version": "8.4.2", "description": "React Router wrapper for @ionic/react", "keywords": [ "ionic", @@ -36,7 +36,7 @@ "dist/" ], "dependencies": { - "@ionic/react": "^8.4.1", + "@ionic/react": "^8.4.2", "tslib": "*" }, "peerDependencies": { diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 504b70db8c..0578b71d93 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.4.2](https://github.com/ionic-team/ionic-framework/compare/v8.4.1...v8.4.2) (2025-01-22) + +**Note:** Version bump only for package @ionic/react + + + + + ## [8.4.1](https://github.com/ionic-team/ionic-framework/compare/v8.4.0...v8.4.1) (2024-11-27) **Note:** Version bump only for package @ionic/react diff --git a/packages/react/package-lock.json b/packages/react/package-lock.json index f86e75d980..55e31d0e40 100644 --- a/packages/react/package-lock.json +++ b/packages/react/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/react", - "version": "8.4.1", + "version": "8.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/react", - "version": "8.4.1", + "version": "8.4.2", "license": "MIT", "dependencies": { - "@ionic/core": "^8.4.1", + "@ionic/core": "^8.4.2", "ionicons": "^7.0.0", "tslib": "*" }, @@ -20499,4 +20499,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/packages/react/package.json b/packages/react/package.json index 152e60b797..7a4ab7bdf3 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/react", - "version": "8.4.1", + "version": "8.4.2", "description": "React specific wrapper for @ionic/core", "keywords": [ "ionic", @@ -39,7 +39,7 @@ "css/" ], "dependencies": { - "@ionic/core": "^8.4.1", + "@ionic/core": "^8.4.2", "ionicons": "^7.0.0", "tslib": "*" }, diff --git a/packages/vue-router/CHANGELOG.md b/packages/vue-router/CHANGELOG.md index b698ac96fb..dec39e496c 100644 --- a/packages/vue-router/CHANGELOG.md +++ b/packages/vue-router/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.4.2](https://github.com/ionic-team/ionic-framework/compare/v8.4.1...v8.4.2) (2025-01-22) + +**Note:** Version bump only for package @ionic/vue-router + + + + + ## [8.4.1](https://github.com/ionic-team/ionic-framework/compare/v8.4.0...v8.4.1) (2024-11-27) **Note:** Version bump only for package @ionic/vue-router diff --git a/packages/vue-router/package-lock.json b/packages/vue-router/package-lock.json index 75f1604ac6..3cc1b3a968 100644 --- a/packages/vue-router/package-lock.json +++ b/packages/vue-router/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/vue-router", - "version": "8.4.1", + "version": "8.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/vue-router", - "version": "8.4.1", + "version": "8.4.2", "license": "MIT", "dependencies": { - "@ionic/vue": "^8.4.1" + "@ionic/vue": "^8.4.2" }, "devDependencies": { "@ionic/eslint-config": "^0.3.0", @@ -12802,4 +12802,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json index c284dd4e57..d74b4a9f8f 100644 --- a/packages/vue-router/package.json +++ b/packages/vue-router/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/vue-router", - "version": "8.4.1", + "version": "8.4.2", "description": "Vue Router integration for @ionic/vue", "scripts": { "test.spec": "jest", @@ -44,7 +44,7 @@ }, "homepage": "https://github.com/ionic-team/ionic-framework#readme", "dependencies": { - "@ionic/vue": "^8.4.1" + "@ionic/vue": "^8.4.2" }, "devDependencies": { "@ionic/eslint-config": "^0.3.0", diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index a14b2411a2..47ff1cf6d5 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.4.2](https://github.com/ionic-team/ionic-framework/compare/v8.4.1...v8.4.2) (2025-01-22) + +**Note:** Version bump only for package @ionic/vue + + + + + ## [8.4.1](https://github.com/ionic-team/ionic-framework/compare/v8.4.0...v8.4.1) (2024-11-27) **Note:** Version bump only for package @ionic/vue diff --git a/packages/vue/package-lock.json b/packages/vue/package-lock.json index 6198cf6d87..873a56cddf 100644 --- a/packages/vue/package-lock.json +++ b/packages/vue/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/vue", - "version": "8.4.1", + "version": "8.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/vue", - "version": "8.4.1", + "version": "8.4.2", "license": "MIT", "dependencies": { - "@ionic/core": "^8.4.1", + "@ionic/core": "^8.4.2", "ionicons": "^7.0.0" }, "devDependencies": { @@ -6563,4 +6563,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/packages/vue/package.json b/packages/vue/package.json index c35914e468..3857f58f81 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/vue", - "version": "8.4.1", + "version": "8.4.2", "description": "Vue specific wrapper for @ionic/core", "scripts": { "eslint": "eslint src", @@ -66,7 +66,7 @@ "vue-router": "^4.0.16" }, "dependencies": { - "@ionic/core": "^8.4.1", + "@ionic/core": "^8.4.2", "ionicons": "^7.0.0" }, "vetur": { From c2bc756ffc473db755a1e9634c45e3366defedd6 Mon Sep 17 00:00:00 2001 From: ionitron Date: Wed, 22 Jan 2025 21:34:04 +0000 Subject: [PATCH 03/12] chore(): update package lock files --- core/package-lock.json | 2 +- packages/angular-server/package-lock.json | 14 +++++------ packages/angular/package-lock.json | 14 +++++------ packages/docs/package-lock.json | 2 +- packages/react-router/package-lock.json | 30 +++++++++++------------ packages/react/package-lock.json | 14 +++++------ packages/vue-router/package-lock.json | 30 +++++++++++------------ packages/vue/package-lock.json | 14 +++++------ 8 files changed, 60 insertions(+), 60 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index a0fb95e734..64536c30db 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -18162,4 +18162,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/packages/angular-server/package-lock.json b/packages/angular-server/package-lock.json index d654e6da4d..d62d556ef7 100644 --- a/packages/angular-server/package-lock.json +++ b/packages/angular-server/package-lock.json @@ -1031,9 +1031,9 @@ "dev": true }, "node_modules/@ionic/core": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.1.tgz", - "integrity": "sha512-D5xpw5TF2wldpAWE0rHq3L+5T79EjR6d++QFpprjp+q+cFjjhOnfGD+2k7gLlWepAod9LUUigeL0JF02C2wgRQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.2.tgz", + "integrity": "sha512-p1/avROJi+z/rTw07nkIi0hBsWw3oITVK3KCMrAccaViQpqQ6a692jX6xdnoycsj/ixeVjXgfV1Useu6hTNaHA==", "license": "MIT", "dependencies": { "@stencil/core": "4.20.0", @@ -7189,9 +7189,9 @@ "dev": true }, "@ionic/core": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.1.tgz", - "integrity": "sha512-D5xpw5TF2wldpAWE0rHq3L+5T79EjR6d++QFpprjp+q+cFjjhOnfGD+2k7gLlWepAod9LUUigeL0JF02C2wgRQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.2.tgz", + "integrity": "sha512-p1/avROJi+z/rTw07nkIi0hBsWw3oITVK3KCMrAccaViQpqQ6a692jX6xdnoycsj/ixeVjXgfV1Useu6hTNaHA==", "requires": { "@stencil/core": "4.20.0", "ionicons": "^7.2.2", @@ -11111,4 +11111,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/angular/package-lock.json b/packages/angular/package-lock.json index e9cf76267d..50a67ec689 100644 --- a/packages/angular/package-lock.json +++ b/packages/angular/package-lock.json @@ -1398,9 +1398,9 @@ "dev": true }, "node_modules/@ionic/core": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.1.tgz", - "integrity": "sha512-D5xpw5TF2wldpAWE0rHq3L+5T79EjR6d++QFpprjp+q+cFjjhOnfGD+2k7gLlWepAod9LUUigeL0JF02C2wgRQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.2.tgz", + "integrity": "sha512-p1/avROJi+z/rTw07nkIi0hBsWw3oITVK3KCMrAccaViQpqQ6a692jX6xdnoycsj/ixeVjXgfV1Useu6hTNaHA==", "license": "MIT", "dependencies": { "@stencil/core": "4.20.0", @@ -9821,9 +9821,9 @@ "dev": true }, "@ionic/core": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.1.tgz", - "integrity": "sha512-D5xpw5TF2wldpAWE0rHq3L+5T79EjR6d++QFpprjp+q+cFjjhOnfGD+2k7gLlWepAod9LUUigeL0JF02C2wgRQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.2.tgz", + "integrity": "sha512-p1/avROJi+z/rTw07nkIi0hBsWw3oITVK3KCMrAccaViQpqQ6a692jX6xdnoycsj/ixeVjXgfV1Useu6hTNaHA==", "requires": { "@stencil/core": "4.20.0", "ionicons": "^7.2.2", @@ -15021,4 +15021,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/docs/package-lock.json b/packages/docs/package-lock.json index 2aea83fe0c..fa1d49de61 100644 --- a/packages/docs/package-lock.json +++ b/packages/docs/package-lock.json @@ -10,4 +10,4 @@ "license": "MIT" } } -} \ No newline at end of file +} diff --git a/packages/react-router/package-lock.json b/packages/react-router/package-lock.json index 4ae467daee..e101215959 100644 --- a/packages/react-router/package-lock.json +++ b/packages/react-router/package-lock.json @@ -238,9 +238,9 @@ "dev": true }, "node_modules/@ionic/core": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.1.tgz", - "integrity": "sha512-D5xpw5TF2wldpAWE0rHq3L+5T79EjR6d++QFpprjp+q+cFjjhOnfGD+2k7gLlWepAod9LUUigeL0JF02C2wgRQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.2.tgz", + "integrity": "sha512-p1/avROJi+z/rTw07nkIi0hBsWw3oITVK3KCMrAccaViQpqQ6a692jX6xdnoycsj/ixeVjXgfV1Useu6hTNaHA==", "license": "MIT", "dependencies": { "@stencil/core": "4.20.0", @@ -415,12 +415,12 @@ } }, "node_modules/@ionic/react": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/react/-/react-8.4.1.tgz", - "integrity": "sha512-QGxcNilIAMWylgKFQuojESDm7T5aRopKDqsH7c0mdRZPMA5o5i9ErnjBfhZgG7ABuyZ7m+T3TWHqzE/umX43ng==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/react/-/react-8.4.2.tgz", + "integrity": "sha512-IDQy6a6oo9dG4Bu/svg/n8KSusTPY/bgI32FGGglm2nIe0F3hnjjIoS0Ikp0QdA4shqSnjV2Aq5AzGd3i6x5gg==", "license": "MIT", "dependencies": { - "@ionic/core": "8.4.1", + "@ionic/core": "8.4.2", "ionicons": "^7.0.0", "tslib": "*" }, @@ -4061,9 +4061,9 @@ "dev": true }, "@ionic/core": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.1.tgz", - "integrity": "sha512-D5xpw5TF2wldpAWE0rHq3L+5T79EjR6d++QFpprjp+q+cFjjhOnfGD+2k7gLlWepAod9LUUigeL0JF02C2wgRQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.2.tgz", + "integrity": "sha512-p1/avROJi+z/rTw07nkIi0hBsWw3oITVK3KCMrAccaViQpqQ6a692jX6xdnoycsj/ixeVjXgfV1Useu6hTNaHA==", "requires": { "@stencil/core": "4.20.0", "ionicons": "^7.2.2", @@ -4167,11 +4167,11 @@ "requires": {} }, "@ionic/react": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/react/-/react-8.4.1.tgz", - "integrity": "sha512-QGxcNilIAMWylgKFQuojESDm7T5aRopKDqsH7c0mdRZPMA5o5i9ErnjBfhZgG7ABuyZ7m+T3TWHqzE/umX43ng==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/react/-/react-8.4.2.tgz", + "integrity": "sha512-IDQy6a6oo9dG4Bu/svg/n8KSusTPY/bgI32FGGglm2nIe0F3hnjjIoS0Ikp0QdA4shqSnjV2Aq5AzGd3i6x5gg==", "requires": { - "@ionic/core": "8.4.1", + "@ionic/core": "8.4.2", "ionicons": "^7.0.0", "tslib": "*" } @@ -6670,4 +6670,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/packages/react/package-lock.json b/packages/react/package-lock.json index 55e31d0e40..cbc6375a75 100644 --- a/packages/react/package-lock.json +++ b/packages/react/package-lock.json @@ -736,9 +736,9 @@ "dev": true }, "node_modules/@ionic/core": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.1.tgz", - "integrity": "sha512-D5xpw5TF2wldpAWE0rHq3L+5T79EjR6d++QFpprjp+q+cFjjhOnfGD+2k7gLlWepAod9LUUigeL0JF02C2wgRQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.2.tgz", + "integrity": "sha512-p1/avROJi+z/rTw07nkIi0hBsWw3oITVK3KCMrAccaViQpqQ6a692jX6xdnoycsj/ixeVjXgfV1Useu6hTNaHA==", "license": "MIT", "dependencies": { "@stencil/core": "4.20.0", @@ -12316,9 +12316,9 @@ "dev": true }, "@ionic/core": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.1.tgz", - "integrity": "sha512-D5xpw5TF2wldpAWE0rHq3L+5T79EjR6d++QFpprjp+q+cFjjhOnfGD+2k7gLlWepAod9LUUigeL0JF02C2wgRQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.2.tgz", + "integrity": "sha512-p1/avROJi+z/rTw07nkIi0hBsWw3oITVK3KCMrAccaViQpqQ6a692jX6xdnoycsj/ixeVjXgfV1Useu6hTNaHA==", "requires": { "@stencil/core": "4.20.0", "ionicons": "^7.2.2", @@ -20499,4 +20499,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/packages/vue-router/package-lock.json b/packages/vue-router/package-lock.json index 3cc1b3a968..0ddf533b2f 100644 --- a/packages/vue-router/package-lock.json +++ b/packages/vue-router/package-lock.json @@ -661,9 +661,9 @@ "dev": true }, "node_modules/@ionic/core": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.1.tgz", - "integrity": "sha512-D5xpw5TF2wldpAWE0rHq3L+5T79EjR6d++QFpprjp+q+cFjjhOnfGD+2k7gLlWepAod9LUUigeL0JF02C2wgRQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.2.tgz", + "integrity": "sha512-p1/avROJi+z/rTw07nkIi0hBsWw3oITVK3KCMrAccaViQpqQ6a692jX6xdnoycsj/ixeVjXgfV1Useu6hTNaHA==", "license": "MIT", "dependencies": { "@stencil/core": "4.20.0", @@ -853,12 +853,12 @@ } }, "node_modules/@ionic/vue": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.4.1.tgz", - "integrity": "sha512-L2IyyK/74saLuRoyTHGsRDywe7ehQol2d8X5KJgEhajt2i0A1zZaqIxfJJra4k9a+ZwNVASotMbRGURK9RqCZA==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.4.2.tgz", + "integrity": "sha512-GJZJJMXRZ1LP7bpIJquSrL8HC5Gwpz9ak/H6BzdhGIhDLEPfe//4EMkijbNGEnrlW6XSamN2lf6SrRZ1Lk5NMA==", "license": "MIT", "dependencies": { - "@ionic/core": "8.4.1", + "@ionic/core": "8.4.2", "ionicons": "^7.0.0" } }, @@ -7882,9 +7882,9 @@ "dev": true }, "@ionic/core": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.1.tgz", - "integrity": "sha512-D5xpw5TF2wldpAWE0rHq3L+5T79EjR6d++QFpprjp+q+cFjjhOnfGD+2k7gLlWepAod9LUUigeL0JF02C2wgRQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.2.tgz", + "integrity": "sha512-p1/avROJi+z/rTw07nkIi0hBsWw3oITVK3KCMrAccaViQpqQ6a692jX6xdnoycsj/ixeVjXgfV1Useu6hTNaHA==", "requires": { "@stencil/core": "4.20.0", "ionicons": "^7.2.2", @@ -7997,11 +7997,11 @@ "requires": {} }, "@ionic/vue": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.4.1.tgz", - "integrity": "sha512-L2IyyK/74saLuRoyTHGsRDywe7ehQol2d8X5KJgEhajt2i0A1zZaqIxfJJra4k9a+ZwNVASotMbRGURK9RqCZA==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.4.2.tgz", + "integrity": "sha512-GJZJJMXRZ1LP7bpIJquSrL8HC5Gwpz9ak/H6BzdhGIhDLEPfe//4EMkijbNGEnrlW6XSamN2lf6SrRZ1Lk5NMA==", "requires": { - "@ionic/core": "8.4.1", + "@ionic/core": "8.4.2", "ionicons": "^7.0.0" } }, @@ -12802,4 +12802,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/packages/vue/package-lock.json b/packages/vue/package-lock.json index 873a56cddf..f23f81d405 100644 --- a/packages/vue/package-lock.json +++ b/packages/vue/package-lock.json @@ -208,9 +208,9 @@ "dev": true }, "node_modules/@ionic/core": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.1.tgz", - "integrity": "sha512-D5xpw5TF2wldpAWE0rHq3L+5T79EjR6d++QFpprjp+q+cFjjhOnfGD+2k7gLlWepAod9LUUigeL0JF02C2wgRQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.2.tgz", + "integrity": "sha512-p1/avROJi+z/rTw07nkIi0hBsWw3oITVK3KCMrAccaViQpqQ6a692jX6xdnoycsj/ixeVjXgfV1Useu6hTNaHA==", "license": "MIT", "dependencies": { "@stencil/core": "4.20.0", @@ -3971,9 +3971,9 @@ "dev": true }, "@ionic/core": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.1.tgz", - "integrity": "sha512-D5xpw5TF2wldpAWE0rHq3L+5T79EjR6d++QFpprjp+q+cFjjhOnfGD+2k7gLlWepAod9LUUigeL0JF02C2wgRQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.2.tgz", + "integrity": "sha512-p1/avROJi+z/rTw07nkIi0hBsWw3oITVK3KCMrAccaViQpqQ6a692jX6xdnoycsj/ixeVjXgfV1Useu6hTNaHA==", "requires": { "@stencil/core": "4.20.0", "ionicons": "^7.2.2", @@ -6563,4 +6563,4 @@ "dev": true } } -} \ No newline at end of file +} From 1d5cd4b6b32bf37896012d8763564c68c21c381e Mon Sep 17 00:00:00 2001 From: giuliana Date: Thu, 23 Jan 2025 11:46:33 +0000 Subject: [PATCH 04/12] feat(select): add required prop --- core/src/components/select/select.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/components/select/select.tsx b/core/src/components/select/select.tsx index 3b4ef84f26..b9495115d1 100644 --- a/core/src/components/select/select.tsx +++ b/core/src/components/select/select.tsx @@ -196,6 +196,11 @@ export class Select implements ComponentInterface { */ @Prop({ mutable: true }) value?: any | null; + /** + * If `true`, the user must fill in a value before submitting a form. + */ + @Prop() required = false; + /** * Emitted when the value has changed. * @@ -974,7 +979,7 @@ export class Select implements ComponentInterface { } private renderListbox() { - const { disabled, inputId, isExpanded } = this; + const { disabled, inputId, isExpanded, required } = this; return (