Giter Site home page Giter Site logo

Comments (5)

marijnh avatar marijnh commented on June 3, 2024

Which version of Acorn is this?

from acorn.

ezequielpereira avatar ezequielpereira commented on June 3, 2024

Not sure how to check, but I think it is 8.11.3:

grep version acorn/package.json

  "version": "8.11.3",

from acorn.

marijnh avatar marijnh commented on June 3, 2024

The test you show works fine with 8.11.3 for me.

from acorn.

ezequielpereira avatar ezequielpereira commented on June 3, 2024

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.

marijnh avatar marijnh commented on June 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.