8000 chore: revert `references` related changes by JounQin · Pull Request #85 · un-ts/lib-boilerplate · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: revert references related changes #85

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

Merged
merged 1 commit into from
May 20, 2025
Merged

chore: revert references related changes #85

merged 1 commit into from
May 20, 2025

Conversation

JounQin
Copy link
Member
@JounQin JounQin commented May 20, 2025

Important

Reverted references related changes by updating TypeScript configurations and scripts in package.json.

  • TypeScript Configuration:
    • Added tsconfig.eslint.json for enhanced TypeScript linting support.
    • Removed tsconfig.lib.json and tsconfig.node.json as they were redundant.
  • Scripts:
    • Updated build:tsc script in package.json to use tsc -p src.
    • Updated lint:tsc script in package.json to use tsconfig.eslint.json.
  • Misc:
    • Changed version in package.json from 0.0.1 to 0.0.0.

This description was created by Ellipsis for ed1aae2. You can customize this summary. It will automatically update as commits are pushed.


Summary by CodeRabbit

  • Chores
    • Updated and simplified TypeScript configuration files for improved maintainability.
    • Removed unused and redundant TypeScript config files.
    • Adjusted build and lint scripts for consistency and clarity.
    • Introduced a new configuration to enhance TypeScript linting support.

@JounQin JounQin requested a review from Copilot May 20, 2025 06:17
@JounQin JounQin self-assigned this May 20, 2025
Copy link
changeset-bot bot commented May 20, 2025

⚠️ No Changeset found

Latest commit: ed1aae2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
coderabbitai bot commented May 20, 2025

Walkthrough

This change refactors the project's TypeScript configuration by deleting legacy config files, simplifying remaining configs, and introducing a dedicated ESLint TypeScript config. The build and lint scripts in package.json are updated to align with the new structure. No exported or public code entities are affected.

Changes

Files/Group Change Summary
package.json Downgraded version, updated TypeScript build and lint scripts to use simplified project references and new ESLint config.
src/tsconfig.json Changed base config extension from a specific file to the parent directory.
test/tsconfig.json Simplified by removing custom options and includes; now only extends the ESLint TypeScript config.
tsconfig.eslint.json Added new config extending base, with path alias for ESLint import resolution.
tsconfig.json Simplified to extend a shared config, removed references and files, added explicit compiler options for rootDir and target.
tsconfig.lib.json, tsconfig.node.json Deleted both files; previously provided library and node-specific TypeScript configurations.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Scripts as NPM Scripts
    participant TS as TypeScript Compiler
    participant ESLint as ESLint

    Dev->>Scripts: Run build
    Scripts->>TS: tsc -p src
    TS-->>Scripts: Compile using new base config

    Dev->>Scripts: Run lint
    Scripts->>ESLint: tsc -p tsconfig.eslint.json --noEmit
    ESLint-->>Scripts: Type-check with ESLint config
Loading

Poem

In the warren, configs trimmed and neat,
Old files hop away, new ones take their seat.
Scripts now simpler, less to debug,
ESLint finds imports, warm and snug.
With every hop, the code grows light—
A rabbit’s joy in configs done right! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 11a89c6 and ed1aae2.

📒 Files selected for processing (7)
  • package.json (3 hunks)
  • src/tsconfig.json (1 hunks)
  • test/tsconfig.json (1 hunks)
  • tsconfig.eslint.json (1 hunks)
  • tsconfig.json (1 hunks)
  • tsconfig.lib.json (0 hunks)
  • tsconfig.node.json (0 hunks)
💤 Files with no reviewable changes (2)
  • tsconfig.node.json
  • tsconfig.lib.json
🚧 Files skipped from review as they are similar to previous changes (4)
  • package.json
  • tsconfig.json
  • src/tsconfig.json
  • test/tsconfig.json
🧰 Additional context used
🪛 Biome (1.9.4)
tsconfig.eslint.json

[error] 2-2: Expected a property but instead found '// dominikg/tsconfck#220'.

Expected a property here.

(parse)


[error] 3-3: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 3-3: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 3-3: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 3-3: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)

8000

[error] 4-4: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 4-4: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 4-8: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 8-9: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 22 on windows-latest
  • GitHub Check: Lint and Test with Node.js 22 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 on windows-latest
🔇 Additional comments (2)
tsconfig.eslint.json (2)

2-2: Inline comments are supported in tsconfig files.
This comment referencing the tsconfck issue is valid because TypeScript config files allow JSONC (comments). No action required.

🧰 Tools
🪛 Biome (1.9.4)

[error] 2-2: Expected a property but instead found '// dominikg/tsconfck#220'.

Expected a property here.

(parse)


3-3: Extending the base configuration.
Extending ./tsconfig.json ensures this ESLint config inherits the project’s core TypeScript settings. Confirm that tsconfig.json exists at the expected path and contains the shared compiler options.

🧰 Tools
🪛 Biome (1.9.4)

[error] 3-3: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 3-3: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 3-3: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 3-3: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Reverting recent references changes by removing outdated tsconfig configurations and updating other configuration files to reflect the intended project setup. Key changes include:

  • Removal of tsconfig.node.json and tsconfig.lib.json, reverting previous changes.
  • Introduction of a new tsconfig.eslint.json and updating configuration extends in test/tsconfig.json and src/tsconfig.json.
  • Adjustment of build and lint scripts alongside version number changes in package.json.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.node.json Removed the node-specific tsconfig revert.
tsconfig.lib.json Removed the library tsconfig revert.
tsconfig.eslint.json Added a new eslint tsconfig file to support linting configurations.
test/tsconfig.json Updated to extend the new tsconfig.eslint.json.
src/tsconfig.json Modified the extends value; verify it references the correct config.
package.json Adjusted version and updated build scripts to match the revert.
Comments suppressed due to low confidence (2)

src/tsconfig.json:2

  • The new extends path ".." in src/tsconfig.json is ambiguous; please confirm that it accurately references the desired configuration file.
  "extends": "..",

package.json:3

  • The version downgrade from "0.0.1" to "0.0.0" may be unintentional; please verify that this change was deliberate.
  "version": "0.0.0",

Copy link
codesandbox-ci bot commented May 20, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
pkg-pr-new bot commented May 20, 2025

Open in StackBlitz

npm i https://pkg.pr.new/lib-boilerplate@85

commit: ed1aae2

Copy link
Contributor
github-actions bot commented May 20, 2025

size-limit report 📦

Path Size
lib/index.js 39 B (0%)

Copy link
Contributor
github-actions bot commented May 20, 2025

Deploy preview for lib-boilerplate ready!

✅ Preview
https://lib-boilerplate-8hx66n7ti-1stg.vercel.app

Built with commit ed1aae2.
This pull request is being automatically deployed with vercel-action

Copy link
Contributor
github-actions bot commented May 20, 2025

📊 Package size report   -0.04%↓

File Before After
package.json 3.4 kB -0.12%↓3.4 kB
Total (Includes all files) 9.7 kB -0.04%↓9.7 kB
Tarball size 3.6 kB -0.14%↓3.6 kB
Unchanged files
File Size
lib/index.cjs 104 B
lib/index.d.cts 99 B
lib/index.d.ts 40 B
lib/index.js 95 B
lib/index.js.map 163 B
LICENSE 1.1 kB
README.md 4.7 kB

🤖 This report was automatically generated by pkg-size-action

Copy link
@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 11a89c6 in 1 minute and 41 seconds. Click for details.
  • Reviewed 71 lines of code in 4 files
  • Skipped 3 files when reviewing.
  • Skipped posting 7 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. package.json:3
  • Draft comment:
    Version changed to 0.0.0; confirm that this reversion is intentional.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
2. package.json:35
  • Draft comment:
    build:tsc now uses 'tsc -p src' instead of 'tsc -b'; ensure removing project references is expected.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. package.json:36
  • Draft comment:
    build:tsdown removed the '--tsconfig' flag; verify that the default tsconfig is applied correctly.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to verify that the default tsconfig is applied correctly after a flag was removed. This falls under asking the author to ensure behavior is intended or to double-check something, which is against the rules.
4. package.json:44
  • Draft comment:
    lint:tsc now uses 'tsc -p tsconfig.eslint.json --noEmit'; confirm the lint configuration remains accurate.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm the accuracy of the lint configuration after a change. This falls under the rule of not asking the author to confirm their intention or ensure behavior is intended. Therefore, this comment should be removed.
5. tsconfig.eslint.json:1
  • Draft comment:
    New tsconfig.eslint.json added; ensure that extending '.' provides the intended base TS settings.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to ensure that the new tsconfig.eslint.json file is extending the intended base TypeScript settings. This falls under asking the author to confirm their intention, which is against the rules.
6. tsconfig.lib.json:1
  • Draft comment:
    Deleted tsconfig.lib.json; verify that its removal does not impact any build or type-checking processes.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. tsconfig.node.json:1
  • Draft comment:
    Deleted tsconfig.node.json; confirm that node-specific TypeScript settings are no longer needed.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_1bObqzMHnPDMP6gq

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
@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

🧹 Nitpick comments (4)
tsconfig.eslint.json (1)

2-3: Prefer explicit file reference in extends.

Using "extends": "." relies on implicit directory resolution. For clarity and to avoid confusion, change it to point directly at your root tsconfig file.

- "extends": ".",
+ "extends": "./tsconfig.json",
test/tsconfig.json (1)

2-2: Specify the .json extension in extends.

While TypeScript can resolve extends: "../tsconfig.eslint", including the file extension improves readability and tool compatibility.

- "extends": "../tsconfig.eslint"
+ "extends": "../tsconfig.eslint.json"
src/tsconfig.json (1)

8-9: Refine the include pattern.

Using "include": [".""] may pull in non-TypeScript assets. To explicitly target source files, consider:

- "include": ["."]
+ "include": ["**/*"]
package.json (1)

46-46: Scope linting to source and test files.

Running tsc -p tsconfig.eslint.json --noEmit will, by default, include all TS files (including generated lib). To avoid type-checking artifacts, consider adding an "exclude": ["lib"] or defining an explicit "include" in tsconfig.eslint.json.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between e43572e and 11a89c6.

📒 Files selected for processing (7)
  • package.json (3 hunks)
  • src/tsconfig.json (1 hunks)
  • test/tsconfig.json (1 hunks)
  • tsconfig.eslint.json (1 hunks)
  • tsconfig.json (1 hunks)
  • tsconfig.lib.json (0 hunks)
  • tsconfig.node.json (0 hunks)
💤 Files with no reviewable changes (2)
  • tsconfig.node.json
  • tsconfig.lib.json
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 22 on windows-latest
  • GitHub Check: Lint and Test with Node.js 20 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 on windows-latest
🔇 Additional comments (4)
src/tsconfig.json (1)

2-7: Re-evaluate composite and project references.

You've enabled "composite": true in src/tsconfig.json but removed all "references" from the root config. If you intend to leverage TypeScript project references for incremental and cross-project builds, you'll need to re-add:

"references": [
  { "path": "./src" },
  { "path": "./test" }
]

Otherwise, if you’re building src in isolation, consider disabling "composite" to simplify the configuration.

package.json (2)

3-3: Confirm version bump strategy.

Setting "version": "0.0.0" is unusual for a published package. Ensure this aligns with your Changesets or release process, where the placeholder is auto-replaced before publishing.


36-38: Validate TypeScript build outputs.

Switching to tsc -p src relies on src/tsconfig.json emitting declarations via "composite": true. Confirm that tsc -p src produces both .js and .d.ts files in lib/ without overlap or conflicts with tsdown.

tsconfig.json (1)

2-7: Verify removal of project references.

The root config now extends @1stg/tsconfig/node16 and omits all "references". If you still need project references for composite compilation across src and test, re-add them:

"references": [
  { "path": "./src" },
  { "path": "./test" }
]

Otherwise, confirm that you intend to compile each subproject separately.

@JounQin JounQin force-pushed the chore/references branch from 11a89c6 to ed1aae2 Compare May 20, 2025 06:29
Copy link
codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e43572e) to head (ed1aae2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #85   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            3         3           
  Branches         1         1           
=========================================
  Hits             3         3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed ed1aae2 in 46 seconds. Click for details.
  • Reviewed 68 lines of code in 4 files
  • Skipped 3 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. package.json:3
  • Draft comment:
    Confirm intentional version reset to '0.0.0'.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. package.json:36
  • Draft comment:
    Verify 'tsc -p src' is the desired build config after reverting project references.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. package.json:37
  • Draft comment:
    Ensure removal of '--tsconfig' from tsdown script is intended and defaults are correct.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. package.json:46
  • Draft comment:
    Check that linting with tsconfig.eslint.json preserves expected type-check behavior.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. tsconfig.eslint.json:2
  • Draft comment:
    Ensure JSON comment is supported by all tooling; tsconfig files allow comments but verify ESLint integration.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_fXJ2Vyonotty5HRY

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@JounQin JounQin merged commit 124afa6 into main May 20, 2025
37 checks passed
@JounQin JounQin deleted the chore/references branch May 20, 2025 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0