Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Commit

Permalink
Release v1.0.0-rc1.
Browse files Browse the repository at this point in the history
Closes #26
Closes #27
Closes #28
  • Loading branch information
nwronski committed Oct 17, 2016
1 parent d70204b commit 6765e59
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.

## [Unreleased][unreleased]

## [v1.0.0-beta] - 2016-10-07
## [v1.0.0-rc1] - 2016-10-16
### Added
- The root node of the AST now has `type` and `variant` properties:

Expand Down Expand Up @@ -1032,8 +1032,8 @@ part of table names, column names, aliases, etc... This also addresses issues th
### Added
- First working version of sqlite-parser

[unreleased]: https://github.com/codeschool/sqlite-parser/compare/v1.0.0-beta...HEAD
[v1.0.0-beta]: https://github.com/codeschool/sqlite-parser/compare/v0.14.5...v1.0.0-beta
[unreleased]: https://github.com/codeschool/sqlite-parser/compare/v1.0.0-rc1...HEAD
[v1.0.0-rc1]: https://github.com/codeschool/sqlite-parser/compare/v0.14.5...v1.0.0-rc1
[v0.14.5]: https://github.com/codeschool/sqlite-parser/compare/v0.14.4...v0.14.5
[v0.14.4]: https://github.com/codeschool/sqlite-parser/compare/v0.14.3...v0.14.4
[v0.14.3]: https://github.com/codeschool/sqlite-parser/compare/v0.14.2...v0.14.3
Expand Down
4 changes: 2 additions & 2 deletions bin/sqlite-parser
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
/*!
* sqlite-parser - v1.0.0-beta2
* sqlite-parser - v1.0.0-rc1
* @copyright 2015-2016 Code School (http://codeschool.com)
* @author Nick Wronski <[email protected]>
*/
'use strict';var _index=require('../lib/index');var _index2=_interopRequireDefault(_index);var _fs=require('fs');var _path=require('path');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var aliases={o:'output',v:'version',h:'help',x:'stream'};var args=resolveArgs(process.argv.slice(2));var error=function error(err){console.error(err);process.exit(1);};var done=checkThen(function(){process.exit(0);});if(args['version']){console.log('sqlite-parser v1.0.0-beta2');process.exit(0);}if(args['help']||args._.length===0){console.log('Usage:\tsqlite-parser [infile]\n');console.log('Option\t\t\tAlias\tDescription');console.log('--output [outfile]\t-o\tWrite output to a file instead of stdout');console.log('--stream\t\t-x\tEnable streaming mode (default: infile >150kB)');console.log('--version\t\t-v\tGet current parser version');process.exit(0);}var streaming=args['stream'];var input=(0,_path.normalize)(args._[0]);var output=args['output'];if(output){output=(0,_path.normalize)(output);}(0,_fs.stat)(input,checkThen(function(_ref){var size=_ref.size;if(size/1000>=150){streaming=true;}var startStream=streaming?streamParser:standardParser;if(output){(function(){var outDir=(0,_path.dirname)(output);(0,_fs.stat)(outDir,checkThen(startStream,function(){(0,_fs.mkdir)(outDir,startStream);}));})();}else{startStream();}}));function resolveArgs(argv){var args={_:[]};var last=null;var isNewArg=function isNewArg(arg){return!arg||arg.indexOf('-')===0;};for(var i=0;i<argv.length;i+=1){var arg=argv[i];if(isNewArg(arg)){var cur=arg.indexOf('--')!==-1?arg.slice(2):aliases[arg.slice(1)];var peek=argv.length-1!==i?argv[i+1]:null;var peekNew=isNewArg(peek);args[cur]=peekNew?true:peek;if(!peekNew){i+=1;}}else{args._.push(arg);}}return args;}function checkThen(){var resCallback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:done;var errCallback=arguments.length>1&&arguments[1]!==undefined?arguments[1]:error;return function(err,result){if(err){return errCallback(err);}resCallback(result);};}function streamParser(){var parserTransform=_index2.default.createParser();var singleNodeTransform=_index2.default.createStitcher();var readStream=(0,_fs.createReadStream)(input);var writeStream=output?(0,_fs.createWriteStream)(output):process.stdout;readStream.pipe(parserTransform);parserTransform.pipe(singleNodeTransform);singleNodeTransform.pipe(writeStream);parserTransform.on('error',error);singleNodeTransform.on('error',error);writeStream.on('finish',done);}function standardParser(){(0,_fs.readFile)(input,'utf8',checkThen(function(data){(0,_index2.default)(data,checkThen(function(ast){var result=void 0;try{result=JSON.stringify(ast,null,2);}catch(e){return error(e);}if(output){(0,_fs.writeFile)(output,result,checkThen(done));}else{process.stdout.write(result+'\n');done();}}));}));};
'use strict';var _index=require('../lib/index');var _index2=_interopRequireDefault(_index);var _fs=require('fs');var _path=require('path');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var aliases={o:'output',v:'version',h:'help',x:'stream'};var args=resolveArgs(process.argv.slice(2));var error=function error(err){console.error(err);process.exit(1);};var done=checkThen(function(){process.exit(0);});if(args['version']){console.log('sqlite-parser v1.0.0-rc1');process.exit(0);}if(args['help']||args._.length===0){console.log('Usage:\tsqlite-parser [infile]\n');console.log('Option\t\t\tAlias\tDescription');console.log('--output [outfile]\t-o\tWrite output to a file instead of stdout');console.log('--stream\t\t-x\tEnable streaming mode (default: infile >150kB)');console.log('--version\t\t-v\tGet current parser version');process.exit(0);}var streaming=args['stream'];var input=(0,_path.normalize)(args._[0]);var output=args['output'];if(output){output=(0,_path.normalize)(output);}(0,_fs.stat)(input,checkThen(function(_ref){var size=_ref.size;if(size/1000>=150){streaming=true;}var startStream=streaming?streamParser:standardParser;if(output){(function(){var outDir=(0,_path.dirname)(output);(0,_fs.stat)(outDir,checkThen(startStream,function(){(0,_fs.mkdir)(outDir,startStream);}));})();}else{startStream();}}));function resolveArgs(argv){var args={_:[]};var last=null;var isNewArg=function isNewArg(arg){return!arg||arg.indexOf('-')===0;};for(var i=0;i<argv.length;i+=1){var arg=argv[i];if(isNewArg(arg)){var cur=arg.indexOf('--')!==-1?arg.slice(2):aliases[arg.slice(1)];var peek=argv.length-1!==i?argv[i+1]:null;var peekNew=isNewArg(peek);args[cur]=peekNew?true:peek;if(!peekNew){i+=1;}}else{args._.push(arg);}}return args;}function checkThen(){var resCallback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:done;var errCallback=arguments.length>1&&arguments[1]!==undefined?arguments[1]:error;return function(err,result){if(err){return errCallback(err);}resCallback(result);};}function streamParser(){var parserTransform=_index2.default.createParser();var singleNodeTransform=_index2.default.createStitcher();var readStream=(0,_fs.createReadStream)(input);var writeStream=output?(0,_fs.createWriteStream)(output):process.stdout;readStream.pipe(parserTransform);parserTransform.pipe(singleNodeTransform);singleNodeTransform.pipe(writeStream);parserTransform.on('error',error);singleNodeTransform.on('error',error);writeStream.on('finish',done);}function standardParser(){(0,_fs.readFile)(input,'utf8',checkThen(function(data){(0,_index2.default)(data,checkThen(function(ast){var result=void 0;try{result=JSON.stringify(ast,null,2);}catch(e){return error(e);}if(output){(0,_fs.writeFile)(output,result,checkThen(done));}else{process.stdout.write(result+'\n');done();}}));}));};
4 changes: 2 additions & 2 deletions dist/sqlite-parser.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/parser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/streaming-shim.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/streaming.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/tracer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "sqlite-parser",
"description": "JavaScript implentation of SQLite 3 query parser",
"author": "Code School (http://codeschool.com)",
"version": "1.0.0-beta2",
"version": "1.0.0-rc1",
"contributors": [
"Nick Wronski <[email protected]>"
],
Expand Down

0 comments on commit 6765e59

Please sign in to comment.