Skip to content

Add version.ts instead of importing package.json in source code #61

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 2 commits into from
May 8, 2025

Conversation

eucyt
Copy link
Contributor

@eucyt eucyt commented May 8, 2025

The with syntax in import pkg from "../package.json" with { type: "json" }; has been available since Node v20.10. On the other hand, the older assert syntax in import pkg from "../package.json" assert { type: "json" }; cannot be used in Node v22 or later. Therefore, there is no way to support both v20.9 and below, and v22 and above at the same time.

Since we want to support both versions in line-bot-mcp-server, we decided to stop importing package.json directly. Instead, version.ts is now used.

The version in version.ts is automatically updated by GitHub Actions at release.

@eucyt eucyt requested a review from a team May 8, 2025 01:55
@eucyt eucyt self-assigned this May 8, 2025
@Yang-33
Copy link
Contributor

Yang-33 commented May 8, 2025

(this should be released)

@eucyt eucyt added this pull request to the merge queue May 8, 2025
Merged via the queue into line:main with commit 015ebea May 8, 2025
5 checks passed
@eucyt eucyt deleted the feature/add-version-ts branch May 8, 2025 08:33
kkdai pushed a commit to kkdai/line-bot-mcp-server that referenced this pull request May 16, 2025
@eucyt eucyt mentioned this pull request May 29, 2025
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.

2 participants