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

feat: add yaml dependency #274

Merged
merged 4 commits into from Jan 24, 2022
Merged

feat: add yaml dependency #274

merged 4 commits into from Jan 24, 2022

Conversation

henrycunh
Copy link
Contributor

Fixes #272

  • Tests pass
  • Appropriate changes to README are included in PR

index.mjs Outdated
@@ -32,6 +33,7 @@ export const globby = Object.assign(function globby(...args) {
return globbyModule.globby(...args)
}, globbyModule)
export const glob = globby
export const yaml = { parse: yamljs.parse, stringify: yamljs.stringify }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's export everything. And let's use YAML same as JSON.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

index.mjs Outdated
@@ -22,6 +22,7 @@ import {createInterface} from 'readline'
import {default as nodeFetch} from 'node-fetch'
import which from 'which'
import chalk from 'chalk'
import yamljs from 'yaml'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't forget to upgrade .d.ts as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@henrycunh
Copy link
Contributor Author

henrycunh commented Jan 24, 2022

@antonmedv can we merge this little guy? (we need a contributing document for specifying if the reviewer or the author resolves conversations!)

@antonmedv antonmedv merged commit 0109e06 into google:main Jan 24, 2022
@antongolub
Copy link
Contributor

@henrycunh, @antonmedv,

Why yaml and not js-yaml?

name deps stars dloads
yaml 2762 521 18M
yaml-js 14100 5,4K 43M

@antonmedv
Copy link
Collaborator

I didn’t check it. Let’s switch!

@henrycunh
Copy link
Contributor Author

@antongolub I thought about maintaining a API more similar to JS's JSON API (parse and stringify).

js-yaml looks a lot like the Python's API, and imho, has worse documentation.

@antonmedv
Copy link
Collaborator

I thought they was the same. I also like JSON .parse api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add yaml package
3 participants