Add new siteName parameter, upgrade deps and some housekeeping#35
Conversation
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| environment: npm |
There was a problem hiding this comment.
Why was the 'environment' field removed?
There was a problem hiding this comment.
Because it's invalid, not supported.
There was a problem hiding this comment.
I’m not sure where you got this information, but this change would break our release workflow.
There was a problem hiding this comment.
In any case, please don’t modify our release workflow without providing some context or explanation. Without that, this PR can come across as suspicious and may raise unnecessary concerns.
There was a problem hiding this comment.
I understand. I will put it back, but it is still invalid according to:
- https://www.schemastore.org/github-workflow.json
- https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idenvironment
There was a problem hiding this comment.
https://www.schemastore.org/github-workflow.json is not official and can be wrong.
There was a problem hiding this comment.
I see. Sorry about that. Reverted.
src/index.ts
Outdated
| locale?: string; | ||
| determiner?: 'a' | 'an' | 'the' | 'auto' | ''; | ||
| description?: string; | ||
| site_name?: string; |
There was a problem hiding this comment.
How about using camelCase instead
There was a problem hiding this comment.
Because of this code further down:
BASIC_KEYS.forEach((key) => {
const val = options[key];
if (val !== undefined) {
Object.assign(meta, getMeta(`og:${key}`, val));
}
});It would require a rewrite, which I find too risky.
There was a problem hiding this comment.
I still prefer to use camelCase in our public API
There was a problem hiding this comment.
Okay, I will rename and rewrite.
There was a problem hiding this comment.
Done, added a small toSnakeCase function so that siteName becomes site_name
c873282 to
a89e839
Compare
chenjiahan
left a comment
There was a problem hiding this comment.
Thank you for your contribution! ❤️

This to address #33