Skip to content

Conversation

@Tobbe
Copy link
Member

@Tobbe Tobbe commented Jan 30, 2026

The tsconfig json schema currently doesn't support "module": "Node20", see SchemaStore/schemastore#5326

But even if/when that PR gets merged, the intellisense (hover hints/auto complete) will use "node20". And while not 100% consistent, the tsconfig docs also seems to prefer all-lowercase values, listing "node20" as an allowed value
image
https://www.typescriptlang.org/tsconfig/#module

So this PR switches the "module" value, and a couple of others, to lowercase

@netlify
Copy link

netlify bot commented Jan 30, 2026

Deploy Preview for cedarjs canceled.

Name Link
🔨 Latest commit b19a063
🔍 Latest deploy log https://app.netlify.com/projects/cedarjs/deploys/697cc4dd61c98e00087579d1

@github-actions github-actions bot added this to the next-release-patch milestone Jan 30, 2026
@nx-cloud
Copy link

nx-cloud bot commented Jan 30, 2026

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit b19a063

Command Status Duration Result
nx run-many -t build:pack --exclude create-ceda... ✅ Succeeded 2s View ↗
nx run-many -t build ✅ Succeeded 3m 35s View ↗
nx run-many -t test --minWorkers=1 --maxWorkers=4 ✅ Succeeded 4m 15s View ↗
nx run-many -t test:types ✅ Succeeded 9s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-30 15:14:41 UTC

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 30, 2026

Greptile Overview

Greptile Summary

This PR standardizes TypeScript configuration values to use lowercase, aligning with TypeScript's official documentation and IDE intellisense conventions.

Changes Made

  • Module values: Node20node20, ESNextesnext
  • ModuleResolution values: Node16node16
  • Target values: ES2023es2023
  • Note: "module": "Node16" intentionally remains uppercase (only updated to node20 where applicable)
  • JSON formatting: Added trailing commas throughout for consistency

Files Updated

  • 62 tsconfig.json/jsconfig.json files across the monorepo
  • CLI package handler logic (packageHandler.js)
  • Template files for new package generation
  • Test files and snapshots

Impact

  • Resolves schema validation warnings in IDEs
  • Aligns with TypeScript documentation conventions
  • The packageHandler.js already performs case-insensitive comparison (line 103-104), so existing functionality is preserved
  • All tests updated to expect lowercase values

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The changes are purely stylistic, converting TypeScript configuration values to lowercase to match official conventions. The packageHandler already performs case-insensitive comparisons, all tests pass with updated expectations, and no functional behavior is altered.
  • No files require special attention

Important Files Changed

Filename Overview
packages/cli/src/commands/generate/package/packageHandler.js Updated expectedModule values to lowercase (node20, esnext) to match TypeScript conventions
packages/cli/src/commands/generate/package/tests/package.test.ts Updated test expectations to use lowercase module values, added test for lowercase node16 input
packages/cli/src/commands/generate/package/templates/tsconfig.json.template Changed template to generate lowercase target and module values for new packages
packages/cli/tsconfig.json Changed module and moduleResolution to lowercase, added trailing commas
test-project/api/tsconfig.json Changed target, module, and moduleResolution to lowercase, added trailing commas

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant CLI as Cedar CLI
    participant Handler as packageHandler.js
    participant FS as File System
    participant TS as TypeScript Parser

    Dev->>CLI: Generate new package
    CLI->>Handler: updateTsconfig()
    
    loop For each target (api, web, scripts)
        Handler->>FS: Read tsconfig.json
        FS-->>Handler: Return config text
        Handler->>TS: parseConfigFileTextToJson()
        TS-->>Handler: Parsed config object
        
        alt Has module config
            Handler->>Handler: currentModule.toLowerCase()
            Handler->>Handler: Check if acceptable value
            
            alt Not acceptable
                Handler->>Handler: modify() with lowercase value<br/>(node20, esnext)
                Handler->>FS: Write updated tsconfig
                FS-->>Handler: Success
            else Already acceptable
                Handler->>Handler: Skip update
            end
        else No module config
            Handler->>Handler: Skip tsconfig
        end
    end
    
    Handler-->>CLI: Update complete
    CLI-->>Dev: Package generated with<br/>lowercase module values
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@Tobbe Tobbe merged commit c8a3dad into main Jan 30, 2026
42 checks passed
@Tobbe Tobbe deleted the tobbe-tsconfig-node-lower-case branch January 30, 2026 19:04
@github-actions
Copy link

The changes in this PR are now available in 3.0.0-canary.13306+cdce5184d

Tobbe added a commit that referenced this pull request Feb 2, 2026
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