javascript icon indicating copy to clipboard operation
javascript copied to clipboard

Inconsistencies in examples

Open cjihrig opened this issue 4 months ago • 10 comments

Describe the bug There are a few inconsistencies/bugs in the examples in the repo:

  • There has been some drift between the examples on the master branch and those on the release-1.x branch.
  • Some of the examples use @kubernetes/client-node, while others use the build from dist/.
  • Some use require(), while others use import. It probably makes sense to migrate to import. However, the examples that use import should probably be renamed to use a .mjs file extension (otherwise they don't run).
  • Not really an issue, but the Node core imports can also be updated to use the node: scheme.
  • Some examples use the Promise API directly, while some use async/await. This is not an issue, but it might be worth moving to async/await just to keep the examples simpler.

Client Version latest on master and release-1.x branches.

Server Version n/a

To Reproduce View and try to run the various examples.

Expected behavior The examples are consistent and executable.

Example Code n/a

Environment (please complete the following information): n/a

Additional context n/a

cjihrig avatar Oct 04 '24 15:10 cjihrig