Permalink
Commits on Sep 15, 2016
  1. Use universal method of finding the global object (#2132)

    The module store, runtime and symbol polyfills need access to the global
    object. This was done by checking the existence of window, global, self
    and falling back to this if none were defined. This can fail for two
    reasons. First, 'this' should be expected to be set to undefined during
    module definitions (as is the case for symbols.js), thus rendering the
    fallback useless. Secondly some JavaScript implementations (e.g. JavaScript
    -Core Framework) might not even define a name for the global object that
    could be accessed within modules.
    By using the Function-Constructor we create a new function in non-strict
    mode which has its thisArg set to the global object if no other thisArg
    is provided.
    cyco committed with arv Sep 15, 2016
Commits on Sep 11, 2016
  1. Correct check for undefined variable (#2133)

    The code was comparing the result of `typeof` with a variable named `undefined`.
    
    As typeof returns a string it should compare to `'undefined'`
    mathiasrw committed with arv Sep 11, 2016
  2. Fix PropertyMethodAssignment test (#2134)

    The test was testing the name of a method. With newer versions of
    Node, Node uses the ES6 semantics for inferring the function name
    which leads to test failures.
    arv committed on GitHub Sep 11, 2016
Commits on Aug 24, 2016
  1. Update generators.js

    Fix syntax error in demo
    arv committed on GitHub Aug 24, 2016
Commits on Jun 9, 2016
  1. 0.0.111

    arv committed Jun 9, 2016
  2. Setup module.exports first (#2129)

    This gives some much needed love to the CommonJS module output.
    
    Most importantly it mutates the `module.exports` object before the
    code is executed which allows some cyclic dependencies to work
    (function declarations).
    
    This also changes the transformer to work on the original code
    instead of the already transformed code (from `ModuleTransformer`).
    
    Things have been refactored so that more code is shared between
    `CommonJsModuleTransformer` and `ModuleTransformer`.
    
    Also, the require variable binding (with `__esModule`) has changed
    so that we do not need temp variables (outside what is needed for
    destructuring).
    arv committed Jun 9, 2016
Commits on Jun 8, 2016
  1. Cleanup generated code for export default declaration (#2128)

    For:
    
    ```js
    export default function f() {}
    ```
    
    We used to generate:
    
    ```js
    function f() {}
    var $__default = f;
    ... = {
      get default() {
        return $__default;
      }
    }
    ```
    
    With this change we skip the `$__default` var:
    
    ```js
    function f() {}
    ... = {
      get default() {
        return f;
      }
    }
    ```
    arv committed Jun 8, 2016
Commits on May 26, 2016
Commits on May 24, 2016
  1. 0.0.110

    arv committed May 24, 2016
  2. 0.0.109

    arv committed May 24, 2016
  3. Cleanup after #1979 (#2123)

    arv committed May 24, 2016
  4. Allow the runtime to be imported as modules (#1979)

    When using `--modules=commonjs --import-runtime` or
    `--modules=parse --import-runtime` the generated code will output
    require/import statements that import the runtime function as a module.
    This means that if you are compiling to commonjs or es6 modules you
    can get a minimal runtime and no external runtime file is needed.
    
    Fixes #1628
    arv committed May 24, 2016
Commits on May 21, 2016
  1. Cleanup global side effect test (#2122)

    By introducing a module that exports an object that is mutated
    instead of mutating the global object.
    arv committed May 21, 2016
Commits on May 20, 2016
  1. CJS: Module exports should be enumerable (#2120)

    We created the properties on the module object as non enumerable.
    This change makes them enumerable which is consistent with ES6 module
    instance objects.
    
    Fixes #2118
    arv committed May 20, 2016
Commits on May 17, 2016
  1. Feature test runner: Flip the policy regarding script/module (#2117)

    The feature test runner now treats `.js` as Module and `.script.js`
    as Script.
    
    Rename files as needed. Some tests need global context and some needs
    sloppy mode.
    arv committed May 17, 2016
Commits on May 11, 2016
  1. Remove custom assert functions (#2114)

    The motivation is to make running tests in other environments easier.
    
    assertArrayEquals -> assert.deepEqual
    fail -> assert.fail
    assertNoOwnProperties -> assert.equal(getOwnPropertyNames length, 0)
    assertHasOwnProperty -> assert.isTrue(hasOwnProperty)
    assertLacksOwnProperty -> assert.isFalse(hasOwnProperty)
    arv committed May 11, 2016
Commits on Apr 28, 2016
  1. Refactor to abstract SourceMapVisualizer module (#2110)

    johnjbarton committed Apr 28, 2016
Commits on Apr 23, 2016
  1. 0.0.108

    arv committed Apr 23, 2016
Commits on Apr 21, 2016
  1. Move Proper Tail Calls runtime into individual modules (#2105)

    Move Proper Tail Calls runtime into individual modules
    arv committed Apr 21, 2016
Commits on Apr 10, 2016
  1. 0.0.107

    johnjbarton committed Apr 10, 2016
  2. bin/BrowserSystem.js includes compiler, polyfills, System, and WebPag…

    Now includes compiler, polyfills, System, and WebPageTranscoder.
    
    Read traceurOptions attribute from <script type=module traceurOptions="--asyncFunctions">.
    Use bin/BrowserSystem.js + System.import in repl.html to demo dynamic import.
    Use bin/BrowserSystem.js + System.loadScriptTypeModule() in async.html/await.html to
      demo script tag import.
    
    Review URL: https://api.github.com/repos/google/traceur-compiler/issues/2103
    
    Closes #2103.
    johnjbarton committed Apr 10, 2016
Commits on Apr 7, 2016
  1. 0.0.106

    arv committed Apr 7, 2016
  2. Allow compiling async functions to generators

    This is done by setting `--async-functions --generators=parse`.
    
    
    
    Related to #1231
    
    Fixes #1780
    arv committed Apr 7, 2016
Commits on Apr 2, 2016
  1. Make module transformer the last transformer

    This is so that other transformers can output import declarations
    in the future.
    
    There are two real changes in here, both related to export
    declarations:
    
    ClassTransformer: Make sure that `export default class X {}`
    generates valid code.
    
    DestructuringTransformer: Make sure we do not export the temp
    variable.
    arv committed Apr 2, 2016
Commits on Mar 26, 2016
  1. 0.0.105

    johnjbarton committed Mar 26, 2016
Commits on Mar 24, 2016
  1. JSX: Fix whitespace and escaping of attribute values

    The behavior is reversed engineer from Babel since the
    semantics is not documented in the JSX "spec".
    
    Fixes #2088
    arv committed Mar 24, 2016
Commits on Mar 23, 2016
  1. JSX: Fix assignment expression parsing in place holders

    Fixes #2092
    arv committed Mar 23, 2016
Commits on Mar 22, 2016
  1. Implement Spread Properties

    https://github.com/sebmarkbage/ecmascript-rest-spread/blob/master/Spec.md#spread-properties
    
    This add support for ... in object literals which is currently at stage 2.
    
    ```js
    var x = {a: 1};
    var y = {...a, b: 2};  // {a: 1, b: 2}
    ```
    arv committed Feb 22, 2016
Commits on Mar 21, 2016
  1. Allow declarations to shadow the function expression name

    Fixes #2091
    arv committed Mar 5, 2016
Commits on Mar 12, 2016
  1. For the test files, switch based on global 'require' rather than

    global 'window' to select between browser and node.
    This is one step to allow debugging with a solution like iron-node.
    As a practical matter we are good either way.
    
    Review URL: https://api.github.com/repos/google/traceur-compiler/issues/2094
    
    Closes #2094.
    johnjbarton committed Mar 12, 2016
  2. Teach runUnitTests.js to accept a glob from the command line

    eg ./tval test/runUnitTests.js "./test/unit/runtime/*.js"
    The input glob has to be quoted or the shell will expand it, and
    pattern failures seem to result in broken tests rather than error
    messages, but it's a faster way to do partial tests than --grep.
    
    Review URL: https://api.github.com/repos/google/traceur-compiler/issues/2093
    
    Closes #2093.
    johnjbarton committed Mar 12, 2016
Commits on Mar 3, 2016
  1. 0.0.104

    johnjbarton committed Mar 3, 2016