Comments (5)
Which version of Acorn is this?
from acorn.
Not sure how to check, but I think it is 8.11.3
:
grep version acorn/package.json
"version": "8.11.3",
from acorn.
The test you show works fine with 8.11.3 for me.
from acorn.
Very weird then, I managed to reproduce both in a VM and with docker by running:
docker run --rm -it --net=host node:latest /bin/bash -c '
set -x
git clone https://github.com/acornjs/acorn.git
cd acorn
npm install
echo "a ?? b" | node_modules/acorn/bin/acorn --ecma11
'
Which outputs:
+ git clone https://github.com/acornjs/acorn.git
Cloning into 'acorn'...
remote: Enumerating objects: 8220, done.
remote: Counting objects: 100% (1409/1409), done.
remote: Compressing objects: 100% (546/546), done.
remote: Total 8220 (delta 1010), reused 1078 (delta 840), pack-reused 6811
Receiving objects: 100% (8220/8220), 6.15 MiB | 838.00 KiB/s, done.
Resolving deltas: 100% (5959/5959), done.
+ cd acorn
+ npm install
npm WARN skipping integrity check for git dependency ssh://[email protected]/tc39/test262.git
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated [email protected]: This is probably built in to whatever tool you're using. If you still need it... idk
> prepare
> npm run test
> pretest
> npm run build:main && npm run build:loose
> build:main
> rollup -c acorn/rollup.config.mjs
acorn/src/index.js → acorn/dist/acorn.js, acorn/dist/acorn.mjs...
created acorn/dist/acorn.js, acorn/dist/acorn.mjs in 479ms
acorn/src/bin/acorn.js → acorn/dist/bin.js...
created acorn/dist/bin.js in 14ms
> build:loose
> rollup -c acorn-loose/rollup.config.mjs
acorn-loose/src/index.js → acorn-loose/dist/acorn-loose.js, acorn-loose/dist/acorn-loose.mjs...
created acorn-loose/dist/acorn-loose.js, acorn-loose/dist/acorn-loose.mjs in 210ms
> test
> node test/run.js && npm run lint
Errors
Normal
Loose
Stats
Normal parser: 3332 tests run in 111ms; all passed.
Loose parser: 3309 tests run in 75ms; all passed.
Total: 6641 tests run in 186ms; all passed.
> lint
> eslint .
added 237 packages, and audited 238 packages in 3m
89 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm notice
npm notice New minor version of npm available! 10.2.4 -> 10.4.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.4.0
npm notice Run npm install -g [email protected] to update!
npm notice
+ echo 'a ?? b'
+ node_modules/acorn/bin/acorn --ecma11
Unexpected token (1:3)
from acorn.
You're building acorn but then running the acorn binary from node_modules
. What does grep version node_modules/acorn/package.json
give you? What if you run ./bin/acorn
instead of that version?
from acorn.
Related Issues (20)
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, HOT 1
- Current version of ESLint falls apart HOT 6
- acorn 8.11.x breaks Storybook for all Webpack5-based projects HOT 13
- RangeError: Maximum call stack size exceeded HOT 1
- `import` in `import.meta` is tokenized as an identifier and not a keyword HOT 2
- acorn run fails, complaining about a DNS not resolving for beta.acorn.io HOT 1
- link in codebase giving 404
- http://maps.apple.com/?ll=42.488356,-73.246869&q=42.488356,-73.246869
- Latest release is missing type definitions HOT 4
- [Question] How to replace a node in the AST? HOT 2
- Hide `start` and `end` props HOT 1
- Question: Are there in-depth examples of plugins? HOT 2
- Missing Fields in Acorn's TypeScript Node Type Definitions HOT 3
- AggregateType is incomplete in latest acorn-walk published version: 8.3.0 HOT 1
- some loc.start was undefined in acorn v8.11.2 HOT 1
- `import()` was parsed to Identifier HOT 1
- Token registration across plugins [WFC] HOT 2
- Unexpected parsing behavior after upgrading Acorn from v8.9.0 to v8.11.3 HOT 1
- Incorrect line calculation after invalid escape sequence in tagged template HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acorn.