-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
2 cleaning up and syncing with py lib #10
Commits on Jan 30, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 7d4d72a - Browse repository at this point
Copy the full SHA 7d4d72aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e22e8e0 - Browse repository at this point
Copy the full SHA e22e8e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0395608 - Browse repository at this point
Copy the full SHA 0395608View commit details -
[#2] Setup Karma to run tests on PhantomJS
This gives us more confidence that the code runs both on NodeJS an on a browser (at least on a WebKit browser).
Configuration menu - View commit details
-
Copy full SHA for 3dc8f61 - Browse repository at this point
Copy the full SHA 3dc8f61View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34c2f2e - Browse repository at this point
Copy the full SHA 34c2f2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 926d53b - Browse repository at this point
Copy the full SHA 926d53bView commit details -
[#2] Refactor into class and simplify code
Apart from the obvious changes (becoming a class and such), the behaviour changed in two other places: * Instead of rejecting with a string, we throw an Error; * We don't alter the csv.parse exceptions on error.
Configuration menu - View commit details
-
Copy full SHA for 8e7c87f - Browse repository at this point
Copy the full SHA 8e7c87fView commit details
Commits on Jan 31, 2016
-
Configuration menu - View commit details
-
Copy full SHA for f12a9fc - Browse repository at this point
Copy the full SHA f12a9fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for d721a7a - Browse repository at this point
Copy the full SHA d721a7aView commit details -
Squashed 'lib/schemas/' content from commit 1a06ab0
git-subtree-dir: lib/schemas git-subtree-split: 1a06ab0a6ecab851e18f1a684e7f13a31db28821
Configuration menu - View commit details
-
Copy full SHA for 37697d6 - Browse repository at this point
Copy the full SHA 37697d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b43e8b - Browse repository at this point
Copy the full SHA 7b43e8bView commit details -
[#2] Caches the default registry
This library needs to work both on the browser and on NodeJS, so we can't rely on `fs.readFile`. Here we're using brfs (actually, babel-brfs because we need ES6) to embed the default registry and its schemas into the compiled JS file.
Configuration menu - View commit details
-
Copy full SHA for d4073c1 - Browse repository at this point
Copy the full SHA d4073c1View commit details -
2
Configuration menu - View commit details
-
Copy full SHA for 2aedba6 - Browse repository at this point
Copy the full SHA 2aedba6View commit details
Commits on Feb 1, 2016
-
Revert "[#2] Caches the default registry"
Instead of embeding the cache into the JS files, we'll follow the datapackage-registry-py pattern and load from the filesystem (when running in NodeJS) or not have a cache (when in the browser). This avoids issues with the schemas using `$ref` to point to other schemas, and also will make the JS file smaller. This reverts commit d4073c1. Conflicts: lib/index.js test/test.js
Configuration menu - View commit details
-
Copy full SHA for aea8609 - Browse repository at this point
Copy the full SHA aea8609View commit details -
[#2] Extract the logic to fetch URL and allow reading local files
It is also able to read files now. It'll be used when we're building the local cache.
Configuration menu - View commit details
-
Copy full SHA for ea60aba - Browse repository at this point
Copy the full SHA ea60abaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 411a15c - Browse repository at this point
Copy the full SHA 411a15cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 15345de - Browse repository at this point
Copy the full SHA 15345deView commit details -
[#2] isBrowser() changed to isBrowser variable
As the check is static, it doesn't need to be a function.
Configuration menu - View commit details
-
Copy full SHA for a338f87 - Browse repository at this point
Copy the full SHA a338f87View commit details -
[#2] When in Node, load registry from the local cache by default
The behaviour in the browser is the same: load the default registry URL.
Configuration menu - View commit details
-
Copy full SHA for 4589a5c - Browse repository at this point
Copy the full SHA 4589a5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2792420 - Browse repository at this point
Copy the full SHA 2792420View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa21e49 - Browse repository at this point
Copy the full SHA aa21e49View commit details -
[#2] Adds .getBasePath() and .getProfile()
The profile is loaded from the local filesystem (if exists and we're on Node), or from its URL. The base path is the Registry's base path in the local filesystem, if it was loaded locally. The base path is needed for loading schemas that use relative `$ref`s.
Configuration menu - View commit details
-
Copy full SHA for 8864582 - Browse repository at this point
Copy the full SHA 8864582View commit details -
Configuration menu - View commit details
-
Copy full SHA for a4d8a0a - Browse repository at this point
Copy the full SHA a4d8a0aView commit details
Commits on Feb 2, 2016
-
[#2] Compile package to ES5 for NPM
The ./src folder contains our code (ES6), the ./lib contains it compiled to ES5, and the schemas cache was moved from ./lib/schemas to ./schemas. In our tests, I've prefered to test the compiled ES5, instead of our ES6 code. This means that the stacktraces will point to the compiled ES5 code, but if they pass, we can be sure that the resulting package works (including the compilation process).
1Configuration menu - View commit details
-
Copy full SHA for 9300ade - Browse repository at this point
Copy the full SHA 9300adeView commit details -
[#9] Remove Bluebird dependency
We were only using it for the `.promisify()` method. Without it, the bundled codebase goes from 546 KB to 398 KB. Still huge.
Configuration menu - View commit details
-
Copy full SHA for af9b689 - Browse repository at this point
Copy the full SHA af9b689View commit details -
[#9] Use csv-parse instead of csv
That's the only thing we're using anyway. This lowers our codebase from 398 KB to 381 KB.
Configuration menu - View commit details
-
Copy full SHA for f7ac5a5 - Browse repository at this point
Copy the full SHA f7ac5a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for db6b585 - Browse repository at this point
Copy the full SHA db6b585View commit details -
[#9] Replace "url" dependency by a RegExp
The RegExp isn't as good as what's done by URL, and we also consider "file://.*" to be a remote URL, but the code went from 378 KB to 335 KB.
Configuration menu - View commit details
-
Copy full SHA for ec00a63 - Browse repository at this point
Copy the full SHA ec00a63View commit details
Commits on Feb 3, 2016
-
[#2] Add plugin to restore Babel5 "export default" behaviour
Check https://github.com/59naga/babel-plugin-add-module-exports for a better explanation of the problem.
Configuration menu - View commit details
-
Copy full SHA for 8b9fee7 - Browse repository at this point
Copy the full SHA 8b9fee7View commit details -
Configuration menu - View commit details
-
Copy full SHA for f386c2e - Browse repository at this point
Copy the full SHA f386c2eView commit details -
[#9] Don't require 'babel-polyfill', leaving that to the user
When requiring the polyfill, we're polluting the global scope, and making our codebase bigger. They're not needed on many newer browsers, which might be all that our users need to support. We can't make this decision for them, so we better just document it.
Configuration menu - View commit details
-
Copy full SHA for 07bc7c6 - Browse repository at this point
Copy the full SHA 07bc7c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d14020 - Browse repository at this point
Copy the full SHA 2d14020View commit details