ChakraCore
ChakraCore copied to clipboard
chakarcore have not implement some es6 syntax
Chakracore can't support some important nodejs module, like 'commonmark' and 'graphql'
var reLinkLabel = /^[(?:[^\[]]|\.){0,1000}]/s; JavaScript failed to compile. SyntaxError: Syntax error in regular expression function KnownArgumentNamesRule(context) { return { // eslint-disable-next-line new-cap ...KnownArgumentNamesOnDirectivesRule(context), <----- syntax error
Argument(argNode) {
const argDef = context.getArgument();
const fieldDef = context.getFieldDef();
const parentType = context.getParentType();
if (!argDef && fieldDef && parentType) {
const argName = argNode.name.value;
const knownArgsNames = fieldDef.args.map((arg) => arg.name);
const suggestions = (0, _suggestionList.suggestionList)(
argName,
knownArgsNames,
);
context.reportError(
new _GraphQLError.GraphQLError(
`Unknown argument "${argName}" on field "${parentType.name}.${fieldDef.name}".` +
(0, _didYouMean.didYouMean)(suggestions),
argNode,
),
);
}
},
}; }
it seems that chakracore can't support some es6 syntax, and I can't find some test example in chakracore\test,there's only example about spread syntax for array
The s flag is the dotAll flag, and isn’t in ES6/ES2015 - it’s in ES2018.
The s flag is the dotAll flag, and isn’t in ES6/ES2015 - it’s in ES2018.
Can chakracore support it? How can I do? and the spread syntax let objClone = { ...obj } ? also new in ES2018
I'm using the chakracore.dll v1.11.24.0
{ ...obj } is enabled by default in master. It's not present in any released version.
{ ...obj } is enabled by default in master. It's not present in any released version.
thank you, I build the latest version, get a new chakracore.dll v1.13, problem resolved.
The s flag is the dotAll flag, and isn’t in ES6/ES2015 - it’s in ES2018.
The s
flag is also enabled by default in master.
As a side note, see https://github.com/chakra-core/org/blob/master/tc39%20Proposals.md for status on implementing recent Javascript features.
Sorry that we're running a bit behind, chakracore is now volunteer maintained and our available time is rather limited.