chore(appium,fake-driver,fake-plugin): hardcode peer dep version
Lerna won't manage this for us.  Further, `peerDependencies` should be as broad as possible.  We can narrow this range later, if necessary.  Narrowing the range will be a breaking change in the plugin.
MODIFY
packages/appium/lib/extension/manifest.js
packages/appium/lib/extension/manifest.js
@@ -10,7 +10,6 @@ import {DRIVER_TYPE, PLUGIN_TYPE} from '../constants';
import log from '../logger';
import {INSTALL_TYPE_NPM} from './extension-config';
import {packageDidChange} from './package-changed';
-import {APPIUM_VER} from '../config';
/**
* Default depth to search in directory tree for whatever it is we're looking for.
@@ -278,9 +277,6 @@ export class Manifest {
*/
addExtension(extType, extName, extData) {
const data = _.clone(extData);
- if (data.appiumVersion?.startsWith('file:..')) {
- data.appiumVersion = APPIUM_VER;
- }
this._data[`${extType}s`][extName] = data;
return data;
}

MODIFY
packages/appium/test/unit/extension/manifest.spec.js
packages/appium/test/unit/extension/manifest.spec.js
@@ -336,17 +336,6 @@ describe('Manifest', function () {
expect(manifest.getExtensionData(DRIVER_TYPE).foo).to.not.have.property('appiumVersion');
});
});
-
- describe('when the extension has a peer dependency on `appium`, but it references a filepath', function () {
- beforeEach(function () {
- extData.appiumVersion = 'file:../appium';
- });
-
- it('should set `appiumVersion` to the current appium version', function () {
- manifest.addExtension(DRIVER_TYPE, 'foo', extData);
- expect(manifest.getExtensionData(DRIVER_TYPE).foo.appiumVersion).to.equal(APPIUM_VER);
- });
- });
});
describe('getExtensionData()', function () {
@@ -499,7 +488,7 @@ describe('Manifest', function () {
driverName: 'myDriver',
},
peerDependencies: {
- appium: 'file:../appium',
+ appium: APPIUM_VER,
},
};
});

MODIFY
packages/fake-driver/package.json
packages/fake-driver/package.json
"xpath": "0.0.32"
},
"peerDependencies": {
- "appium": "file:../appium"
+ "appium": "^2.0.0-beta.35"
},
"engines": {
"node": ">=12",

MODIFY
packages/fake-plugin/package.json
packages/fake-plugin/package.json
"lodash": "4.17.21"
},
"peerDependencies": {
- "appium": "file:../appium"
+ "appium": "^2.0.0-beta.35"
},
"engines": {
"node": ">=12",

chore(appium,fake-driver,fake-plugin): hardcode peer dep version

Lerna won't manage this for us.  Further, `peerDependencies` should be as broad as possible.  We can narrow this range later, if necessary.  Narrowing the range will be a breaking change in the plugin.