cordova-node-xcode icon indicating copy to clipboard operation
cordova-node-xcode copied to clipboard

Major update proposal

Open brody4hire opened this issue 6 years ago • 7 comments

  • [x] drop support for deprecated Node.js versions 0.8, 0.10, 0.12, and 4 (#17)
  • [x] simple-plist@1 update
  • [x] use ES2015 Object.assign as proposed in PR #14
  • [ ] consider committing package-lock.json
  • [ ] use ES6 classes instead of setting prototype functions
  • [ ] introduce some form of linting using eslint & prettier (#36, see discussion in PR #39)
  • [ ] cleanup code style issues, using prettier (ibid)
  • [ ] optional: it would also be ideal if we could port to a more currently maintained testing framework as well

We would need to increase the major version number to avoid breaking dependents that may need to support the older Node.js versions.

I would like to do the following before starting the major update:

  • [x] uuid@3 update
  • [x] introduce eslint that can be run as an npm script
  • ~~cleanup major issues found by eslint~~
  • ~~other possible cleanup that may be triggered by changes to resolve eslint issues~~
  • ~~optional: it would also be ideal if we could port to a more currently maintained testing framework as well~~
  • [x] publish minor 1.1.0 update

brody4hire avatar Dec 05 '18 19:12 brody4hire

Object.assign is available since 4.9.1 and most projects that are using cordova-node-xcode require the minimum node version6/8 as a dependency.

Also node versions prior to 6 are afaik no longer maintained (https://github.com/nodejs/Release).

I think we should certainly start modernizing this code!

n1ru4l avatar Dec 07 '18 15:12 n1ru4l

I hope to do this soon, but carefully to avoid breaking any users that may be using some of the older Node.js versions. We need to increase the major package version number whenever we drop one or more Node.js versions according to semver etiquette.

I do think you are right that not many app developers would be using Node.js pre-6.0 and version 6 is approaching EOL.

brody4hire avatar Dec 07 '18 17:12 brody4hire

I would like to get PR #24 and ideally PR #12 finished, to be published in a 1.0.1 release before starting the major updates. @n1ru4l I think it would be helpful if you could take a look at PR #12, to help determine whether or not we should merge it before publishing the next release.

brody4hire avatar Dec 09 '18 17:12 brody4hire

Also since nodeunit seems deprecated (https://www.npmjs.com/package/nodeunit#deprecated-project) and from my perspective the current tests are a mess. E.g. adding my test for (https://github.com/apache/cordova-node-xcode/pull/24) was frustrating since there was no nice way to see the actual differences of expected and actual for long strings.

Therefore I would recommend to update to a more mature testing framework. I personally would prefer jest (https://jestjs.io/).

Furthermore tools like prettier and eslint could improve the overall code quality/consistency. I have set those up for multiple projects and could do so for this one too!

n1ru4l avatar Dec 09 '18 22:12 n1ru4l

Therefore I would recommend to update to a more mature testing framework.

Agreed; I would rather discuss this in a separate issue.

I think it would make sense but not be absolutely necessary to do this after we drop deprecated Node.js version.

brody4hire avatar Dec 09 '18 22:12 brody4hire

Could we possibly either convert this to TypeScript or start shipping TypeScript Definitions?

This would be super straightforward with the move to ES6 classes #38, as it would be nearly self-documenting!

fbartho avatar Mar 04 '19 21:03 fbartho

We are converting https://github.com/react-native-community/cli to TypeScript and it would be awesome if this package had some kind of TS types: shipped with the package or hosted in DefinitelyTyped repository.

Esemesek avatar Jul 31 '19 13:07 Esemesek