Skip to content

Conversation

fmenezes
Copy link
Collaborator

No description provided.

@fmenezes fmenezes marked this pull request as ready for review April 10, 2025 11:18

const packageMetadata = fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8");
const packageJson = JSON.parse(packageMetadata);
import packageJson from "../package.json" with { type: "json" };
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this work on windows?

Copy link
Collaborator Author

@fmenezes fmenezes Apr 10, 2025

Choose a reason for hiding this comment

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

I haven't tested anything on windows yet, perhaps we should start with integration tests and run them on linux, windows and macos

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added #44

Copy link
Collaborator

@nirinchev nirinchev left a comment

Choose a reason for hiding this comment

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

Looks good - we can look into adding some smoke tests later today or tomorrow.

Copy link
Collaborator

@gagik gagik left a comment

Choose a reason for hiding this comment

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

Nice 🚀 but would be good to add allowSyntheticDefaultImports so we avoid the manual types

@fmenezes fmenezes requested a review from gagik April 10, 2025 11:38
@fmenezes
Copy link
Collaborator Author

Nice 🚀 but would be good to add allowSyntheticDefaultImports so we avoid the manual types

@gagik I've enabled it but in the case of mongodb-redact it does not solve the issue

Copy link
Collaborator

@gagik gagik left a comment

Choose a reason for hiding this comment

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

Oh okay, I suppose they misconfigured something there 🤷

@fmenezes fmenezes merged commit c118770 into main Apr 10, 2025
1 check passed
@fmenezes fmenezes deleted the chore_import_package_json branch April 10, 2025 12:18
nirinchev added a commit that referenced this pull request Apr 10, 2025
* main:
  chore: refactor package.json import (#43)
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.

3 participants