Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

meriyah

Package Overview
Dependencies
Maintainers
1
Versions
917
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meriyah - npm Package Compare versions

Comparing version 0.6.2 to 1.0.0

2

dist/meriyah.d.ts

@@ -6,3 +6,3 @@ import { Options } from './parser';

export declare function parse(source: string, options: Options | void): ESTree.Program;
export declare const version = "0.6.2";
export declare const version = "1.0.0";
//# sourceMappingURL=meriyah.d.ts.map
{
"name": "meriyah",
"version": "0.6.2",
"version": "1.0.0",
"description": "A 100% compliant, self-hosted javascript parser with high focus on both performance and stability",

@@ -5,0 +5,0 @@ "main": "dist/meriyah.umd.js",

@@ -29,5 +29,5 @@ import { ParserState } from './common';

ExpectedToken,
InvalidLHS,
InvalidLHSInAsyncArrow,
InvalidLHSValidRHS,
CantAssignTo,
CantAssignToAsyncArrow,
CantAssignToValidRHS,
SuperNoConstructor,

@@ -47,3 +47,3 @@ InvalidSuperProperty,

RestMissingArg,
InvalidLHSInit,
CantAssignToInit,
InvalidGeneratorGetter,

@@ -80,10 +80,6 @@ InvalidComputedPropName,

InvalidDestructuringTarget,
InvalidRestObjBinding,
RestDefaultInitializer,
NotDestructibeRestArg,
InvalidRestNotLast,
InvalidRestArg,
InvalidRestDefault,
InvalidArrowDefaultYield,
InvalidExprInGroupAssign,
StrictFunction,

@@ -94,3 +90,3 @@ SloppyFunction,

InvalidAwaitIdent,
InvalidLHSInOfForLoop,
CantAssignToInOfForLoop,
InvalidAssignmentInOfForLoop,

@@ -108,3 +104,2 @@ InvalidForAwait,

IllegalReturn,
InvalidForLHSBinding,
InvalidNewTarget,

@@ -122,4 +117,2 @@ InvalidEscapedKeyword,

InvalidImportExportSloppy,
InvalidExportAtTopLevel,
InvalidNestedExport,
UnicodeOverflow,

@@ -129,3 +122,2 @@ InvalidExportImportSource,

InvalidDefaultImport,
NoIdentOrDynamicName,
TrailingDecorators,

@@ -146,3 +138,3 @@ GeneratorConstructor,

InvalidPatternTail,
ForLoopInvalidLHS,
ForLoopCantAssignTo,
AsyncFunctionInSingleStatementContext,

@@ -200,3 +192,3 @@ InvalidTernaryYield,

[Errors.IllegalCaracter]: "Illegal character '%0'",
[Errors.MissingHexDigits]: 'Missing hex digits',
[Errors.MissingHexDigits]: 'Missing hexadecimal digits',
[Errors.InvalidImplicitOctals]: 'Invalid implicit octal',

@@ -206,5 +198,5 @@ [Errors.InvalidStringLT]: 'Invalid line break in string literal',

[Errors.ExpectedToken]: "Expected '%0'",
[Errors.InvalidLHS]: 'Invalid left-hand side in assignment',
[Errors.InvalidLHSInAsyncArrow]: 'Invalid left-hand side in async arrow',
[Errors.InvalidLHSValidRHS]: 'Only the right-hand side is destructible. The left-hand side is invalid',
[Errors.CantAssignTo]: 'Invalid left-hand side in assignment',
[Errors.CantAssignToAsyncArrow]: 'Invalid left-hand side in async arrow',
[Errors.CantAssignToValidRHS]: 'Invalid left-hand side assignment to a destructible right-hand side',
[Errors.SuperNoConstructor]:

@@ -227,3 +219,3 @@ 'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',

[Errors.RestMissingArg]: 'The rest operator is missing an argument',
[Errors.InvalidLHSInit]: 'Cannot assign to lhs, not destructible with this initializer',
[Errors.CantAssignToInit]: 'Cannot assign to lhs, not destructible with this initializer',
[Errors.InvalidGeneratorGetter]: 'A getter cannot be a generator',

@@ -251,3 +243,3 @@ [Errors.InvalidComputedPropName]: 'A computed property name must be followed by a colon or paren',

[Errors.ForInOfLoopMultiBindings]: 'Invalid left-hand side in for-%0 loop: Must have a single binding',
[Errors.ForLoopInvalidLHS]: 'Invalid left-hand side in for-loop',
[Errors.ForLoopCantAssignTo]: 'Invalid left-hand side in for-loop',
[Errors.InvalidShorthandPropInit]: 'Invalid shorthand property initializer',

@@ -263,11 +255,5 @@ [Errors.DuplicateProto]: 'Property name __proto__ appears more than once in object literal',

[Errors.InvalidDestructuringTarget]: 'Invalid destructuring assignment target',
[Errors.InvalidRestObjBinding]:
'The rest argument of an object binding pattern must always be a simple ident and not an array pattern',
[Errors.RestDefaultInitializer]: 'Rest parameter may not have a default initializer',
[Errors.NotDestructibeRestArg]:
'The rest argument was not destructible as it must be last and can not have a trailing comma',
[Errors.InvalidRestNotLast]: 'The rest argument must the be last parameter',
[Errors.InvalidRestArg]: 'Invalid rest argument',
[Errors.InvalidArrowDefaultYield]: 'The arguments of an arrow cannot contain a yield expression in their defaults',
[Errors.InvalidExprInGroupAssign]: 'Cannot assign to list of expressions in a group',
[Errors.StrictFunction]: 'In strict mode code, functions can only be declared at top level or inside a block',

@@ -280,3 +266,3 @@ [Errors.SloppyFunction]:

[Errors.InvalidAwaitIdent]: "'await' may not be used as an identifier in this context",
[Errors.InvalidLHSInOfForLoop]: 'Invalid left-hand side in for-%0',
[Errors.CantAssignToInOfForLoop]: 'Invalid left-hand side in for-%0',
[Errors.InvalidAssignmentInOfForLoop]: 'Invalid assignment in for-%0',

@@ -296,6 +282,5 @@ [Errors.InvalidForAwait]: 'for await (... of ...) is only valid in async functions and async generators',

[Errors.IllegalReturn]: 'Illegal return statement',
[Errors.InvalidForLHSBinding]: 'The for-header left hand side binding declaration is not destructible',
[Errors.InvalidNewTarget]: 'new.target only allowed within functions',
[Errors.InvalidEscapedKeyword]: 'Keywords must be written literally, without embedded escapes',
[Errors.MissingPrivateName]: "''#' not followed by identifier",
[Errors.MissingPrivateName]: "'#' not followed by identifier",
[Errors.InvalidStrictStatic]: '`Static` is a reserved word in strict mode',

@@ -311,4 +296,2 @@ [Errors.FutureReservedWordInStrictModeNotId]:

[Errors.InvalidImportExportSloppy]: 'The %0 keyword can only be used with the module goal',
[Errors.InvalidExportAtTopLevel]: 'The `export` keyword is only supported at the top level',
[Errors.InvalidNestedExport]: 'The `export` keyword can not be nested in another statement',
[Errors.UnicodeOverflow]: 'Unicode codepoint must not be greater than 0x10FFFF',

@@ -318,3 +301,2 @@ [Errors.InvalidExportImportSource]: '%0 source must be string',

[Errors.InvalidDefaultImport]: "Only '*' or '{...}' can be imported after default",
[Errors.NoIdentOrDynamicName]: 'Method must have an identifier or dynamic name',
[Errors.TrailingDecorators]: 'Trailing decorator may be followed by method',

@@ -321,0 +303,0 @@ [Errors.GeneratorConstructor]: "Decorators can't be used with a constructor",

@@ -6,3 +6,3 @@ import { ParserState, Context } from '../common';

import { CharTypes, CharFlags, isIdentifierPart } from './charClassifier';
import { report, Errors } from '../errors';
import { report, reportAt, Errors } from '../errors';
import { unicodeLookup } from '../unicode';

@@ -136,4 +136,6 @@

let codePoint = 0;
// First handle a delimited Unicode escape, e.g. \u{1F4A9}
if (parser.nextCP === Chars.LeftBrace) {
const startPos = parser.index;
while (CharTypes[nextCP(parser)] & CharFlags.Hex) {

@@ -150,3 +152,3 @@ codePoint = (codePoint << 4) | toHex(parser.nextCP);

if (codePoint < 1 || (parser.nextCP as number) !== Chars.RightBrace) {
report(parser, Errors.InvalidHexEscapeSequence);
reportAt(startPos, parser.line, startPos - 1, Errors.InvalidHexEscapeSequence);
}

@@ -160,7 +162,7 @@ nextCP(parser); // consumes '}'

const c2 = parser.source.charCodeAt(parser.index + 1);
if ((CharTypes[c2] & CharFlags.Hex) === 0) report(parser, Errors.Unexpected);
if ((CharTypes[c2] & CharFlags.Hex) === 0) report(parser, Errors.InvalidHexEscapeSequence);
const c3 = parser.source.charCodeAt(parser.index + 2);
if ((CharTypes[c3] & CharFlags.Hex) === 0) report(parser, Errors.Unexpected);
if ((CharTypes[c3] & CharFlags.Hex) === 0) report(parser, Errors.InvalidHexEscapeSequence);
const c4 = parser.source.charCodeAt(parser.index + 3);
if ((CharTypes[c4] & CharFlags.Hex) === 0) report(parser, Errors.Unexpected);
if ((CharTypes[c4] & CharFlags.Hex) === 0) report(parser, Errors.InvalidHexEscapeSequence);

@@ -167,0 +169,0 @@ codePoint = (toHex(parser.nextCP) << 12) | (toHex(c2) << 8) | (toHex(c3) << 4) | toHex(c4);

@@ -26,2 +26,2 @@ import { Context } from './common';

export const version = '0.6.2';
export const version = '1.0.0';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc