apigee / apigee/apigeetool-node

Code Modernization Efforts?

Open
#249 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
91
Forks
91
PR merge metrics
No merged PRs in 30d

Description

I understand that this repository was created almost 10 years ago, and the Apigee Team isn't really promoting Apigee Edge to new customers. However, there are many folks who are still on the Apigee Edge platform and don't have the resources to migrate into Apigee X yet. I really like this project leverages the Apigee Edge APIs to accomplish many operations and would love to contribute to modernizing the code on this repository. If there are no ongoing efforts in that direction and the owners / maintainers of this repository are not opposed, I have the following items on my mind:

  1. Use ECMAScript modules syntax instead of CommonJS modules
  2. Replace all instances of older JavaScript syntax with their newer counterparts - like:
    1. Use const and let instead of var.
    2. Use Arrow Functions instead of traditional function expressions.
    3. Use the new node: prefix when requiring / importing modules built into Node.js - like: node:fs, node:path, node:util, etc.
    4. Use async / await instead of Promises / callback APIs.
    5. etc.
  3. Replace the outdates / unmaintained 3rd party packages with contemporary solutions - preferably techniques inbuilt into the newer versions of Node.js. Like:
    1. Replace the argument parsing techniques using the now seemingly unmaintained cli-table package with the inbuilt Argument Parsing utility - that introduced in Node.js v18.3.0 and was made stable in Node.js 20.0.0
    2. Replace the postman-request package with the fetch module inbuilt in Node.js - introduced in Node.js v17.5.0, and was made stable in Node.js 21.0.0
    3. Replace the mocha package for Unit Testing with the inbuilt Test Runner module - that was introduced in Node.js v18.0.0, and was made stable in Node.js 20.0.0)
    4. Replace the fs-extra package with the inbuilt Recursive File System operations. For example, fs.copy() can be replaced with fs.cp(src, dest, { recursive: true })
    5. etc.

Is there any appetite for such changes?
If so, I would be happy to contribute to this repository.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test path, or entry point is named. First get maintainer agreement on one scoped modernization item, then inspect the relevant CLI code and dependencies; done should mean that isolated migration is complete with the existing unit tests passing, since the issue only identifies Mocha generally.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.