Skip to content

chore: migrate to the typescript v6#2689

Open
AlbinaBlazhko17 wants to merge 19 commits intomainfrom
chore/upgrade-version-of-ts-to-v6
Open

chore: migrate to the typescript v6#2689
AlbinaBlazhko17 wants to merge 19 commits intomainfrom
chore/upgrade-version-of-ts-to-v6

Conversation

@AlbinaBlazhko17
Copy link
Copy Markdown
Contributor

@AlbinaBlazhko17 AlbinaBlazhko17 commented Mar 24, 2026

What/Why/How?

Upgraded typescript version to v6:

  • Changed module, moduleResolution to nodenext
  • Migrated baseUrl and paths
  • Updated imports
  • Removed dependency abort-controller
  • Upgraded version of better-ajv-errors from v1 to v2.

Reference

Second part of #2618

Testing

e2e => https://github.com/Redocly/redocly/actions/runs/23543471148/job/68536960227?pr=21909

Screenshots (optional)

Check yourself

  • Code changed? - Tested with Redoc/Realm/Reunite (internal)
  • All new/updated code is covered by tests
  • New package installed? - Tested in different environments (browser/node)
  • Documentation update considered

Security

  • The security impact of the change has been considered
  • Code follows company security practices and guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 24, 2026

🦋 Changeset detected

Latest commit: e4cbb16

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@redocly/respect-core Patch
@redocly/openapi-core Patch
@redocly/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 24, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 79.55% (🎯 79%) 6548 / 8231
🔵 Statements 79.01% (🎯 78%) 6769 / 8567
🔵 Functions 82.92% (🎯 82%) 1336 / 1611
🔵 Branches 71.42% (🎯 71%) 4474 / 6264
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/cli/src/commands/respect/index.ts 48.93% 37.5% 75% 46.66% 57, 62-63, 82-87, 97, 101, 105, 110-112, 126-136, 141-150, 155-158
packages/core/src/resolve.ts 95.78% 95% 100% 95.65% 87, 279, 352-357, 428-429, 441-442
packages/core/src/config/group-assertion-rules.ts 88.88% 83.33% 100% 88% 20, 37, 65
packages/core/src/errors/yaml-parse-error.ts 100% 50% 100% 100%
packages/core/src/rules/ajv.ts 93.87% 91.66% 88.88% 97.77% 53, 132
packages/core/src/types/json-schema-adapter.ts 85.41% 81.81% 100% 84.61% 27, 45, 49, 53, 57-59, 81, 85, 103, 111-113, 117-119, 164, 168, 172, 176-178
packages/core/src/utils/oas-has-component.ts 100% 100% 100% 100%
packages/core/src/utils/read-file-from-url.ts 100% 75% 100% 100%
packages/respect-core/src/modules/context-parser/get-security-parameters.ts 100% 100% 100% 100%
packages/respect-core/src/modules/flow-runner/inputs/map-input-values-to-schema.ts 100% 100% 100% 100%
packages/respect-core/src/modules/flow-runner/schema/schema-checker.ts 97.5% 80.55% 100% 97.5% 154
Generated in workflow #9215 for commit e4cbb16 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 24, 2026

CLI Version Mean Time ± Std Dev (s) Relative Performance (Lower is Faster)
cli-latest 3.592s ± 0.025s ▓ 1.00x
cli-next 3.587s ± 0.027s ▓ 1.00x (Fastest)

@AlbinaBlazhko17 AlbinaBlazhko17 added the snapshot Create experimental release PR label Mar 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📦 A new experimental 🧪 version v0.0.0-snapshot.1774371282 of Redocly CLI has been published for testing.

Install with NPM:

npm install @redocly/cli@0.0.0-snapshot.1774371282
# or
npm install @redocly/openapi-core@0.0.0-snapshot.1774371282
# or
npm install @redocly/respect-core@0.0.0-snapshot.1774371282

⚠️ Note: This is a development build and may contain unstable features.

@AlbinaBlazhko17 AlbinaBlazhko17 added no changeset needed and removed snapshot Create experimental release PR labels Mar 26, 2026
@AlbinaBlazhko17 AlbinaBlazhko17 marked this pull request as ready for review March 26, 2026 11:06
@AlbinaBlazhko17 AlbinaBlazhko17 requested review from a team as code owners March 26, 2026 11:06
"require": "./lib/bundle/bundle-oas.js",
"types": "./lib/bundle/bundle-oas.d.ts"
},
"./lib/config/types.js": {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not in favour of adding additional export endpoint. It's better to maintain a single one (plus one for bundle-oas). If needed, it's better to reexport the property from the index file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, will do it

tsconfig.json Outdated
"sourceMap": true,
"module": "ESNext",
"module": "nodenext",
"target": "ES2021",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's also try bumping the target (not necessarily in this PR though).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For sure, let me do it.

"@redocly/openapi-core": patch
---

Added export for `./lib/config/types.js` to avoid errors in import.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, i thought we have package.json in lib/ folder, but we don't. I will change this changeset to export new type.

@AlbinaBlazhko17 AlbinaBlazhko17 added the snapshot Create experimental release PR label Mar 30, 2026
@AlbinaBlazhko17 AlbinaBlazhko17 added snapshot Create experimental release PR and removed snapshot Create experimental release PR labels Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📦 A new experimental 🧪 version v0.0.0-snapshot.1774861593 of Redocly CLI has been published for testing.

Install with NPM:

npm install @redocly/cli@0.0.0-snapshot.1774861593
# or
npm install @redocly/openapi-core@0.0.0-snapshot.1774861593
# or
npm install @redocly/respect-core@0.0.0-snapshot.1774861593

⚠️ Note: This is a development build and may contain unstable features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot Create experimental release PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants