Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOTCOM-3581: update deps and add typescript default config #177

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

lucasassisrosa
Copy link
Contributor

@lucasassisrosa lucasassisrosa commented Aug 30, 2024

Initial typescript setup

Manual testing

@lucasassisrosa lucasassisrosa changed the title [DOTCOM-3581]: update deps and add typescript default config DOTCOM-3581: update deps and add typescript default config Sep 9, 2024
Copy link

@dmmc12 dmmc12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Lucas!

Some feedback from my local tests. The only issue I ran into was the linting where you can see the errors below.

Node.js Version: v20.13.1
npm Version: 10.5.2

 git checkout remotes/origin/v2.0.0-DOTCOM-3581
Note: switching to 'remotes/origin/v2.0.0-DOTCOM-3581'
dillin@dillin-Latitude-7420:~/Desktop/Telnyx SDKs/telnyx-node$ npm install
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported

added 361 packages, and audited 362 packages in 2s

63 packages are looking for funding
  run `npm fund` for details

3 moderate severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
$ npm run build

> [email protected] build
> tsc

✔️

$ ls dist
multipart.js  utils.js

✔️

$ npm run lint

> [email protected] lint
> eslint --ext .js,.ts .

Invalid option '--ext' - perhaps you meant '-c'?
You're using eslint.config.js, some command line flags are no longer available. Please see https://eslint.org/docs/latest/use/command-line-interface for details.

I tried updating package.json with:

"lint": "eslint -c .js,.ts .",

or

"lint": "eslint .",

But then I run into this error:

dillin@dillin-Latitude-7420:~/Desktop/Telnyx SDKs/telnyx-node$ npm run lint

> [email protected] lint
> eslint -c .js,.ts .


Oops! Something went wrong! :(

ESLint: 8.57.0

Error: ENOENT: no such file or directory, stat '/home/dillin/Desktop/Telnyx SDKs/telnyx-node/.js,.ts'
    at async Object.stat (node:internal/fs/promises:1029:18)
    at async loadFlatConfigFile (/home/dillin/Desktop/Telnyx SDKs/telnyx-node/node_modules/eslint/lib/eslint/flat-eslint.js:272:20)
    at async calculateConfigArray (/home/dillin/Desktop/Telnyx SDKs/telnyx-node/node_modules/eslint/lib/eslint/flat-eslint.js:382:28)
    at async FlatESLint.lintFiles (/home/dillin/Desktop/Telnyx SDKs/telnyx-node/node_modules/eslint/lib/eslint/flat-eslint.js:745:25)
    at async Object.execute (/home/dillin/Desktop/Telnyx SDKs/telnyx-node/node_modules/eslint/lib/cli.js:421:23)
    at async main (/home/dillin/Desktop/Telnyx SDKs/telnyx-node/node_modules/eslint/bin/eslint.js:152:22)

@lucasassisrosa
Copy link
Contributor Author

Hey Lucas!

Some feedback from my local tests. The only issue I ran into was the linting where you can see the errors below.

Node.js Version: v20.13.1
npm Version: 10.5.2

 git checkout remotes/origin/v2.0.0-DOTCOM-3581
Note: switching to 'remotes/origin/v2.0.0-DOTCOM-3581'
dillin@dillin-Latitude-7420:~/Desktop/Telnyx SDKs/telnyx-node$ npm install
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported

added 361 packages, and audited 362 packages in 2s

63 packages are looking for funding
  run `npm fund` for details

3 moderate severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
$ npm run build

> [email protected] build
> tsc

✔️

$ ls dist
multipart.js  utils.js

✔️

$ npm run lint

> [email protected] lint
> eslint --ext .js,.ts .

Invalid option '--ext' - perhaps you meant '-c'?
You're using eslint.config.js, some command line flags are no longer available. Please see https://eslint.org/docs/latest/use/command-line-interface for details.

I tried updating package.json with:

"lint": "eslint -c .js,.ts .",

or

"lint": "eslint .",

But then I run into this error:

dillin@dillin-Latitude-7420:~/Desktop/Telnyx SDKs/telnyx-node$ npm run lint

> [email protected] lint
> eslint -c .js,.ts .


Oops! Something went wrong! :(

ESLint: 8.57.0

Error: ENOENT: no such file or directory, stat '/home/dillin/Desktop/Telnyx SDKs/telnyx-node/.js,.ts'
    at async Object.stat (node:internal/fs/promises:1029:18)
    at async loadFlatConfigFile (/home/dillin/Desktop/Telnyx SDKs/telnyx-node/node_modules/eslint/lib/eslint/flat-eslint.js:272:20)
    at async calculateConfigArray (/home/dillin/Desktop/Telnyx SDKs/telnyx-node/node_modules/eslint/lib/eslint/flat-eslint.js:382:28)
    at async FlatESLint.lintFiles (/home/dillin/Desktop/Telnyx SDKs/telnyx-node/node_modules/eslint/lib/eslint/flat-eslint.js:745:25)
    at async Object.execute (/home/dillin/Desktop/Telnyx SDKs/telnyx-node/node_modules/eslint/lib/cli.js:421:23)
    at async main (/home/dillin/Desktop/Telnyx SDKs/telnyx-node/node_modules/eslint/bin/eslint.js:152:22)

thanks @dmmc12, I pushed a change to fix this linter issue. The config was stale on https://eslint.org/docs/latest/use/configure/migration-guide#--ext

ec6cf8c

@lucasassisrosa
Copy link
Contributor Author

moving forward with this to branch v2.0.0 in favor of #179

@lucasassisrosa lucasassisrosa merged commit fa89888 into v2.0.0 Sep 13, 2024
@lucasassisrosa lucasassisrosa deleted the v2.0.0-DOTCOM-3581 branch September 13, 2024 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants