Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.
Open
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
2 changes: 1 addition & 1 deletion bin/esparse.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var fs, esprima, fname, content, options, syntax;

if (typeof require === 'function') {
fs = require('fs');
esprima = require('esprima');
esprima = require('esprima-fb');
} else if (typeof load === 'function') {
try {
load('esprima.js');
Expand Down
2 changes: 1 addition & 1 deletion bin/esvalidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if (typeof esprima === 'undefined') {
esprima = require('./esprima');
} else if (typeof require === 'function') {
fs = require('fs');
esprima = require('esprima');
esprima = require('esprima-fb');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine. Though actually I think upstream should make this require relative (require('../esprima')) and then we wouldn't need to be different. I don't know what the Right Thing™ is though.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I think using a relative require makes sense... Want to send such a pull request upstream? Then we can just sync it down.

(Feel free to leave this one open in case they point out a good reason for doing it this way...)

} else if (typeof load === 'function') {
try {
load('esprima.js');
Expand Down