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-rc3.
Browse files Browse the repository at this point in the history
  • Loading branch information
nwronski committed Nov 12, 2016
1 parent e70359e commit 253c9aa
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 15 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

## [Unreleased][unreleased]

## [v1.0.0-rc3] - 2016-11-12
### Changed
- `RangeError: Maximum call stack size exceeded` generated when running the uglified bundle (`dist/sqlite-parser.js`) in the browser, so I am skipping the minification step and only publishing the browserified bundle.

## [v1.0.0-rc2] - 2016-10-30
### Changed
- **BREAKING CHANGE** All named values for properties such as `variant`, `format`, and `type` should always be lowercase, even when uppercase in the input SQL (e.g., `variant` is now `natural join` instead of `NATURAL JOIN` in the AST).
Expand Down Expand Up @@ -1238,7 +1242,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-rc2...HEAD
[unreleased]: https://github.com/codeschool/sqlite-parser/compare/v1.0.0-rc3...HEAD
[v1.0.0-rc3]: https://github.com/codeschool/sqlite-parser/compare/v1.0.0-rc2...v1.0.0-rc3
[v1.0.0-rc2]: https://github.com/codeschool/sqlite-parser/compare/v1.0.0-rc1...v1.0.0-rc2
[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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm install sqlite-parser

### Beta version available

Try out the latest and greatest (currently `v1.0.0-rc2`)! Currently, the
Try out the latest and greatest (currently `v1.0.0-rc3`)! Currently, the
`sqlite-parser` CLI tool and streaming parser API are only available when
installing this module with the `beta` tag.

Expand Down Expand Up @@ -194,4 +194,4 @@ the parser will attempt to describe the area of concern
## Contributing

Contributions are welcome! You can get started by checking out the
[contributing guidelines](https://github.com/codeschool/sqlite-parser/blob/master/CHANGELOG.md).
[contributing guidelines](https://github.com/codeschool/sqlite-parser/blob/master/CONTRIBUTING.md).
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-rc2
* sqlite-parser - v1.0.0-rc3
* @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-rc2');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-rc3');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();}}));}));};
18 changes: 15 additions & 3 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-rc2",
"version": "1.0.0-rc3",
"contributors": [
"Nick Wronski <[email protected]>"
],
Expand Down

0 comments on commit 253c9aa

Please sign in to comment.