This is an automated email from the ASF dual-hosted git repository.
dpogue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git
The following commit(s) were added to refs/heads/master by this push:
new 49230b01 test(api): Add a test to ensure versions have availability
macros (#1662)
49230b01 is described below
commit 49230b019401be4f893b88392caed6aee2b8a247
Author: Darryl Pogue <[email protected]>
AuthorDate: Fri Jun 5 12:14:03 2026 -0700
test(api): Add a test to ensure versions have availability macros (#1662)
* chore(deps): Override yargs for Node 26
* test(api): Add a test to ensure versions have availability macros
* fix(api): Add missing availability version macros
* test(api): Add test for CORDOVA_VERSION_MIN_REQUIRED
* fix(api): Set CORDOVA_VERSION_MIN_REQUIRED to current
---
CordovaLib/include/Cordova/CDVAvailability.h | 4 +-
package-lock.json | 146 ++++++++++++++++-----------
package.json | 5 +
tests/spec/CDVAvailability.spec.js | 46 +++++++++
4 files changed, 139 insertions(+), 62 deletions(-)
diff --git a/CordovaLib/include/Cordova/CDVAvailability.h
b/CordovaLib/include/Cordova/CDVAvailability.h
index 779aa095..bfbe2575 100644
--- a/CordovaLib/include/Cordova/CDVAvailability.h
+++ b/CordovaLib/include/Cordova/CDVAvailability.h
@@ -85,6 +85,8 @@
#define __CORDOVA_7_1_1 70101
#define __CORDOVA_8_0_0 80000
#define __CORDOVA_8_0_1 80001
+#define __CORDOVA_8_1_0 80100
+#define __CORDOVA_8_1_1 80101
/* coho:next-version,insert-before */
#define __CORDOVA_NA 99999 /* not available */
@@ -97,7 +99,7 @@
*/
#ifndef CORDOVA_VERSION_MIN_REQUIRED
/* coho:next-version-min-required,replace-after */
- #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_8_0_1
+ #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_8_1_1
#endif
// TODO: Remove in Cordova iOS 9
diff --git a/package-lock.json b/package-lock.json
index 4e1f5299..6be7c404 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -459,13 +459,16 @@
"license": "MIT"
},
"node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved":
"https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity":
"sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "version": "6.2.2",
+ "resolved":
"https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
+ "integrity":
"sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",
"dev": true,
"license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
}
},
"node_modules/ansi-styles": {
@@ -860,18 +863,18 @@
}
},
"node_modules/cliui": {
- "version": "8.0.1",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
- "integrity":
"sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz",
+ "integrity":
"sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==",
"dev": true,
"license": "ISC",
"dependencies": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.1",
- "wrap-ansi": "^7.0.0"
+ "string-width": "^7.2.0",
+ "strip-ansi": "^7.1.0",
+ "wrap-ansi": "^9.0.0"
},
"engines": {
- "node": ">=12"
+ "node": ">=20"
}
},
"node_modules/color-convert": {
@@ -1154,9 +1157,9 @@
}
},
"node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved":
"https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity":
"sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "version": "10.6.0",
+ "resolved":
"https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz",
+ "integrity":
"sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==",
"dev": true,
"license": "MIT"
},
@@ -1994,6 +1997,19 @@
"node": "6.* || 8.* || >= 10.*"
}
},
+ "node_modules/get-east-asian-width": {
+ "version": "1.6.0",
+ "resolved":
"https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz",
+ "integrity":
"sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/get-intrinsic": {
"version": "1.3.0",
"resolved":
"https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
@@ -2546,16 +2562,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved":
"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity":
"sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/is-generator-function": {
"version": "1.1.2",
"resolved":
"https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz",
@@ -3516,16 +3522,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/require-directory": {
- "version": "2.1.1",
- "resolved":
"https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity":
"sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/resolve": {
"version": "1.22.11",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",
@@ -3902,18 +3898,21 @@
}
},
"node_modules/string-width": {
- "version": "4.2.3",
- "resolved":
"https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity":
"sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "version": "7.2.0",
+ "resolved":
"https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
+ "integrity":
"sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
+ "emoji-regex": "^10.3.0",
+ "get-east-asian-width": "^1.0.0",
+ "strip-ansi": "^7.1.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/string.prototype.trim": {
@@ -3976,16 +3975,19 @@
}
},
"node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved":
"https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity":
"sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "version": "7.2.0",
+ "resolved":
"https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz",
+ "integrity":
"sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",
"dev": true,
"license": "MIT",
"dependencies": {
- "ansi-regex": "^5.0.1"
+ "ansi-regex": "^6.2.2"
},
"engines": {
- "node": ">=8"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
"node_modules/strip-bom": {
@@ -4469,23 +4471,36 @@
}
},
"node_modules/wrap-ansi": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity":
"sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz",
+ "integrity":
"sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==",
"dev": true,
"license": "MIT",
"dependencies": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
+ "ansi-styles": "^6.2.1",
+ "string-width": "^7.0.0",
+ "strip-ansi": "^7.1.0"
},
"engines": {
- "node": ">=10"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
+ "node_modules/wrap-ansi/node_modules/ansi-styles": {
+ "version": "6.2.3",
+ "resolved":
"https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
+ "integrity":
"sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
"node_modules/xcode": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/xcode/-/xcode-3.0.1.tgz",
@@ -4519,22 +4534,21 @@
}
},
"node_modules/yargs": {
- "version": "17.7.2",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
- "integrity":
"sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "version": "18.0.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz",
+ "integrity":
"sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "cliui": "^8.0.1",
+ "cliui": "^9.0.1",
"escalade": "^3.1.1",
"get-caller-file": "^2.0.5",
- "require-directory": "^2.1.1",
- "string-width": "^4.2.3",
+ "string-width": "^7.2.0",
"y18n": "^5.0.5",
- "yargs-parser": "^21.1.1"
+ "yargs-parser": "^22.0.0"
},
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || ^22.12.0 || >=23"
}
},
"node_modules/yargs-parser": {
@@ -4547,6 +4561,16 @@
"node": ">=12"
}
},
+ "node_modules/yargs/node_modules/yargs-parser": {
+ "version": "22.0.0",
+ "resolved":
"https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz",
+ "integrity":
"sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": "^20.19.0 || ^22.12.0 || >=23"
+ }
+ },
"node_modules/yocto-queue": {
"version": "0.1.0",
"resolved":
"https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
diff --git a/package.json b/package.json
index 325cd6b1..a676a411 100644
--- a/package.json
+++ b/package.json
@@ -48,6 +48,11 @@
"which": "^6.0.0",
"xcode": "^3.0.1"
},
+ "overrides": {
+ "c8": {
+ "yargs": "^18.0.0"
+ }
+ },
"c8": {
"include": [
"lib/**"
diff --git a/tests/spec/CDVAvailability.spec.js
b/tests/spec/CDVAvailability.spec.js
new file mode 100644
index 00000000..7ca40d8d
--- /dev/null
+++ b/tests/spec/CDVAvailability.spec.js
@@ -0,0 +1,46 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+
+const fs = require('node:fs');
+const path = require('node:path');
+const semver = require('semver');
+const VERSION = require(path.resolve(__dirname, '..', '..',
'package.json')).version;
+
+const pkgVersion = semver.coerce(VERSION).version;
+const versionDefine = `__CORDOVA_${pkgVersion.split('.').join('_')}`;
+
+const headerPath = path.resolve(__dirname, '..', '..', 'CordovaLib',
'include', 'Cordova', 'CDVAvailability.h');
+
+describe('CDVAvailability.h', () => {
+ let headerText = '';
+
+ beforeAll(() => {
+ headerText = fs.readFileSync(headerPath, 'utf8');
+ });
+
+ it('should contain a definition for the current package version', () => {
+ expect(headerText).toMatch(versionDefine);
+ });
+
+ it('should define the current version as CORDOVA_VERSION_MIN_REQUIRED', ()
=> {
+ const minRequired = `#define CORDOVA_VERSION_MIN_REQUIRED
${versionDefine}`;
+
+ expect(headerText).toMatch(minRequired);
+ });
+});
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]