Disclaimer: This changelog is not created by the original author of JS Interpreter, instead it is created by examining the changes made to the original repo of JS-Interpreter, to identify new features, bug fixes and breaking changes.
The version is chosen based on the type of changes according to the semver guidelines.
Commit: 054c7d4
No change is added in this commit, just a few demos are updated, this version is published to stay up to speed with the commit hash of the original repo.
Commit: cb740ed
- Add timeout for executing polyfills.
- Add .name property to functions
- Add placeholder getter/setter functions on props
- Add announcement newsgroup address
- Use polyfills for Array functions.
- Support ‘null’ for ‘this’ value in strict mode.
- Use Object.defineProperty instead of assignment.
- Fix attributes on Function.prototype
- ‘typeof Function.prototype’ was reporting ‘object’, should be a ‘function’
- Handle ‘new’ calls on primitives.
- Catch calling date function on non-dates
- Catch invalid arguments on string’s localeCompare
- Called function should determine strict mode
- Remove enumerability from most global properties.
- New version of acorn
- In non-strict mode
this
needs to be boxed when calling a function. - ‘window’ and ‘self’ are the only two enumerable properties on the global object.
Commit: d20cb5a
- Partial support of JSON.stringify args.
- Support pretty printing. Support array filtering. Do not support function replacers (this would need to be a polyfill).
- Fix security hole in getOwnPropertyDescriptor
- Fix some JS Doc types
- Throw error where getter/setter not supported
- There are several places where getters and setters are not handled
correctly. Such as array’s
.length
. If a getter or setter is encountered in one of these places, throw an error, rather than performing invalid behaviour.
- There are several places where getters and setters are not handled
correctly. Such as array’s
- Don’t set proto prop when exporting an object
- proto is a magic property in most runtimes, but not in JS-Interpreter.
- Remove .isObject property
- This property dates back to when primitives were also wrapped as objects and a way to distinguish objects and primitives was needed. Hopefully this change will also annoy @XmiliaH :)
- Split scopes into scope object and data object
- Previously a scope object was a regular object with two extra properties tacked on: strict and parentScope. Issue #183 proved that sometimes one needs multiple scopes with different parentScope values. This PR creates a scope object with the above two properties, as well as a third property (‘.object’) that points to the regular object. This allows two scopes to have different parentScopes, while sharing the same object for variables.
- Minor API change for advanced threading and serialization.
Commit: 28ba7f2
- Non-constructable functions don’t have .prototype
- Previously escape.prototype was set to undefined. Now it is not defined.
- Add self-interpreter demo.
- Use iteration (not recursion) for polyfill steps.
- Revert "Remove unneeded error class"
- Resovles #177
- Fix alert(true.toString())
- Previously booleans and strings (but not numbers) would return ‘undefined’.
- Fix String and Number constructors with no arg.
- Previously alert(Number()) -> NaN and alert(String()) -> ‘undefined’.
- Move constructor creation into createFunctionBase_
- Fixes #175
- Remove ancient constants.
Commit: d6809ac
- Initial version created from the original repo