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

chore(deps): update dependency openapi-typescript to v7 #1243

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 22, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
openapi-typescript (source) 6.7.6 -> 7.0.2 age adoption passing confidence

Release Notes

openapi-ts/openapi-typescript (openapi-typescript)

v7.0.2

Compare Source

Patch Changes

v7.0.1

Compare Source

Patch Changes

v7.0.0

Compare Source

Major Changes
  • 6d1eb32 Thanks @​drwpow! - ⚠️ Breaking: The Node.js API now returns the TypeScript AST for the main method as well as transform() and postTransform(). To migrate, you’ll have to use the typescript compiler API:

    + import ts from "typescript";
    
    + const DATE = ts.factory.createIdentifier("Date");
    + const NULL = ts.factory.createLiteralTypeNode(ts.factory.createNull());
    
      const ast = await openapiTS(mySchema, {
        transform(schemaObject, metadata) {
          if (schemaObject.format === "date-time") {
    -       return schemaObject.nullable ? "Date | null" : "Date";
    +       return schemaObject.nullable
    +         ? ts.factory.createUnionTypeNode([DATE, NULL])
    +         : DATE;
          }
        },
      };

    Though it’s more verbose, it’s also more powerful, as now you have access to additional properties of the generated code you didn’t before (such as injecting comments).

    For example syntax, search this codebae to see how the TypeScript AST is used.

    Also see AST Explorer’s typescript parser to inspect how TypeScript is interpreted as an AST.

  • 6d1eb32 Thanks @​drwpow! - ⚠️ Breaking: Changing of several CLI flags and Node.js API options

    • The --auth, --httpHeaders, --httpMethod, and fetch (Node.js-only) options were all removed from the CLI and Node.js API
    • --immutable-types has been renamed to --immutable
    • --support-array-length has been renamed to --array-length
  • fbaf96d Thanks @​drwpow! - ⚠️ Breaking: Remove globbing schemas in favor of redocly.yaml config. Specify multiple schemas with outputs in there instead. See Multiple schemas for more info.

  • 6d1eb32 Thanks @​drwpow! - ⚠️ Breaking: Most optional objects are now always present in types, just typed as :never. This includes keys of the Components Object as well as HTTP methods.

  • 6d1eb32 Thanks @​drwpow! - ⚠️ Breaking: No more external export in schemas anymore. Everything gets flattened into the components object instead (if referencing a schema object from a remote partial, note it may have had a minor name change to avoid conflict).

  • 6d1eb32 Thanks @​drwpow! - ⚠️ Breaking defaultNonNullable option now defaults to true. You’ll now need to manually set false to return to old behavior.

  • 799194d Thanks @​drwpow~ - ⚠️ Breaking TypeScript is now a peerDependency and must be installed alongside openapi-typescript

Minor Changes
  • 6d1eb32 Thanks @​drwpow! - ✨ Feature: automatically validate schemas with Redocly CLI (docs). No more need for external tools to report errors! 🎉

    • By default, it will only throw on actual schema errors (uses Redocly’s default settings)
    • For stricter linting or custom rules, you can create a redocly.yaml config
  • 312b7ba Thanks @​drwpow! - ✨ Feature: allow configuration of schemas via apis key in redocly.config.yaml. See docs for more info.

  • 6d1eb32 Thanks @​drwpow! - ✨ Feature: add enum option to export top-level enums from schemas

  • 6d1eb32 Thanks @​drwpow! - ✨ Feature: add formatOptions to allow formatting TS output

  • 6d1eb32 Thanks @​drwpow! - ✨ Feature: header responses add [key: string]: unknown index type to allow for additional untyped headers

  • 6d1eb32 Thanks @​drwpow! - ✨ Feature: bundle schemas with Redocly CLI

  • 6d1eb32 Thanks @​drwpow! - ✨ Feature: Added debugger that lets you profile performance and see more in-depth messages

  • #​1374 7ac5174 Thanks @​ElForastero! - Add support for x-enum-varnames and x-enum-descriptions

  • #​1545 9158b81 Thanks @​jaredLunde! - Replace # characters in operation IDs with a slash

Patch Changes

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled because a matching PR was automerged previously.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/major-linting branch from 15dac2f to 6cab658 Compare June 23, 2024 00:05
@CommanderStorm
Copy link
Member

CommanderStorm commented Jun 23, 2024

Blocked by openapi-ts/openapi-typescript#1591
V6 works in the meantime, until I have the time to dig into said issue further

@renovate renovate bot force-pushed the renovate/major-linting branch 28 times, most recently from 546d5f0 to d410af5 Compare June 29, 2024 23:21
@renovate renovate bot force-pushed the renovate/major-linting branch 17 times, most recently from 60f9c8a to 963d85f Compare July 11, 2024 08:51
@renovate renovate bot force-pushed the renovate/major-linting branch 8 times, most recently from 3168f02 to f997722 Compare July 13, 2024 21:23
@renovate renovate bot force-pushed the renovate/major-linting branch from f997722 to 4cd7a10 Compare July 13, 2024 21:33
@CommanderStorm CommanderStorm deleted the renovate/major-linting branch July 13, 2024 21:35
Copy link
Contributor Author

renovate bot commented Jul 13, 2024

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 7.x releases. But if you manually upgrade to 7.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

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.

1 participant