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

Remove YAML.defaultOptions #346

Merged
merged 1 commit into from Jan 8, 2022
Merged

Remove YAML.defaultOptions #346

merged 1 commit into from Jan 8, 2022

Conversation

eemeli
Copy link
Owner

@eemeli eemeli commented Jan 1, 2022

As this removes a public endpoint, this is indeed a BREAKING CHANGE.

In preparation for a yaml@2.0.0 release, I've been reviewing the public API, and I think I'd like to drop the global YAML.defaultOptions object. In general, global state feels like a bad idea.

For a while, it's been undocumented, but still available. Since the options refactor of #235, it has only provided defaults for Parse & Document options, and not any of the others, so its name is a bit misleading as well.

If you're using YAML.defaultOptions, you'll need to explicitly set the options in the appropriate parse*() and new Document() calls after this change.

@eemeli eemeli added this to the yaml 2 milestone Jan 1, 2022
@eemeli eemeli merged commit 7998a95 into master Jan 8, 2022
@eemeli eemeli deleted the drop-defaultoptions branch January 8, 2022 16:13
mergify bot pushed a commit to cdk8s-team/cdk8s-core that referenced this pull request May 15, 2023
We currently have a dependabot security finding not resolving due to a fixed yaml version in cdk8s. 

Finding: cdk8s-team/cdk8s-plus#1977

```
cdk8s@2.7.56 requires yaml@2.0.0-7
cdk8s-cli@1.3.20 requires yaml@2.0.0-7 via a transitive dependency on cdk8s@1.10.54
```

NOTE: 
* Looks like there are some more changes added when I run `npx projen`.
* Yaml `defaultOptions` for schema was removed in an update. Recommendation is to explicitly mention the version in `parse and document`. Related PR: eemeli/yaml#346
iliapolo pushed a commit to cdk8s-team/cdk8s-core that referenced this pull request May 15, 2023
We currently have a dependabot security finding not resolving due to a fixed yaml version in cdk8s.

Finding: cdk8s-team/cdk8s-plus#1977

```
cdk8s@2.7.56 requires yaml@2.0.0-7
cdk8s-cli@1.3.20 requires yaml@2.0.0-7 via a transitive dependency on cdk8s@1.10.54
```

NOTE:
* Looks like there are some more changes added when I run `npx projen`.
* Yaml `defaultOptions` for schema was removed in an update. Recommendation is to explicitly mention the version in `parse and document`. Related PR: eemeli/yaml#346

(cherry picked from commit 3801c95)
Signed-off-by: Vinayak Kukreja <78971045+vinayak-kukreja@users.noreply.github.com>

# Conflicts:
#	.projen/tasks.json
#	.projenrc.js
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.

None yet

1 participant