Closed jeremybanka closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
atom-io-fyi | โ Ready (Inspect) | Visit Preview | ๐ฌ Add feedback | Jul 4, 2024 9:19pm |
wayfarer-quest | โ Ready (Inspect) | Visit Preview | ๐ฌ Add feedback | Jul 4, 2024 9:19pm |
Latest commit: 9f9cf137f052770e05e415f91f1aae5d49e98869
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.
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
โฑ๏ธ Estimated effort to review: 4 ๐ต๐ต๐ต๐ตโช |
๐งช No relevant tests |
๐ No security concerns identified |
โก Key issues to review **Possible Bug:** The PR removes all references to the `dist` directory and replaces them with `src`. This could lead to issues where the production build expects compiled files which are typically in `dist`. Ensure that the build and deployment processes are updated to handle source files directly if that is the intent. **Refactoring Scope:** The removal of multiple `tsup.config.ts` files suggests a significant change in how builds are managed. It's crucial to verify that the remaining build configurations cover all necessary cases previously handled by the individual configurations. **Dependency Management:** The removal of `tsconfig.prod.json` and changes in package.json files across multiple packages could affect the project's dependency resolution and build process. Thorough testing is needed to ensure that these changes do not break the dependency tree and module resolution. |
Category | Suggestion | Score |
Best practice |
Correct the 'types' field to point to a TypeScript declaration file___ **Ensure that the 'types' field points to a TypeScript declaration file (.d.ts ) instead of a TypeScript source file to adhere to common practices and improve tooling support.** [packages/atom.io/__scripts__/define-submodule-manifests.ts [124-127]](https://github.com/jeremybanka/wayforge/pull/2217/files#diff-c5a355888daa04ac0caeaef95c65d849be9cf837cc5728429b03f6821b264ad1R124-R127) ```diff ".": { import: `./src/index.ts`, - types: `./src/index.ts`, + types: `./src/index.d.ts`, # Corrected to point to a declaration file } ``` Suggestion importance[1-10]: 10Why: Pointing the 'types' field to a TypeScript declaration file is a best practice that enhances tooling support and is crucial for proper type checking. The suggestion is correct and highly beneficial. | 10 |
Possible issue |
Correct the file extension for TypeScript type definitions___ **The 'types' field should point to a TypeScript declaration file (typically .d.ts) insteadof a TypeScript source file. This change ensures that the package correctly exposes type definitions.** [packages/atom.io/realtime-react/package.json [9]](https://github.com/jeremybanka/wayforge/pull/2217/files#diff-a293cd3e82a5cbf44269bbc59bc0a9ec37ac91b85d9911881ee1e7c7343e8e98R9-R9) ```diff -"types": "./src/index.ts" +"types": "./src/index.d.ts" ``` Suggestion importance[1-10]: 10Why: The suggestion correctly identifies that the 'types' field should point to a TypeScript declaration file (.d.ts) instead of a TypeScript source file (.ts), which is crucial for proper type definition exposure in the package. | 10 |
Enhancement |
Add a 'require' field to the main package export for CommonJS compatibility___ **Consider adding a 'require' field for the main package export to ensure compatibility withCommonJS modules, similar to how it's defined for the 'eslint-plugin' submodule.** [packages/atom.io/__scripts__/define-package-exports.ts [42-45]](https://github.com/jeremybanka/wayforge/pull/2217/files#diff-a2b71d0532fdf8770a1d33c61472b67fe0c35c2aa3071ba4593ec9a0b9bf8c49R42-R45) ```diff ".": { types: `./src/index.ts`, import: `./src/index.ts`, + require: `./src/index.cjs`, # Assuming a compiled CommonJS entry exists } ``` Suggestion importance[1-10]: 9Why: This suggestion improves compatibility with CommonJS modules, which is important for broader usage and integration. The suggestion is accurate and contextually appropriate. | 9 |
Add a 'types' field to the 'eslint-plugin' submodule export___ **For the 'eslint-plugin' submodule, add a 'types' field to specify the TypeScriptdeclaration file, enhancing editor support and type checking for users of the package.** [packages/atom.io/__scripts__/define-package-exports.ts [154-157]](https://github.com/jeremybanka/wayforge/pull/2217/files#diff-a2b71d0532fdf8770a1d33c61472b67fe0c35c2aa3071ba4593ec9a0b9bf8c49R154-R157) ```diff "./eslint-plugin": { import: `./eslint-plugin/dist/index.js`, require: `./eslint-plugin/dist/index.cjs`, + types: `./eslint-plugin/dist/index.d.ts`, # Added types field } ``` Suggestion importance[1-10]: 8Why: Adding a 'types' field improves editor support and type checking for users. This is a valuable enhancement, though not as critical as the previous suggestions. | 8 | |
Maintainability |
Refactor the conditional logic in the reduce function for clarity and maintainability___ **Refactor the conditional structure inside the reduce function for better readability andmaintainability by separating the condition into a more explicit block.** [packages/atom.io/__scripts__/define-package-exports.ts [48-57]](https://github.com/jeremybanka/wayforge/pull/2217/files#diff-a2b71d0532fdf8770a1d33c61472b67fe0c35c2aa3071ba4593ec9a0b9bf8c49R48-R57) ```diff -if (folder === `eslint-plugin`) { - acc[`./${folder}`] = { - import: `./${folder}/dist/index.js`, - require: `./${folder}/dist/index.cjs`, - } -} else { - acc[`./${folder}`] = { - types: `./${folder}/src/index.ts`, - import: `./${folder}/src/index.ts`, - } -} +acc[`./${folder}`] = folder === `eslint-plugin` + ? { + import: `./${folder}/dist/index.js`, + require: `./${folder}/dist/index.cjs`, + } + : { + types: `./${folder}/src/index.ts`, + import: `./${folder}/src/index.ts`, + }; ``` Suggestion importance[1-10]: 7Why: The refactoring improves code readability and maintainability, which is beneficial for future development. However, it is a minor enhancement compared to the functional improvements suggested earlier. | 7 |
PR Type
enhancement, configuration changes, dependencies
Description
define-integration-scope.ts
script.src
instead ofdist
.tsup.config.ts
files for various packages.tsup.config.ts
to usesrc
instead ofdist
.tsconfig.prod.json
and updatedvitest.config.ts
to use only development tsconfig.package.json
files to usesrc
instead ofdist
and removed individual build scripts for submodules.Changes walkthrough ๐
5 files
define-integration-scope.ts
Remove `define-integration-scope.ts` script.
packages/atom.io/__scripts__/define-integration-scope.ts - Removed the entire file.
define-package-exports.ts
Update package exports to use `src` instead of `dist`.
packages/atom.io/__scripts__/define-package-exports.ts
files
andexports
fields to usesrc
instead ofdist
.eslint-plugin
submodule.define-submodule-manifests.ts
Update submodule manifests to use `src` instead of `dist`.
packages/atom.io/__scripts__/define-submodule-manifests.ts
src
instead ofdist
.eslint-plugin
submodule.manifest-build.node.ts
Remove `define-integration-scope` from build manifest script.
packages/atom.io/__scripts__/manifest-build.node.ts - Removed import and usage of `define-integration-scope`.
manifest-test.node.ts
Remove `define-integration-scope` from test manifest script.
packages/atom.io/__scripts__/manifest-test.node.ts - Removed import and usage of `define-integration-scope`.
33 files
tsup.config.ts
Remove `tsup.config.ts` for data package.
packages/atom.io/data/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for ephemeral package.
packages/atom.io/ephemeral/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for eslint-plugin package.
packages/atom.io/eslint-plugin/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for immortal package.
packages/atom.io/immortal/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for internal package.
packages/atom.io/internal/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for introspection package.
packages/atom.io/introspection/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for react-devtools package.
packages/atom.io/react-devtools/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for react package.
packages/atom.io/react/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for realtime-client package.
packages/atom.io/realtime-client/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for realtime-react package.
packages/atom.io/realtime-react/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for realtime-server package.
packages/atom.io/realtime-server/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for realtime-testing package.
packages/atom.io/realtime-testing/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for realtime package.
packages/atom.io/realtime/tsup.config.ts - Removed the entire file.
tsup.config.ts
Remove `tsup.config.ts` for transceivers/set-rtx package.
packages/atom.io/transceivers/set-rtx/tsup.config.ts - Removed the entire file.
tsup.config.ts
Update main `tsup.config.ts` to use `src` instead of `dist`.
packages/atom.io/tsup.config.ts
DTS_OPTIONS
configuration.JS_OPTIONS
to usesrc
instead ofdist
.vitest.config.ts
Update `vitest.config.ts` to use only development tsconfig.
packages/atom.io/vitest.config.ts - Removed reference to `tsconfig.prod.json`.
package.json
Update data package.json to use `src` instead of `dist`.
packages/atom.io/data/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update ephemeral package.json to use `src` instead of `dist`.
packages/atom.io/ephemeral/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update eslint-plugin package.json to use `src` instead of `dist`.
packages/atom.io/eslint-plugin/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update immortal package.json to use `src` instead of `dist`.
packages/atom.io/immortal/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update internal package.json to use `src` instead of `dist`.
packages/atom.io/internal/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update introspection package.json to use `src` instead of `dist`.
packages/atom.io/introspection/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update json package.json to use `src` instead of `dist`.
packages/atom.io/json/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update main package.json to use `src` instead of `dist`.
packages/atom.io/package.json
dist
references fromfiles
andexports
fields.main
andexports
fields to usesrc
instead ofdist
.package.json
Update react-devtools package.json to use `src` instead of `dist`.
packages/atom.io/react-devtools/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update react package.json to use `src` instead of `dist`.
packages/atom.io/react/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update realtime-client package.json to use `src` instead of `dist`.
packages/atom.io/realtime-client/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update realtime-react package.json to use `src` instead of `dist`.
packages/atom.io/realtime-react/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update realtime-server package.json to use `src` instead of `dist`.
packages/atom.io/realtime-server/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update realtime-testing package.json to use `src` instead of `dist`.
packages/atom.io/realtime-testing/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update realtime package.json to use `src` instead of `dist`.
packages/atom.io/realtime/package.json
main
andexports
fields to usesrc
instead ofdist
.package.json
Update transceivers/set-rtx package.json to use
src
instead ofdist
.packages/atom.io/transceivers/set-rtx/package.json
main
andexports
fields to usesrc
instead ofdist
.tsconfig.prod.json
Remove `tsconfig.prod.json`.
packages/atom.io/tsconfig.prod.json - Removed the entire file.