-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Configure bundler settings #36
Conversation
In the future, you may need to switch all packages with private: true to public except root.
Triggered from #36 by @black7375. Checking if we can fast forward Target branch ( commit cc6e3c6cfcee19f7d654b0389ac1e0076fbcfd22 (HEAD -> main, origin/main, origin/HEAD)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Wed Jul 17 15:52:17 2024 +0900
Chore: Console debug package #33 Pull request ( commit 50fdebad5bbb13bb2a2ebe48edbac848d4454164 (pull_request/bundler-setup)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Fri Jul 19 17:07:06 2024 +0900
Clean: Config formatting #35 It is possible to fast forward |
WalkthroughThis update introduces several new configuration files for Visual Studio Code, enhancing the development environment for JavaScript and TypeScript projects. Key additions include recommended extensions for linting and formatting, tailored editor settings, and refined ESLint and TypeScript configurations. These changes simplify setup, improve code quality, and ensure a consistent coding experience across the team. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant VSCode
participant ESLint
participant Prettier
participant BuildSystem
Developer->>VSCode: Open project
VSCode->>ESLint: Check code quality
VSCode->>Prettier: Format code
Developer->>BuildSystem: Run build
BuildSystem->>ESLint: Run linting
BuildSystem->>Prettier: Run formatting
Developer->>BuildSystem: Test changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (31)
- configs/eslint-config-custom/.vscode/extensions.json (1 hunks)
- configs/eslint-config-custom/.vscode/settings.json (1 hunks)
- configs/eslint-config-custom/eslint.config.base.js (1 hunks)
- configs/tsconfig-custom/tsconfig.json (1 hunks)
- configs/vite-config-custom/.vscode/extensions.json (1 hunks)
- configs/vite-config-custom/.vscode/settings.json (1 hunks)
- configs/vite-config-custom/index.d.ts (1 hunks)
- configs/vite-config-custom/index.js (4 hunks)
- configs/vite-config-custom/package.json (1 hunks)
- package.json (1 hunks)
- packages/css-additional-types/package.json (1 hunks)
- packages/css/package.json (2 hunks)
- packages/debug-log/importMeta.d.ts (1 hunks)
- packages/debug-log/package.json (2 hunks)
- packages/debug-log/src/index.ts (1 hunks)
- packages/transform-to-vanilla/package.json (2 hunks)
- packages/transform-to-vanilla/src/transform-keys/at-rules.ts (1 hunks)
- packages/transform-to-vanilla/src/transform-keys/complex-selectors.ts (1 hunks)
- packages/transform-to-vanilla/src/transform-keys/css-var.ts (1 hunks)
- packages/transform-to-vanilla/src/transform-keys/merge-key.ts (1 hunks)
- packages/transform-to-vanilla/src/transform-keys/simple-pseudo-selectors.ts (1 hunks)
- packages/transform-to-vanilla/src/transform-object/index.ts (1 hunks)
- packages/transform-to-vanilla/src/transform-object/rule-context.ts (1 hunks)
- packages/transform-to-vanilla/src/transform-values/css-var.ts (1 hunks)
- packages/transform-to-vanilla/src/transform-values/merge-values.ts (1 hunks)
- packages/transform-to-vanilla/src/transform-values/simply-important.ts (1 hunks)
- packages/transform-to-vanilla/src/transform.ts (1 hunks)
- packages/transform-to-vanilla/src/types/string.ts (1 hunks)
- packages/transform-to-vanilla/src/types/style-rule.ts (1 hunks)
- packages/transform-to-vanilla/src/types/utils.ts (1 hunks)
- turbo.json (2 hunks)
Files skipped from review due to trivial changes (11)
- configs/eslint-config-custom/.vscode/extensions.json
- configs/eslint-config-custom/.vscode/settings.json
- configs/eslint-config-custom/eslint.config.base.js
- configs/tsconfig-custom/tsconfig.json
- configs/vite-config-custom/.vscode/extensions.json
- configs/vite-config-custom/.vscode/settings.json
- packages/css-additional-types/package.json
- packages/debug-log/src/index.ts
- packages/transform-to-vanilla/src/transform-keys/simple-pseudo-selectors.ts
- packages/transform-to-vanilla/src/transform-values/merge-values.ts
- packages/transform-to-vanilla/src/transform.ts
Additional comments not posted (36)
packages/debug-log/importMeta.d.ts (1)
1-3
: LGTM!The interface
ImportMeta
correctly extends theImportMeta
interface with adebugLog
property.configs/vite-config-custom/index.d.ts (1)
4-4
: LGTM!The refinement of the
TInputConfig
type definition to be the first parameter of thedefineConfig
function enhances type safety and clarity.configs/vite-config-custom/package.json (1)
8-13
: LGTM!The additions of the Prettier configuration and the new plugin for externalizing dependencies enhance the project's development setup.
packages/css/package.json (4)
6-6
: LGTM!The change to the
typings
field ensures that TypeScript definitions are correctly referenced for the ES module system.
7-8
: LGTM!The updates to the
main
andmodule
fields ensure compatibility with both CommonJS and ES module systems.
11-18
: LGTM!The updates to the
exports
field improve type definition accessibility for both module systems, providing clearer paths to the respective TypeScript definition files.
26-27
: LGTM!The addition of the
build
andbuild:watch
scripts enhances the development workflow by allowing more streamlined build processes.turbo.json (2)
19-22
: LGTM!The
lint
section now depends on thebuild
task, ensuring that linting cannot commence until the build process is finalized, potentially preventing linting errors from unbuilt code.
41-41
: LGTM!The
test
section now directly depends on thebuild
task, simplifying the dependency resolution and clarifying the task execution order.packages/transform-to-vanilla/package.json (3)
6-6
: LGTM!The change to the
typings
field ensures that TypeScript definitions are correctly referenced for the ES module system.
7-8
: LGTM!The updates to the
main
andmodule
fields ensure compatibility with both CommonJS and ES module systems.
12-17
: LGTM!The updates to the
exports
field improve type definition accessibility for both module systems, providing clearer paths to the respective TypeScript definition files.packages/transform-to-vanilla/src/transform-values/simply-important.ts (1)
11-16
: LGTM! The comments for TypeScript error suppression are appropriate.The comments suppress TypeScript errors related to
import.meta
when compiling to CommonJS, ensuring compatibility with different module systems.packages/debug-log/package.json (5)
7-7
: LGTM! Thetypings
field update is appropriate.The update reflects the new location of the TypeScript typings file, indicating a more organized output structure.
8-8
: LGTM! Themain
field update is appropriate.The update reflects the new location of the CommonJS module entry point, indicating a more organized output structure.
9-9
: LGTM! Themodule
field update is appropriate.The update reflects the new location of the ECMAScript module entry point, indicating a more organized output structure.
13-22
: LGTM! Theexports
field update is appropriate.The update enhances the module's structure and clarity regarding its exports and typings, aligning with best practices for module packaging.
26-26
: LGTM! Thefiles
array update is appropriate.The update ensures that the new
importMeta.d.ts
file is included in the package distribution, aligning with the changes in theexports
field.packages/transform-to-vanilla/src/transform-keys/css-var.ts (1)
21-26
: LGTM! The comments for TypeScript error suppression are appropriate.The comments suppress TypeScript errors related to
import.meta
when compiling to CommonJS, ensuring compatibility with different module systems.packages/transform-to-vanilla/src/transform-keys/complex-selectors.ts (1)
23-29
: LGTM! Ensure the correctness of the testing setup.The comments and conditional setup for
import.meta.vitest
are appropriate for handling TypeScript compilation errors and setting up tests.However, ensure that the testing setup works correctly in the intended environment.
package.json (1)
37-37
: LGTM! Verify the impact of the new dependency.The change from
@mincho/css
to@mincho/debug-log
is approved.However, ensure that the new dependency does not introduce any issues or conflicts.
Verification successful
Verify the impact of the new dependency
@mincho/debug-log
.The change from
@mincho/css
to@mincho/debug-log
is approved. However, ensure that the new dependency does not introduce any issues or conflicts.
Verify the impact of the new dependency
@mincho/debug-log
.The change from
@mincho/css
to@mincho/debug-log
is approved. However, ensure that the new dependency does not introduce any issues or conflicts.
Verification successful. No issues or conflicts found with the new dependency
@mincho/debug-log
.
- The new dependency
@mincho/debug-log
is implemented correctly inconfigs/vite-config-custom/index.js
.- No errors or warnings directly related to
@mincho/debug-log
were found in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the new dependency `@mincho/debug-log`. # Test: Search for the usage of `@mincho/debug-log`. Expect: No issues or conflicts. rg --type js -A 5 $'@mincho/debug-log'Length of output: 459
Script:
#!/bin/bash # Description: Verify the impact of the new dependency `@mincho/debug-log`. # Test: Search for any potential issues or conflicts related to the `@mincho/debug-log` dependency. rg --type js -A 5 'debugLog' | grep -i 'error\|conflict\|issue'Length of output: 63
Script:
#!/bin/bash # Description: Verify the impact of the new dependency `@mincho/debug-log`. # Test: Search for any potential issues, warnings, or related comments in the codebase. rg --type js -i 'error|warn|todo|fixme|debugLog'Length of output: 1175
packages/transform-to-vanilla/src/types/string.ts (1)
28-33
: LGTM! Ensure the correctness of the testing setup.The comments and conditional setup for
import.meta.vitest
are appropriate for handling TypeScript compilation errors and setting up tests.However, ensure that the testing setup works correctly in the intended environment.
packages/transform-to-vanilla/src/transform-keys/merge-key.ts (1)
18-23
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
import.meta.vitest
match the new usage.Verification successful
All function calls to
import.meta.vitest
match the new usage.The code changes are consistent across the codebase and correctly implement the conditional import pattern along with TypeScript error suppression.
packages/transform-to-vanilla/src/transform.ts
packages/transform-to-vanilla/src/types/string.ts
packages/transform-to-vanilla/src/types/utils.ts
packages/transform-to-vanilla/src/types/style-rule.ts
packages/debug-log/src/index.ts
packages/transform-to-vanilla/src/transform-object/index.ts
packages/transform-to-vanilla/src/transform-object/rule-context.ts
packages/transform-to-vanilla/src/transform-keys/css-var.ts
packages/transform-to-vanilla/src/transform-keys/merge-key.ts
packages/transform-to-vanilla/src/transform-keys/at-rules.ts
packages/transform-to-vanilla/src/transform-values/css-var.ts
packages/transform-to-vanilla/src/transform-values/simply-important.ts
packages/transform-to-vanilla/src/transform-keys/complex-selectors.ts
packages/transform-to-vanilla/src/transform-keys/simple-pseudo-selectors.ts
packages/transform-to-vanilla/src/transform-values/merge-values.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `import.meta.vitest` match the new usage. # Test: Search for the function usage. Expect: Only occurrences of the new usage. rg --type ts -A 5 $'import.meta.vitest'Length of output: 15492
configs/vite-config-custom/index.js (7)
1-2
: Add TypeScript checks.Adding TypeScript checks improves type safety and code quality.
3-4
: Import new modules for file management tasks.The imports of
readdirSync
andrenameSync
from thefs
module are necessary for handling file management tasks.
9-9
: ImportModuleKind
from TypeScript.The import of
ModuleKind
from TypeScript is necessary for specifying the module kind in thedts
plugin configuration.
20-25
: Enhance thebuildConfig
function.The reformatting of the
buildConfig
function improves readability.
34-63
: Expand plugin handling and add newdts
plugin configuration.The expanded plugin handling and the new
dts
plugin configuration improve the generation of TypeScript declaration files for both ES and CommonJS formats.
67-94
: Enhance debugging capabilities during testing.The new plugin conditionally adds debug logging functionality based on the presence of specific packages, enhancing debugging capabilities during testing.
102-105
: Update configuration for building the library.The updated configuration specifies distinct output paths for ES and CommonJS formats, improving the structure of the output files.
packages/transform-to-vanilla/src/transform-values/css-var.ts (1)
119-124
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
import.meta.vitest
match the new usage.Verification successful
Verified: All function calls to
import.meta.vitest
match the new usage.The code changes have been consistently applied across the codebase, ensuring compatibility with CommonJS modules and conditional importing of the test framework.
packages/transform-to-vanilla/src/transform.ts
packages/transform-to-vanilla/src/types/style-rule.ts
packages/transform-to-vanilla/src/types/utils.ts
packages/transform-to-vanilla/src/transform-values/merge-values.ts
packages/transform-to-vanilla/src/transform-values/css-var.ts
packages/transform-to-vanilla/src/transform-values/simply-important.ts
packages/transform-to-vanilla/src/types/string.ts
packages/transform-to-vanilla/src/transform-object/index.ts
packages/debug-log/src/index.ts
packages/transform-to-vanilla/src/transform-keys/merge-key.ts
packages/transform-to-vanilla/src/transform-keys/complex-selectors.ts
packages/transform-to-vanilla/src/transform-keys/css-var.ts
packages/transform-to-vanilla/src/transform-object/rule-context.ts
packages/transform-to-vanilla/src/transform-keys/simple-pseudo-selectors.ts
packages/transform-to-vanilla/src/transform-keys/at-rules.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `import.meta.vitest` match the new usage. # Test: Search for the function usage. Expect: Only occurrences of the new usage. rg --type ts -A 5 $'import.meta.vitest'Length of output: 15492
packages/transform-to-vanilla/src/types/utils.ts (1)
65-70
: LGTM! But verify the usage ofimport.meta.vitest
.The comments and conditional checks for
import.meta.vitest
ensure compatibility with different module systems.However, ensure that
import.meta.vitest
is used correctly throughout the codebase.Verification successful
Verified: Correct usage of
import.meta.vitest
The implementation of
import.meta.vitest
is consistent and correctly handled across the codebase, ensuring compatibility with different module systems.
packages/debug-log/src/index.ts
packages/transform-to-vanilla/src/transform.ts
packages/transform-to-vanilla/src/transform-values/simply-important.ts
packages/transform-to-vanilla/src/transform-values/merge-values.ts
packages/transform-to-vanilla/src/transform-values/css-var.ts
packages/transform-to-vanilla/src/types/string.ts
packages/transform-to-vanilla/src/types/utils.ts
packages/transform-to-vanilla/src/types/style-rule.ts
packages/transform-to-vanilla/src/transform-keys/at-rules.ts
packages/transform-to-vanilla/src/transform-object/rule-context.ts
packages/transform-to-vanilla/src/transform-object/index.ts
packages/transform-to-vanilla/src/transform-keys/simple-pseudo-selectors.ts
packages/transform-to-vanilla/src/transform-keys/merge-key.ts
packages/transform-to-vanilla/src/transform-keys/complex-selectors.ts
packages/transform-to-vanilla/src/transform-keys/css-var.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `import.meta.vitest` in the codebase. # Test: Search for the usage of `import.meta.vitest`. Expect: Consistent usage across the codebase. rg --type js --type ts -A 5 $'import.meta.vitest'Length of output: 15840
packages/transform-to-vanilla/src/transform-keys/at-rules.ts (1)
71-76
: LGTM! But verify the usage ofimport.meta.vitest
.The comments and conditional checks for
import.meta.vitest
ensure compatibility with different module systems.However, ensure that
import.meta.vitest
is used correctly throughout the codebase.Verification successful
Verified: Consistent usage of
import.meta.vitest
across the codebase.The usage of
import.meta.vitest
is consistent and follows the same pattern of including TypeScript ignore comments to handle module system restrictions.
packages/transform-to-vanilla/src/types/style-rule.ts
packages/debug-log/src/index.ts
packages/transform-to-vanilla/src/types/string.ts
packages/transform-to-vanilla/src/transform.ts
packages/transform-to-vanilla/src/types/utils.ts
packages/transform-to-vanilla/src/transform-values/simply-important.ts
packages/transform-to-vanilla/src/transform-values/css-var.ts
packages/transform-to-vanilla/src/transform-keys/simple-pseudo-selectors.ts
packages/transform-to-vanilla/src/transform-values/merge-values.ts
packages/transform-to-vanilla/src/transform-keys/merge-key.ts
packages/transform-to-vanilla/src/transform-object/index.ts
packages/transform-to-vanilla/src/transform-keys/complex-selectors.ts
packages/transform-to-vanilla/src/transform-object/rule-context.ts
packages/transform-to-vanilla/src/transform-keys/at-rules.ts
packages/transform-to-vanilla/src/transform-keys/css-var.ts
configs/vite-config-custom/index.js
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `import.meta.vitest` in the codebase. # Test: Search for the usage of `import.meta.vitest`. Expect: Consistent usage across the codebase. rg --type js --type ts -A 5 $'import.meta.vitest'Length of output: 15840
packages/transform-to-vanilla/src/transform-object/rule-context.ts (1)
104-109
: LGTM! But verify the usage ofimport.meta.vitest
.The comments and conditional checks for
import.meta.vitest
ensure compatibility with different module systems.However, ensure that
import.meta.vitest
is used correctly throughout the codebase.Verification successful
Verified: The usage of
import.meta.vitest
is consistent and correct across the codebase.The conditional checks and TypeScript error suppression are consistently applied, ensuring compatibility with different module systems.
packages/debug-log/src/index.ts
packages/transform-to-vanilla/src/transform.ts
packages/transform-to-vanilla/src/types/string.ts
packages/transform-to-vanilla/src/types/utils.ts
packages/transform-to-vanilla/src/transform-values/merge-values.ts
packages/transform-to-vanilla/src/transform-object/rule-context.ts
packages/transform-to-vanilla/src/transform-keys/merge-key.ts
packages/transform-to-vanilla/src/transform-keys/simple-pseudo-selectors.ts
packages/transform-to-vanilla/src/transform-values/css-var.ts
packages/transform-to-vanilla/src/transform-keys/at-rules.ts
packages/transform-to-vanilla/src/transform-object/index.ts
configs/vite-config-custom/index.js
packages/transform-to-vanilla/src/transform-values/simply-important.ts
packages/transform-to-vanilla/src/transform-keys/css-var.ts
packages/transform-to-vanilla/src/transform-keys/complex-selectors.ts
packages/transform-to-vanilla/src/types/style-rule.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `import.meta.vitest` in the codebase. # Test: Search for the usage of `import.meta.vitest`. Expect: Consistent usage across the codebase. rg --type js --type ts -A 5 $'import.meta.vitest'Length of output: 15840
packages/transform-to-vanilla/src/types/style-rule.ts (1)
247-252
: LGTM! But verify the function usage in the codebase.The code changes are approved. The added comments and conditional checks for
import.meta.vitest
are appropriate for ensuring tests run only in the correct environment.However, ensure that all instances of
import.meta.vitest
are correctly used throughout the codebase.Verification successful
All instances of
import.meta.vitest
are correctly used throughout the codebase.The TypeScript error suppression comments are consistently applied, and the usage of
import.meta.vitest
is appropriate in all instances found.
packages/transform-to-vanilla/src/transform-keys/simple-pseudo-selectors.ts
packages/transform-to-vanilla/src/transform.ts
packages/transform-to-vanilla/src/transform-keys/merge-key.ts
packages/transform-to-vanilla/src/transform-values/css-var.ts
packages/transform-to-vanilla/src/transform-keys/complex-selectors.ts
packages/transform-to-vanilla/src/transform-values/simply-important.ts
packages/transform-to-vanilla/src/transform-keys/at-rules.ts
packages/transform-to-vanilla/src/types/style-rule.ts
packages/transform-to-vanilla/src/types/string.ts
packages/transform-to-vanilla/src/transform-keys/css-var.ts
packages/transform-to-vanilla/src/transform-object/rule-context.ts
packages/transform-to-vanilla/src/types/utils.ts
packages/transform-to-vanilla/src/transform-object/index.ts
packages/transform-to-vanilla/src/transform-values/merge-values.ts
packages/debug-log/src/index.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all instances of `import.meta.vitest` in the codebase. # Test: Search for the usage of `import.meta.vitest`. Expect: Correct usage in all instances. rg --type ts -A 5 $'import.meta.vitest'Length of output: 15492
packages/transform-to-vanilla/src/transform-object/index.ts (1)
384-389
: LGTM! But verify the function usage in the codebase.The code changes are approved. The added comments and conditional checks for
import.meta.vitest
are appropriate for ensuring tests run only in the correct environment.However, ensure that all instances of
import.meta.vitest
are correctly used throughout the codebase.Verification successful
LGTM! But verify the function usage in the codebase.
The code changes are approved. The added comments and conditional checks for
import.meta.vitest
are appropriate for ensuring tests run only in the correct environment.However, ensure that all instances of
import.meta.vitest
are correctly used throughout the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all instances of `import.meta.vitest` in the codebase. # Test: Search for the usage of `import.meta.vitest`. Expect: Correct usage in all instances. rg --type ts -A 5 $'import.meta.vitest'Length of output: 15492
/fast-forward |
Triggered from #36 (comment) by @black7375. Trying to fast forward Target branch ( commit cc6e3c6cfcee19f7d654b0389ac1e0076fbcfd22 (HEAD -> main, origin/main, origin/HEAD)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Wed Jul 17 15:52:17 2024 +0900
Chore: Console debug package #33 Pull request ( commit 50fdebad5bbb13bb2a2ebe48edbac848d4454164 (pull_request/bundler-setup)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Fri Jul 19 17:07:06 2024 +0900
Clean: Config formatting #35 Fast forwarding $ git push origin 50fdebad5bbb13bb2a2ebe48edbac848d4454164:main
To https://github.com/mincho-js/mincho.git
cc6e3c6..50fdeba 50fdebad5bbb13bb2a2ebe48edbac848d4454164 -> main |
Description
Implement #35
Resolve various dependency and bundling issues.
I also pluginised to make it easier to use
debugLog
during testing.Summary by CodeRabbit
New Features
@mincho/debug-log
module.Bug Fixes
import.meta
in CommonJS contexts.Chores
package.json
files across multiple packages to streamline development practices.