Skip to content

Remove skipLibCheck#8019

Merged
ardatan merged 7 commits intomasterfrom
remove-skip-lib-check
Mar 6, 2026
Merged

Remove skipLibCheck#8019
ardatan merged 7 commits intomasterfrom
remove-skip-lib-check

Conversation

@ardatan
Copy link
Copy Markdown
Owner

@ardatan ardatan commented Mar 6, 2026

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 6, 2026

🦋 Changeset detected

Latest commit: 93160e6

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

This PR includes changesets to release 3 packages
Name Type
@graphql-tools/import Patch
@graphql-tools/graphql-file-loader Patch
@graphql-tools/node-require 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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 6, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c60fafdc-b2bd-4ed0-bfd7-f8d5db55720f

📥 Commits

Reviewing files that changed from the base of the PR and between ab3ee7d and 93160e6.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • packages/import/src/link/link.ts
  • packages/schema/tests/schemaGenerator.test.ts
  • packages/utils/tests/print-schema-with-directives.spec.ts

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added federation link parsing and utilities for resolving and version-checking linked GraphQL imports.
  • Chores

    • Enabled stricter TypeScript library declaration checks.
    • Added lru-cache as a dev dependency and broadened lint-staged patterns; updated postinstall script.
    • Replaced an external federation dependency with an internal implementation.
    • Added a small maintenance script to correct upstream package typings.
    • Applied multiple upstream TypeScript typing patches.
  • Tests

    • Converted a few test imports to dynamic runtime requires.

Walkthrough

Removed tsconfig skipLibCheck; added lru-cache devDependency and postinstall script change; removed global Reducer/Array reduce typings; added several vendor typing patches; introduced local federation link implementation under packages/import with multiple new modules; added scripts/fix-astrojs-typings.js.

Changes

Cohort / File(s) Summary
TypeScript config
tsconfig.json
Removed "skipLibCheck": true from compilerOptions.
Root package manifest & scripts
package.json
Updated postinstall to run node scripts/fix-astrojs-typings.js; added devDependency lru-cache@10.4.3; broadened lint-staged glob to include .js.
Local global declarations
packages/utils/src/declarations.d.ts
Removed ambient Reducer type and Array/ReadonlyArray reduce augmentations; kept declare module 'graphql-upload/*.mjs'.
Maintenance script
scripts/fix-astrojs-typings.js
New script that updates node_modules/@astrojs/compiler/package.json to set types to ./dist/node/index.d.ts.
Federation link feature
packages/import/src/index.ts, packages/import/src/link/...
packages/import/src/link/index.ts, packages/import/src/link.ts, packages/import/src/link/link-url.ts, packages/import/src/link/link-import.ts
Replaced external @theguild/federation-composition usage with a local implementation: new exports (FEDERATION_V1, LinkVersion), classes FederatedLink/FederatedLinkUrl/FederatedLinkImport, and extractLinkImplementations for parsing @link/@core typedefs, resolving import names, and version matching.
Package dependency & changeset
packages/import/package.json, .changeset/@graphql-tools_import-8019-dependencies.md
Removed dependency @theguild/federation-composition; added a changeset entry.
Third‑party typing patches
patches/*, node_modules/...
Applied typing patches: MDX typings import JSX; lru-cache typings remove implements Map<K,V>; graphql.web typings replace Const*Node with non-Const variants; graphql-ws typings change WebSocketServer to import('ws').Server.
Tests (dynamic imports)
packages/schema/tests/schemaGenerator.test.ts, packages/utils/tests/print-schema-with-directives.spec.ts
Moved top-level graphql-scalars imports into test scope using dynamic require within specific tests.

Sequence Diagram(s)

sequenceDiagram
    participant Consumer
    participant Extractor as extractLinkImplementations
    participant FederatedLink
    participant LinkUrl as FederatedLinkUrl
    participant LinkImport as FederatedLinkImport

    Consumer->>Extractor: provide typeDefs (DocumentNode)
    Extractor->>FederatedLink: FederatedLink.fromTypedefs(typeDefs)
    FederatedLink->>LinkUrl: FederatedLinkUrl.fromUrl(...)
    FederatedLink->>LinkImport: FederatedLinkImport.fromTypedefs(...)
    Extractor-->>Consumer: return { links, resolveImportName, matchesImplementation }
    Consumer->>Extractor: resolveImportName(identity, name)
    Extractor-->>FederatedLink: lookup identity -> resolveImportName(name)
    Consumer->>Extractor: matchesImplementation(identity, version)
    Extractor-->>LinkUrl: supports(version) -> boolean
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • enisdenjo
  • n1ru4l

Poem

🐰 I hopped through types and stitched a patch,
I chased the links and mapped each match.
I nudged the scripts to point the way,
Tidied typings and brought new play.
A little rabbit’s work — hooray! 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning No description was provided by the author, making it impossible to evaluate whether it relates to the changeset. Add a description explaining the motivation for removing skipLibCheck and how the subsequent changes (patches, scripts, and dependencies) address any resulting type-checking issues.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Remove skipLibCheck' directly and specifically identifies the main change visible in the changeset—the removal of the skipLibCheck entry from tsconfig.json.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-skip-lib-check

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/fix-astrojs-typings.js`:
- Around line 1-13: Wrap the file read/write logic in a try-catch (or check
existence with fs.existsSync) so the script does not crash when
`@astrojs/compiler` is missing: before calling readFileSync on filePath
(constructed via __dirname and join) verify the file exists or catch errors
around readFileSync/JSON.parse, log a helpful message and exit gracefully;
similarly wrap writeFileSync and ensure pkg.types is set on the parsed pkg
object before writing, and write JSON with a trailing newline (e.g.,
JSON.stringify(pkg, null, 2) + '\n') to filePath to ensure POSIX newline at EOF.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 20596fec-2830-47fb-aad2-ab3f327ff4f5

📥 Commits

Reviewing files that changed from the base of the PR and between 1f5d175 and 52380e5.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • package.json
  • packages/utils/src/declarations.d.ts
  • patches/@types+mdx+2.0.13.patch
  • patches/lru-cache+10.4.3.patch
  • scripts/fix-astrojs-typings.js
💤 Files with no reviewable changes (1)
  • packages/utils/src/declarations.d.ts
✅ Files skipped from review due to trivial changes (1)
  • package.json

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 6, 2026

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-tools/import 7.1.12-alpha-20260306141335-93160e66c86b26eb95150a3fe8f5a823401eb925 npm ↗︎ unpkg ↗︎
@graphql-tools/graphql-file-loader 8.1.12-alpha-20260306141335-93160e66c86b26eb95150a3fe8f5a823401eb925 npm ↗︎ unpkg ↗︎
@graphql-tools/node-require 7.0.37-alpha-20260306141335-93160e66c86b26eb95150a3fe8f5a823401eb925 npm ↗︎ unpkg ↗︎

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 6, 2026

💻 Website Preview

The latest changes are available as preview in: https://pr-8019.graphql-tools.pages.dev

@ardatan ardatan merged commit 5d6bcc4 into master Mar 6, 2026
3 of 4 checks passed
@ardatan ardatan deleted the remove-skip-lib-check branch March 6, 2026 14:12
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