-
Notifications
You must be signed in to change notification settings - Fork 0
Comparing changes
Open a pull request
base repository: yssource/otto
base: master
head repository: robertkrimen/otto
compare: master
- 20 commits
- 82 files changed
- 9 contributors
Commits on Feb 23, 2023
-
feat: add math function (robertkrimen#485)
Add some ES6 math functions.
Configuration menu - View commit details
-
Copy full SHA for 2b00d85 - Browse repository at this point
Copy the full SHA 2b00d85View commit details
Commits on May 19, 2023
-
ci: fix golangci-lint errors (robertkrimen#496)
Fix golangci-lint errors triggered by new version. Disable deprecated linters.
Configuration menu - View commit details
-
Copy full SHA for fbcfda9 - Browse repository at this point
Copy the full SHA fbcfda9View commit details
Commits on May 20, 2023
-
fix: panic on BadStatement (robertkrimen#495)
Add BadStatement case to walk.go to fix panic if there's bad code.
Configuration menu - View commit details
-
Copy full SHA for f987875 - Browse repository at this point
Copy the full SHA f987875View commit details
Commits on May 22, 2023
-
feat: date parse with slashes (robertkrimen#490)
Add support for parsing date times with slashes. Fixes robertkrimen#489 Also: * Disable G307 for read only files. * Add missing yaml tag to jsType.
Configuration menu - View commit details
-
Copy full SHA for 9221440 - Browse repository at this point
Copy the full SHA 9221440View commit details
Commits on Jul 6, 2023
-
fix: mishandling of message parameter in runtime.newErrorObject
runtime.newErrorObject is used to implement the Error constructor, and as such it takes input from JavaScript via calls like `new Error('xxx')`. The actual underlying error information is stored in an ottoError object, which is constructed using newError. newError takes a couple of mandatory arguments, then treats the remaining parameters (collected as `in ...interface{}`) as a printf-style format string and parameter list, which it uses to populate the message field of the returned ottoError object. newErrorObject was passing the message parameter from the Error function exposed to JavaScript directly through to newError as the first optional parameter, which led to it being treated as a format string, which resulted in any code like `throw new Error('%s')` behaving incorrectly, with the resultant error having a message like "%!s(MISSING)". This change fixes this behaviour in the least intrusive way I could find, and adds some tests to make sure it doesn't come back. The logic for newErrorObject and newErrorObjectError are very similar, so it was tempting to try to merge them, but it appears they're used in somewhat fragile ways with very little test coverage so I'll leave that as a problem for another day.
Configuration menu - View commit details
-
Copy full SHA for 67dbb5d - Browse repository at this point
Copy the full SHA 67dbb5dView commit details
Commits on Jul 10, 2023
-
fix: panic related to invalid property access in goMapObject
Ignore errors when converting a property name to the key type for goMapObject during a getOwnProperty operation, as a property which fails conversion to the target's key type could not possibly be a member of it. fixes robertkrimen#488
Configuration menu - View commit details
-
Copy full SHA for fc4074c - Browse repository at this point
Copy the full SHA fc4074cView commit details
Commits on Jul 16, 2023
-
ci: fix lint failures (robertkrimen#502)
Fix lint failures introduced by new 1.53 linters * Remove naked returns * Accept times using local time where intended * Allow unused parameter for now on call method * Disable depguard which just seems to be noise Also: * Correct typo so we use the specified golangci-lint version in CI.
Configuration menu - View commit details
-
Copy full SHA for ea8bcc3 - Browse repository at this point
Copy the full SHA ea8bcc3View commit details
Commits on Jul 17, 2023
-
fix: starting position of if statement (robertkrimen#501)
Fix IfStatement Idx0 to point to the right place. I was pointing to the right parenthesis after the test expression.
Configuration menu - View commit details
-
Copy full SHA for f70d418 - Browse repository at this point
Copy the full SHA f70d418View commit details
Commits on Jul 18, 2023
-
fix: starting positions of for and for-in statements (robertkrimen#503)
Fix Idx0 of ForStatement and ForInStatement to point to the right place which were previously not set.
Configuration menu - View commit details
-
Copy full SHA for 0357209 - Browse repository at this point
Copy the full SHA 0357209View commit details
Commits on Jul 20, 2023
-
fix: Idx1 of ObjectLiteral and ArrayLiteral (robertkrimen#504)
Fix Idx1 of ObjectLiteral so that it points to the character immediately after the right brace. Fix Idx1 of ArrayLiteral so that it points to the character immediately after the right bracket.
Configuration menu - View commit details
-
Copy full SHA for d2ed0a7 - Browse repository at this point
Copy the full SHA d2ed0a7View commit details
Commits on Jul 21, 2023
-
fix: positions of expressions (robertkrimen#505)
Fix Idx1 of ConditionalExpression so that it points to the next character after alternate expression. Fix Idx1 of SequenceExpression to return Idx1 of the last sequence element, not first. Fix Idx0 of unary expression to point to the start of operand in case of a postfix operator. Fix Idx1 of VariableExpression so that it points to the character right after the name literal if the expression does not have an initializer.
Configuration menu - View commit details
-
Copy full SHA for 589611c - Browse repository at this point
Copy the full SHA 589611cView commit details
Commits on Jul 25, 2023
-
fix: positions of statements (robertkrimen#506)
Fix the positions of various statements: * Fix Idx1 of BranchStatement so that it points to the character after the label if Label exists, or the one after Token if Label does not exist. * Fix Idx1 of LabelledStatement so that it points to the character after the statement. * Fix Idx1 of ReturnStatement so that it points to the character after the argument if Argument exists, or the one after return keyword if Argument does not exist. * Set Idx0 of SwitchStatement and fix Idx1 of SwitchStatement so that it points to the character after the right brace. * Fix Idx0 of ThrowStatement to point to the start of throw keyword and fix Idx1 of ThrowStatement so that it points to the next character after Argument. * Fix Idx1 of TryStatement to point to the character after Finally if Finally exists, or after Catch if Finally does not exist. * Set Idx0 of WithStatement which was not previously set. * Set WhileStatement.While so that Idx0 points to the right place. * Set Idx0 of DoWhileStatement and fix Idx1 to point to the next character after the right parenthesis.
Configuration menu - View commit details
-
Copy full SHA for 11288b7 - Browse repository at this point
Copy the full SHA 11288b7View commit details
Commits on Aug 16, 2023
-
fix: starting position of comment (robertkrimen#507)
Fix Begin of Comment to point to the position of the opening slash.
Configuration menu - View commit details
-
Copy full SHA for 9f9bfb9 - Browse repository at this point
Copy the full SHA 9f9bfb9View commit details
Commits on Dec 19, 2023
-
feat: add string startsWith method (robertkrimen#514)
Adds startsWith method to the String builtins.
Configuration menu - View commit details
-
Copy full SHA for c902ab4 - Browse repository at this point
Copy the full SHA c902ab4View commit details
Commits on Dec 30, 2023
-
feat: add
trimStart
andtrimEnd
aliases (robertkrimen#516)Leverage `trimRight` and `trimLeft` functions to provide `trimStart` and `trimEnd`.
Configuration menu - View commit details
-
Copy full SHA for b755419 - Browse repository at this point
Copy the full SHA b755419View commit details
Commits on Apr 13, 2024
-
chore: update ci versions (robertkrimen#519)
Update go, golangci-lint and action versions. Address new lint failures flagged by updated golangci-lint version.
Configuration menu - View commit details
-
Copy full SHA for 98effe0 - Browse repository at this point
Copy the full SHA 98effe0View commit details -
feat: support Object.values() (robertkrimen#518)
Adds support for `Object.values()`
Configuration menu - View commit details
-
Copy full SHA for 1ca7723 - Browse repository at this point
Copy the full SHA 1ca7723View commit details
Commits on May 3, 2024
-
feat: support trailing comma after the last argument (robertkrimen#520)
Add support for trailing comma after the last argument of a method call.
Configuration menu - View commit details
-
Copy full SHA for 2d23528 - Browse repository at this point
Copy the full SHA 2d23528View commit details
Commits on Jun 12, 2024
-
fix(parser/lexer): ID_Start & ID_Continue checks (robertkrimen#524)
Fix the checks for ID_Start & ID_Continue to match the definitions in https://www.unicode.org/reports/tr31/
Configuration menu - View commit details
-
Copy full SHA for d4edd51 - Browse repository at this point
Copy the full SHA d4edd51View commit details
Commits on Jul 9, 2024
-
Fix missing flag from regex literal in corner case (robertkrimen#529)
In the specific corner case where a regex contains a flag but is not followed by any symbols, the ast.RegExpLiteral.Literal value would drop (part of) that flag. This happens because the p.next() call during the parsing of the flag wouldn't actually advance the p.chrOffset, and thus endOffset would be erroneously adjusted. The fix is just to use the current p.chrOffset and then call p.next() afterwards.
Configuration menu - View commit details
-
Copy full SHA for a39e65d - Browse repository at this point
Copy the full SHA a39e65dView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...master