jlmakes / karma-rollup-preprocessor Goto Github PK
View Code? Open in Web Editor NEWKarma preprocessor to bundle ES modules using Rollup.
License: Other
Karma preprocessor to bundle ES modules using Rollup.
License: Other
Using version 7.0.3.
Past the initial preprocessing, no file change ever trigger test again.
I traced the issue to the matching in the watcher. It passes down changed file path to Karma's fileList. In turn, the fileList does this:
//karma\lib\file-list.js:48
_findFile (path, pattern) {
if (!path || !pattern) return
return this._getFilesByPattern(pattern.pattern).find((file) => file.originalPath === path)
}
The issue is:
path
is a windows path, in my case, D:\home\projects\skeleton\skeleton-lib\tests\index.js
.file.originalPath
is not: 'D:/home/projects/skeleton/skeleton-lib/tests/index.js'
.It looks like Karma's fileList
expects the given path to always be posix format, and karma-rollup-preprocessor
sends windows format instead.
Sorry in advance for a poor bug report.
I'm trying out the preprocessor and have it working without plugins, however it seems the rollup doesn't include the imports. I assume the Babel plugin is needed for things to work properly.
So I tried your example of adding rollup-plugin-babel
, but when I do that the Karma server never takes off. There is no debug output, Karma just finishes.
Do you have any suggestions for how to debug this?
Cross-linking rollup/rollup-plugin-commonjs#268
rollup-plugin-commonjs generates a file with a null byte called \u0000commonjsHelpers
. This causes fs.stat
to fail via the path here (with long paths shortened to ...
):
at nullCheck (fs.js:173:16)
at Object.fs.stat (fs.js:947:8)
at FSWatcher.NodeFsHandler._addToNodeFs (.../node_modules/chokidar/lib/nodefs-handler.js:447:20)
at FSWatcher.<anonymous> (.../node_modules/chokidar/index.js:622:12)
at .../node_modules/async-each/index.js:16:7
at Array.forEach (<anonymous>)
at each (.../node_modules/async-each/index.js:15:11)
at FSWatcher.add (.../node_modules/chokidar/index.js:621:5)
at buffer.forEach.m (.../node_modules/karma-rollup-preprocessor/lib/index.js:69:15)
There is probably a better way, but the best I can figure is karma-rollup-preprocessor is the easiest place to fix this, by simply checking for the presence of a null byte before adding a file to the watch list. If a filename has a null byte, ignore it.
A better solution would to be to not have filenames generated in plugins and injected into the watch list, but I'm sure there's a good reason for that.
The test is just if (m.includes('\u0000')) { return }
inside the respective forEach
functions at Watch.prototype.start
and Watch.prototype.clean
.
Generally it's considered a security issue if a filename has a null byte, and disallowed in many languages (e.g. Python), so I expect it's a safe change. See eg https://security.stackexchange.com/a/45958/2914
Hi @jlmakes ,
Currently, the only way to specify rollup configuration is with the rollupPreprocessor
: easy, and enough for 99% use case.
But, it could be great to support configuration using customPreprocessors
(documented here, or you can see it implemented by karma-babel-preprocessor
).
It could be a simple solution to provide different rollup configuration for specific files, for example:
module.exports = (config) => {
config.set({
// Karma Configuration
// ...
preprocessors: {
'test/index1.js': ['rollup'],
'test/index2.js': ['rollupCustom'],
},
rollupPreprocessor: {
// Default rollup configuration...
},
customPreprocessors: {
rollupCustom: {
base: 'rollup',
// Custom rollup configuration for this file...
},
},
});
});
I already made some tests on a project and I would be happy to open a PR for that, what do you think?
Seems like that karma auto watch break when using karma-rollup-preprocessor
.
The tests are run when i change something, but with no effect.
Indeed if I make a test fail, I see karma running but it will state that tests passes.
It may be a configuration problem, so here I made a small reproduction of the issue https://github.com/kaosdev/karma-rollup-preprocessor-watch-issue
I saw there are other issue related to auto watch not working, but this seems different, and as far as I understand this feature changed recently (maybe with 7.0.4?).
Each test file is treated as a separate bundle. Common dependencies are duplicated between the test files.
This is wasteful, and creates extra overhead for large project. But more importantly it creates issues when working with web components, as they may only be registered once per document. Bundling the same web component twice will throw an error.
I creates a reproduction for this: https://github.com/LarsDenBakker/karma-rollup-preprocessor-issues
npm install
npm run test:dynamic-import
optionally, debug the code at: http://localhost:9876/debug.html
You will see the error being thrown. If you inspect the output bundles in the browser, you will see the web component code bundled twice.
We are switching from webpack to rollup for our recommended setup for developers working with web component at: https://open-wc.org/
We had a similar issue with webpack codymikol/karma-webpack#379 which we were able to solve.
Happy to help out where possible.
I got the error message as follow after upgrading the karma-rollup-preprocessor
to the latest version:
TypeError: Cannot read property 'forEach' of undefined
at Watch.capture (.../node_modules/karma-rollup-preprocessor/lib/index.js:65:20)
at rollup.then.bundle (.../node_modules/karma-rollup-preprocessor/lib/index.js:22:23)
The output of printing bundle
at lib/index.js:22:23
is(I removed some similar lines and replaced some full paths with '...'):
{ cache:
{ modules:
[ [Object],
[Object],
[Object],
...
],
plugins: {} },
watchFiles:
[ '/Users/.../test/basic.spec.js',
'/Users/.../src/is.js',
'/Users/.../src/arrow-function.js',
],
generate: [Function: generate],
write: [Function: write]
}
The changes introduced by #54 breaks builds that involve @rollup/plugin-multi-entry
.
Specifically:
/**
* for processors that have alternate source file extensions,
* make sure to use the output rollup file name
*/
const parsedPath = path.parse(file.path);
file.path = `${parsedPath.dir}/${result.fileName}`;
I believe applying hasNullByte to result.facadeModuleId
would resolve the issue
if (result.facadeModuleId && !hasNullByte(result.facadeModuleId)) {
const parsedPath = path.parse(file.path);
file.path = `${parsedPath.dir}/${result.fileName}`;
}
facadeModuleId: string | null, // the id of a module that this chunk corresponds to
Thoughts?
24 08 2017 20:41:26.839:ERROR [preprocessor.rollup]: Error processing “tests/unit/findIndex.js”
Unexpected key 'input' found, expected one of: acorn, amd, banner, cache, context, dest, entry, exports, external, footer, format,globals, indent, interop, intro, legacy, moduleContext, moduleName, noConflict, onwarn, outro, paths, plugins, preferConst, pureExternalModules, sourceMap, sourceMapFile, targets, treeshake, useStrict, watch
I get this after I updated to 5.x.x
Rollup has moved output options from being in the root to separate output
groupings. Using a newer Rollup with karma-rollup-preprocessor prints the following for every file:
The following options have been renamed — please update your config:
sourcemap -> output.sourcemap
The end user can easily move all the options except sourcemap
, which is checked internally by karma-rollup-preprocessor
. And it looks like Rollup is stripping the option from the root, so even if we include it in both places (and ignore the warning), we no longer get sourcemaps.
Looks like we can simply change the sourcemap checking line, and everything should work as expected, like so:
let sourcemap = config.output && config.output.sourcemap || config.sourcemap
if (sourcemap === 'inline') {
Though I'm not sure if you are a fan of the shorthand checking method above.
(PS: sorry I didn't catch this before you just published, which was much appreciated.)
When writing a simple test with the recommended config, I get a 404 on dynamic imports. Likely the actual files get moved after compiling, but the dynamic chunks are not actually moved?
Is this a known issue with rollup and karma? Is there some sample project to look at?
When using this plugin and trying to watch my test files with karma, only changing the entry file causes the test files to be recompiled.
I have tried explicitly watching the rest of the test files but even though doing this causes the tests to run again, the test file is not recompiled! 😅
// Karma configuration
// Generated on Mon Dec 14 2015 17:29:26 GMT+0000 (GMT)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'test/client-test.js',
{pattern: 'test/*', watched: true, included: false, served: false, nocache: false}
],
// list of files to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'test/client-test.js': ['rollup']
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Firefox'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultanous
concurrency: Infinity
})
}
The last version of rollup introduced incremental build, where you can assign the generated bundle to options.cache
to improve performance. This would be great to implement!
The version of rollup this package is locked to appears to be causing a type of error seen here rollup/rollup-plugin-babel#69
Please update to the latest or merge #12
New rollup needs to have input instead of entry, and sourcemap instead of sourceMap.
1.27.0 added support for output-specific plugins
Rollup#3218. This support also added a warning that appears as follows:
The "${hookName}" hook used by the output plugin ${pluginName} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.
I bring this up here because a config that is ok to use in rollup directly, end up spamming the terminal with these errors when used with karma-rollup-preprocessor
.
I would make an example config, but its visible in the tests within this repo already.
Hi, first, thanks for maintaining this plugin!
I'm on 3.0.2
and Node 7, and I have a problem with the watch feature.
This is my karma configuration:
autoWatch: true,
preprocessors: {
[`${root}/src/**/*.js`]: ['rollup'],
[`${root}/tests/**/*.js`]: ['rollup'],
},
rollupPreprocessor: {
moduleName: 'test',
exports: 'named',
format: 'umd',
sourceMap: 'inline',
plugins: [babel({
presets: [
['es2015', { modules: false }],
'stage-2',
],
})],
},
files: [
{ pattern:`${root}/src/**/*.js`, included: false, watched: true },
`${root}/tests/styles/*.css`,
`${root}/tests/functional/*.js`,
`${root}/tests/unit/*.js`,
],
Describing how my tests work, the test files import
the source files of my library and rollup takes care to compile everything.
The problem is that if I change a file in my tests, the watch task works, if instead I change a file of the source of my library, the bundle isn't updated.
Am I doing something wrong? Sometimes it works, sometimes not... randomly.
The [email protected] had been released yesterday, when I upgrade to the latest version, I got the following error:
TypeError: Cannot read property 'forEach' of undefined
at Watch.capture (~\node_modules\karma-rollup-preprocessor\lib\index.js:65:20)
at rollup.then.bundle (~\node_modules\karma-rollup-preprocessor\lib\index.js:21:23)
It seems that the
bundle.modules
had been moved tobundle.cache.modules
.
'rollup-plugin-node-resolve' and 'rollup-plugin-json' are used
24 12 2019 09:54:04.640:INFO [preprocessor.rollup]: Generating bundle for ./test/a.spec.ts
The "buildStart" hook used by the output plugin node-resolve is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.
The "resolveId" hook used by the output plugin node-resolve is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.
The "load" hook used by the output plugin node-resolve is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.
The "transform" hook used by the output plugin json is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.
The "resolveId" hook used by the output plugin typescript is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.
The "load" hook used by the output plugin typescript is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.
The "transform" hook used by the output plugin typescript is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.
The "transform" hook used by the output plugin buble is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.
24 12 2019 09:54:04.660:INFO [karma-server]: Karma v4.4.1 server started at http://0.0.0.0:9876/
24 12 2019 09:54:04.660:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
24 12 2019 09:54:04.664:INFO [launcher]: Starting browser Chrome
24 12 2019 09:54:06.681:INFO [Chrome 79.0.3945 (Mac OS X 10.14.6)]: Connected on socket h-a0Mzem8tUuBLkCAAAA with id 68984361
When trying to set up a project using rollup-plugin-babel
, I seem to be getting a few errors.
In my test I have import { chai } from 'chai';
. I have installed @types/chai
. When I run the test I get the error:
Error: 'expect' is not exported by node_modules/chai/index.js
Please see https://github.com/silenceisgolden/karma-typescript-babel for a reproduction of the issue. Thanks for your time and help!
For convenience, here are a few files
// karma.conf.js
process.env.CHROME_BIN = require('puppeteer').executablePath();
const FILE_GLOB = 'src/**/*.spec.ts';
module.exports = config => {
config.set({
basePath: '',
browsers: ['ChromeHeadless'],
frameworks: ['mocha'],
reporters: ['mocha'],
files: [
{
pattern: FILE_GLOB,
watched: false,
module: true
}
],
exclude: [],
preprocessors: {
[FILE_GLOB]: ['rollup']
},
plugins: [
require('karma-mocha'),
require('karma-mocha-reporter'),
require('karma-chrome-launcher'),
require('karma-rollup-preprocessor')
],
rollupPreprocessor: {
plugins: [
require('rollup-plugin-node-resolve')({
extensions: ['.js', '.ts']
}),
require('rollup-plugin-commonjs')({
include: 'node_modules/**',
extensions: ['.js', '.ts']
}),
require('rollup-plugin-babel')({
exclude: 'node_modules/**',
extensions: ['.js', '.ts']
})
],
output: {
format: 'esm',
sourcemap: 'inline'
}
},
mochaReporter: {
showDiff: true
},
concurrency: Infinity,
autoWatch: false,
singleRun: true,
colors: true
});
};
// .babelrc
{
"presets": [
"@babel/typescript",
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": {
"version": 3
},
"targets": "last 2 versions"
}
]
]
}
// src/index.ts
export function test() {
return 'something';
}
// src/index.spec.ts
import { expect } from 'chai';
import { test } from './index';
describe('testing testing', () => {
it('should not fail', () => {
expect(test()).to.equal('something');
});
});
Default behavior for karma is to trigger processing only on changed file. This is very fast and convenient if you debug tests in watch mode.
Current implementation forces all files to be processed on any file change. Consequently, it takes a lot of time on large tests amount just to check 1 file change.
Just an example:
Default karma file watch + rollup
30 08 2017 15:18:36.617:INFO [watcher]: Changed file "./test/unit/behavior/noResultsBehavior.spec.js".
30 08 2017 15:18:36.791:INFO [watcher]: Changed file "./test/unit/behavior/noResultsBehavior.spec.js".
Less than 200ms to recompile and trigger test run.
Current implementation with custom watcher:
75 seconds to respond to single file change. (66 files and 564 tests recompiled in total)
Using the latest versions, sourcemaps have stopped working. I updated my karma config with no success.
I'm using these versions:
"karma": "^2.0.0",
"karma-rollup-preprocessor": "^5.0.0",
"rollup": "^0.54.0"
And this config:
rollupPreprocessor: {
plugins: [...listOfPlugins],
output: {
sourcemap: 'inline'
},
format: 'iife',
name: 'projectname'
}
Any suggestions?
Hi, I've been using this awesome package for some time to my satisfaction, but now I've stumbled upon an issue with the latest version. It manifests in this repo: https://github.com/naja-js/naja. If I run yarn run test
locally, it runs karma in watch mode (with autoWatch: true, singleRun: false
), the tests get stuck in an endless loop where it keeps detecting a change in the tests/index.js
. When I manage to exit the loop, the tests/index.js
is indeed modified – it is either empty, or it contains the generated bundle.
Downgrading this package to 7.0.7 helps, so I'm guessing it's somehow connected to #72 / #74. Is this a bug? Or should I change the configuration in some way? Thanks for your help!
Error: You must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks.
Karma launches perfectly fine locally, and all tests are executed. When I try this with travis, it hangs.
No browser starts. Karma doesn't launch.
If I swap to another preprocessor everything works.
I followed the structure in the example in the README:
rollupPreprocessor: {
plugins: [...],
output: {
...
},
},
However, none of the plugins I specified were invoked. When I added options
, it started working:
rollupPreprocessor: {
options: {
plugins: [...],
output: {
...
},
},
},
Other preprocessors I use don't have options
, so it was not immediately obvious to me what was missing.
I use the following config to run karma (to debug unit tests):
karma start tests/config.js --auto-watch --no-single-run --no-coverage --no-browsers
And then I open http://localhost:9876/debug.html
directly in browser to run tests.
In this case watching doesn't start, because event run_start
does not dispatch.
It works when open http://localhost:9876/
at first, but I would like to have a possibility to skip this step, because in most cases tab with debug.html
is opened and I just refresh it.
Maybe need to start watching without event run_start
?
This may be a config issue but I can't get auto watch working with my setup. Tests run fine the first time then rollup throws an exception when files change.
The command I running is: npx karma start --auto-watch
The error I get is:
02 08 2019 14:24:01.520:ERROR [preprocessor.rollup]: Failed to process ./src/ui/__tests__/mytest.spec.js
Error: Could not resolve entry module (src/ui/__tests__/mytest.spec.js).
at error (/usr/src/app/components/node_modules/rollup/dist/rollup.js:9421:30)
at pluginDriver.hookFirst.then.resolveIdResult (/usr/src/app/components/node_modules/rollup/dist/rollup.js:16241:20)
02 08 2019 14:24:01.521:ERROR [karma-server]: UnhandledRejection
const commonjs = require("rollup-plugin-commonjs")
const resolve = require("rollup-plugin-node-resolve")
const tsPlugin = require("rollup-plugin-typescript2")
const ttypescript = require("ttypescript")
const istanbul = require("rollup-plugin-istanbul")
const path = require("path")
module.exports = function(config) {
config.set({
frameworks: ["mocha"],
reporters: ["mocha"],
files: [
{ pattern: "src/test/globals.ts", watched: false },
{ pattern: "src/**/*.spec.ts", watched: false },
{ pattern: "src/**/*.spec.tsx", watched: false },
],
preprocessors: {
"src/test/globals.ts": ["rollup"],
"src/**/*.spec.ts": ["rollup"],
"src/**/*.spec.tsx": ["rollup"],
},
rollupPreprocessor: {
/**
* This is just a normal Rollup config object,
* except that `input` is handled for you.
*/
output: {
format: "iife",
name: "agentmessenger",
sourcemap: "inline",
},
plugins: [
resolve(),
commonjs({
namedExports: { chai: ["assert"] },
sourceMap: false,
}),
tsPlugin({
typescript: ttypescript,
}),
istanbul({
exclude: ["src/**/*.spec.ts", "src/**/*.spec.tsx"],
}),
],
onwarn: warning => {
if (
warning.code === "CIRCULAR_DEPENDENCY" &&
warning.importer.indexOf("node_modules/chai/lib/chai.js") === 0
) {
// Chai contains circular references, but they are not fatal and can be ignored.
return
}
console.warn(`(!) ${warning.message}`)
},
},
coverageIstanbulReporter: {
reports: ["lcovonly", "text-summary"],
dir: path.join(__dirname, "coverage"),
combineBrowserReports: true,
},
junitReporter: {
outputDir: "reports", // results will be saved as $outputDir/$browserName.xml
outputFile: "results.xml", // if included, results will be saved as $outputDir/$browserName/$outputFile
useBrowserName: false, // add browser name to report and classes names
},
client: {
mocha: {
reporter: "html",
require: [],
},
},
browsers: ["custom_chromium"],
customLaunchers: {
custom_chromium: {
base: "ChromiumHeadless",
flags: ["--disable-dev-shm-usage", "--no-sandbox", "--disable-web-security"],
},
},
})
}
package.json:
{
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.7",
"chai": "^4.2.0",
"karma": "^4.2.0",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage-istanbul-reporter": "^2.1.0",
"karma-junit-reporter": "^1.2.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.5",
"karma-rollup-preprocessor": "^7.0.2",
"mocha": "^6.2.0",
"node-sass": "^4.12.0",
"puppeteer": "^1.19.0",
"rollup": "^1.19.3",
"rollup-plugin-commonjs": "^10.0.2",
"rollup-plugin-istanbul": "^2.0.1",
"rollup-plugin-multi-entry": "^2.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-typescript2": "^0.22.1",
"ttypescript": "^1.5.7",
"typescript": "^3.5.3"
}
Currently if rollup.config.js
will export an array of configs the preprocessor will fail with an error:
Unknown option found: 0, 1, 2, 3, 4, 5, 6.
I suspect it's because preprocessor is using older version of Rollup.
The buble example doesn't work for me.
Here's part of my karma.conf.js:
preprocessors: {
'src/**/test*.js': ['rollup']
},
reporters: ['spec'],
rollupPreprocessor: {
plugins: [buble()],
format: 'iife'
}
In my development environment bundle.generate
returns a Promise. Because of this my karma preprocessing fails.
A short fix this can be seen here:
https://github.com/pikobytes/karma-rollup-preprocessor/blob/master/lib/index.js
If you want a i could provide a pull request.
I am using rollup@^0.45.1
.
The entry
key should be changed to input
since [email protected]. Setting the rollup dependency version to >=0.45.x
making new installations to get the 0.48.x versions, thus causing breaking changes.
karma-rollup-preprocessor/lib/index.js
Line 37 in 56f48f7
Hi,
Please can a new version be released containing 8797035 ?
Without it watch mode is a bit broken as every time a file changes an additional rollup watch instance is fired up, whcih doesn't really make sense and causes slow down and eventually a crash.
Thanks!
Picking up after #33, which was awaiting reproduction, I have created a repo that reproduces the issue. Been 5 days since I posted in that issue with no apparent attention. So starting a new issue.
Basically when a test error occurs, the reported error line is incorrect.
I noticed that bundling errors seem to fall silent.
The simplest workaround is to add log.error('Bundle error:', error);
.
I don't know Karma's internal workings well enough to speculate why done(error, null)
does not report the error, but I noted the coffee plugin similarly logs a message with
log.error('%s\n at %s:%d', e.message, file.originalPath, e.location.first_line);
Cheers! 🍻
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.