TypeError: this.input.chunk is not a function #1

Closed
milahu wants to merge 2 commits from bump-deps into main
milahu commented 2022-12-14 15:45:22 +01:00 (Migrated from github.com)

update dependencies
increment version

todo: release to npm

with the latest @lezer/lr the parser throws

TypeError: this.input.chunk is not a function

update dependencies increment version todo: release to npm with the latest `@lezer/lr` the parser throws > TypeError: this.input.chunk is not a function
marijnh commented 2022-12-14 15:50:17 +01:00 (Migrated from github.com)

Could you say a bit more about how that problem occurs and how this PR helps?

Could you say a bit more about how that problem occurs and how this PR helps?
milahu commented 2022-12-14 15:57:18 +01:00 (Migrated from github.com)

package.json of @lezer/cpp 1.0.0 says

{
  "dependencies": {
    "@lezer/highlight": "^1.0.0",
    "@lezer/lr": "^1.0.0"
  },

so npm installs @lezer/lr 1.2.5

pnpm list --depth 10 -r  

dependencies:
@lezer/cpp 1.0.0
├─┬ @lezer/highlight 1.1.3
│ └── @lezer/common 1.0.2
└─┬ @lezer/lr 1.2.5
  └── @lezer/common 1.0.2

but @lezer/cpp 1.0.0 is not compatible with @lezer/lr 1.2.5

package.json of `@lezer/cpp 1.0.0` says ```json { "dependencies": { "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0" }, ``` so npm installs `@lezer/lr 1.2.5` ``` pnpm list --depth 10 -r dependencies: @lezer/cpp 1.0.0 ├─┬ @lezer/highlight 1.1.3 │ └── @lezer/common 1.0.2 └─┬ @lezer/lr 1.2.5 └── @lezer/common 1.0.2 ``` but `@lezer/cpp 1.0.0` is not compatible with `@lezer/lr 1.2.5`
milahu commented 2022-12-14 16:09:01 +01:00 (Migrated from github.com)

aah ... found my error

-  const source = fs.readFileSync(sourcePath)
+  const source = fs.readFileSync(sourcePath, "utf8")
 
 const tree = parser.parse(source)
aah ... found my error ```diff - const source = fs.readFileSync(sourcePath) + const source = fs.readFileSync(sourcePath, "utf8") const tree = parser.parse(source) ```
marijnh commented 2022-12-14 16:27:58 +01:00 (Migrated from github.com)

So can this be closed?

So can this be closed?
milahu commented 2022-12-14 16:32:31 +01:00 (Migrated from github.com)

yes, sorry for the noise .__.

yes, sorry for the noise .__.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/cpp!1
No description provided.