{"push_id":1083134250,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"28e0106980bfa7a977afd70c13f314f0e2c02eb4","before":"a85c8ef1f17a81090816eb9f33f67ecb0d11481c","commits":[{"sha":"d1fc2a514dc3afb2e52358501cfb63badc68a426","author":{"email":"1fa2ef4755a9226cb9a0a4840bd89b158ac71391@cockroachlabs.com","name":"Matt Tracy"},"message":"Add UI Settings Reducer + mocha testing\n\nAdd a \"UI Settings\" reducer, which can be used by pages to store simple,\nephemeral settings made to the UI. This is being created in advance of the Nodes\nTable, which will use this reducer to store it's current sort settings.\n\nCommit also creates `AdminUIStore` type, which represents the shape of our redux\nstore. Unfortunately, due to some incompatible typings (react-redux,\nreact-redux-router), we cannot currently use the official redux typings which\nhave a generic `createStore` method; a generic `createStore` would allow us to\nenforce the shape. This shortcoming has been documented in a commment in\n`app.tsx`.\n\nCommit also introduces Mocha testing framework, in order to better test the UI\nreducer. This can be run from the /next directory with `make next`.\n\nIn order to acheive compatibility with Mocha, the entire /app project is now\nbeing compiled into commonjs modules instead of systemjs modules. This was due\nto a complicated problem: you cannot compile typescript to systemjs modules\nwhile using `import x = require(\"module\")` to include a commonjs module with a\nnon-module export (i.e. module exports a function). Instead, you must use\ntypescript's `allowSyntheticDefaultImports` compiler option, and use the `import\nx from \"module\"` syntax.\n\nHowever, mocha runs in node, and thus all modules are required to compile to\ncommonjs; unfortunately, typescript's commonjs compiler does not work with the\n`allowSyntheticDefaultImports` option, and instead single-function-exporting modules *must*\nbe imported using the `import = require()` syntax. Thus, the `import` statement\nin typescript cannot be made compatible between commonjs and systemjs compilers,\nif using a commonjs module which exports a single function.\n\nLuckily, our systemjs loader and bundler still works if the typescript is\ncompiled to commonjs modules; therefore, we are now compiling typescript to\ncommonjs instead of systemjs. It does throw a warning in the transpile process,\n\"please consider compiling to systemjs\", but we have a good reason for not doing\nthat.","distinct":true,"url":"https://api.github.com/repos/cockroachdb/cockroach/commits/d1fc2a514dc3afb2e52358501cfb63badc68a426"},{"sha":"28e0106980bfa7a977afd70c13f314f0e2c02eb4","author":{"email":"9b34bf5d02b85903d4d1681e4a5304cea6192e23@gmail.com","name":"mrtracy"},"message":"Merge pull request #6291 from mrtracy/mtracy/ui_next_ui_settings\n\nAdd UI Settings Reducer + mocha testing","distinct":true,"url":"https://api.github.com/repos/cockroachdb/cockroach/commits/28e0106980bfa7a977afd70c13f314f0e2c02eb4"}]}