Skip to content
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

feat: peer dep. #4

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: peer dep.
  • Loading branch information
knightedcodemonkey committed Jun 4, 2024
commit 48965e5db06039a4bc0b42cfc8e84dbbb5d46179
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Provides a workaround for [swc/1366](https://github.com/swc-project/swc/issues/1
## Requirements

- Node >= 20.11.0
- `@swc/core` >= 1.5.24 as peer dependency

## Example

Expand All @@ -37,3 +38,8 @@ const ast1 = reparseFileSync('./file.ts')

console.log(ast0.span.start === ast1.span.start) // true
```

## Notes

- To use `reparse` with `@swc/core` as a dependency use the 1.x versions.
- To use `reparse` with `@swc/core` as a peer dependency use the 2.x versions.
25 changes: 19 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@knighted/reparse",
"version": "1.2.0",
"version": "2.0.0",
"description": "Multiple swc parsings of the same file with correct spans.",
"type": "module",
"main": "dist/reparse.js",
Expand Down Expand Up @@ -36,7 +36,7 @@
"parseSync",
"multiple",
"reruns",
"spans"
"correct spans"
],
"files": [
"dist"
Expand All @@ -62,8 +62,8 @@
"typescript": "^5.4.5",
"typescript-eslint": "^8.0.0-alpha.24"
},
"dependencies": {
"@swc/core": "^1.5.24"
"peerDependencies": {
"@swc/core": ">=1.5.24"
},
"prettier": {
"arrowParens": "avoid",
Expand Down