Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.0 #125

Merged
merged 40 commits into from
Feb 16, 2017
Merged

1.0.0 #125

merged 40 commits into from
Feb 16, 2017

Conversation

tjbenton
Copy link
Collaborator

No description provided.

tjbenton and others added 30 commits November 17, 2016 09:23
* updated linting to use `lint-rules`

* General cleanup

- Fixed a few linting errors
  - Updated all main functions to use `function` instead of arrow functions. This improves readability so you can tell the difference between helper functions declared in a main function and global functions.
  - Updated all functions to be camel case, this also improves readability to tell the difference between functions and everything else.
  - Updated the way some functions were exported to make the be exported where they were declared instead of at the bottom of the files.
  - Removed instances of `'use strict';` because babel already adds this in for you automatically
  - Updated all if statements that have `&&` or `||` to have line breaks between them to improve readability
  - `async-array-methods`
  - `es6-promisify`
  - ` fs-extra-promisify`
  - `globby `
  - Replaced `readDirectory` with `findFiles` which is a much faster way to recursively get all the files in a directory
  - Removed `isDirectory` because it's not being used.
  - Removed `readFile`, and `makeDirectory` because `fs-extra-promisify` handles these.
  - Added `readFiles`. This is useful because it also supports `zip` files
This update removes several functions that weren't necessary. Also made the code easier to read by reworking the functions by using helper libraries that are doing the redundant part of this file.
This update removes several functions that aren't needed and aslo removes the `async` from functions that don't actually need it. It simplifies the overall purpose of the file by using existing helpers, and reworks other functions that were to verbose.
This update normalizes the way the parsers are used so it doesn't have to be done on a file by file basis. It should reduce the amount of code around converting the functionality of these other parsers significantly
* added the ability to add documentation

This will allow us to document the api to make it easier to know what's avaiable and what's actually going on.

* removed Yarn for now

This is because yarn doesn't handle binaries correctly, and also doesn't handle things like couchbase which have node-gyp and that have to compile when it's being installed.

* Moved the cli to to be under `cli.js`

* Renamed `generator.js` to be `index.js`

This is so that the main file will  be the `index.js` file. This way we can export it and get the same functionality.

* added the Logger to the utils

This will be the base logger that is used throughout the application

* added documentation to the other util functions

* added support for ci testing

* added unit tests and bug fixes for `utils.js`

* syntax update
* added the ability to add documentation

This will allow us to document the api to make it easier to know what's avaiable and what's actually going on.

* removed Yarn for now

This is because yarn doesn't handle binaries correctly, and also doesn't handle things like couchbase which have node-gyp and that have to compile when it's being installed.

* Moved the cli to to be under `cli.js`

* Renamed `generator.js` to be `index.js`

This is so that the main file will  be the `index.js` file. This way we can export it and get the same functionality.

* added the Logger to the utils

This will be the base logger that is used throughout the application

* added documentation to the other util functions

* added support for ci testing

* added unit tests and bug fixes for `utils.js`

* syntax update

* added `base.js` which will be the base for all the classes

This will allow you to run each of the functionalities separately without having to depend on each other. It will also allow the logging to be consistent throught the app.

* added ability to pass a glob to `utils.findFiles`

* updated the way models were parsed

This update removed global variables that were being used in those functions, in favor of passing in the model that is being manipulated.

Also removes the logic that was being used to resolve dependencies in favor of using `dependency-resolver` that already handles this functionality. This will reduce the amount of testing that we have to do around this file.

* added babel-external-helpers

* Updated input to be a class

* updated models to be a class

Also drastically simplified the exisitng code by reworking a few functions and using dependency-resolver to resolve the different dependencies for each model

* updated the main fakit function to be a class

This main function extends Inputs, Models, and the Base

* Updated the cli to only pass valid options.

* Updated documents to be a class

Also updated to generate documents in documents instead of in models

* Updated to return models as an array

This update is to remove the need for `this.model_order` by ordering them to begin with.

* Cleaned up the cli

Also added several todo items to help the various changes that need to take place before the release.

* replaced `--format` with `--spacing`

* Added the base for the new Output class

This also adds tests for validation and options that have been passed.

* Added the base functionality to the outputters

* Finished folder output

Complete with tests

* added a pool utility function

This is a function that is similar to `map` but it will limit the concurrancy of the functions that're running.

* updated archive option to be a filename

* added the zip output type

complete with tests

* general cleanup

* removed the need for output document

* added the `key` generated document

* updated the way the setup function determins the outputter

This update is to accomidate the `return` option

* update the file generation for the zip test

This just updates the location as to where the files get created.

* added the base for `Output.output`

This also adds test cases for the different types and languages.

* added a few prepare tests for output

* added the finalize function

* added the timeout option that's used for servers

* setup the rest of the sync-gateway output

* setup the rest of couchbase output

* removed `object-path` in favor of lodash `set` and `get`

* cleaned up dependencies

* fixed bug with the verbose logging option

* Updated couchbase output to use `couchbase-promises`

Also added test cases for them to ensure it's working correctly

* Added a few tests for sync-gateway

* remove the Documents class because it's no longer needed

* Updated the main fakit class

* added nyc code coverage

* added the basis for testing the data generation

* 🗑removed the `output.js`
* made a smarter todo list

* Updated models

This is complete with tests

* added the ability to include input files in the model it's self

* Added better error messaging for failed pre/post functions

* improved the test utils

* added a way to get the users babel config

* updated the make file to have documentation

* Finished up`parseModelInputs`

* Updated model functions to use `|` instead of `>`

This is because of issue #84

* Finished up `parseModelFunctions`

Babel support now exists

* Removed `return` from single line functions

Also updated other js standards

* Finished up `parseModelReferences`

* Finished up `parseModelTypes`

* added a json diff checker for testing

* Finished up `parseModelDefaults`

* Finished up `parseModelCount`

* Finished up `filterModelFiles`

* Finished up `parseModelDependencies`

This update makes data.dependencies an array of urls so you don't have to pass them in anymore

* Finished up `resolveDependenciesOrder`

* Finished up `registerModels`

* Finished up code coverage for models
* Setup base for data tests

* Finished up `getPaths`

* Finished up `typeToValue`

* Finished up Document `init`

* Finished up `initializeDocument`

* Finished up `buildObject`

* Finished up `buildValue`

* Finished up `postProcess`

* Finished up `transformValueToType`

* Moved `postProcessCallback` to be inside `postProcess`

There's no reason for this to be a seperate function so it was moved to be inside of the only place it was being used.

* Finished up `runData`

* Finished up `buildDocument`

* Finished up `build`

* Removed the testing `utils.string` function

Found out it's not needed since you can just pass in the exact string instead

* cleanup validation

* bugfix for `parseModelCount`

* Updated `index.test.js` so only 1-6 documents will get created

This required me to use proxyquire to overwrite the document build function so that I could overwrite the functions count and the pre_run functions for each model

* Finished up Fakeit.generate
* added tests for `Logger.time` and `Logger.timeEnd`

* removed unused functions in Logger

* added more tests for `Logger.log`

* ignore a few parts of the parser tests that are too hard to mock

* added more test cases for `objectSearch`

* added a test for `findFiles`

* improved output/couchbase code coverage

* Updated tests for sync-gateway

this doesn't add many tests but it improves the code coverage.

* improved code coverage for `output/index`
* bugfix display options count if it exists or the model.count

* added the highlight option and csv tables

* added the cli complete with tests

* bugfix for the way dependencies are set

This update ensures that the dependency is always set correctly

* Updated the main readme file to be more up to date
* Updated the max count to be 0 if it wasn't defined already

* Removed the parsing of `items.data.count` in `parseModelCount`

This has to be handled by the document generation so that all the documents to have arrays that're the same length.

* Moved the logic for min and max for items to the documents
* Added `parseModelSeed`

* fixed make coverage command

It was building the files every time instead of running the check for source files correctly

* added documentation for it in the readme file

* added support for seeds during document generation

* added support for seed to the cli

* Added a note about `faker.date` not working with seeds
* Moved Logger into it's own file

* fixed missed code coverage line for cli

* added missed code coverage for logger

* updated make codecoverage to fail test if not it's not in the threshold
* added missing dependency of `cli-table`

* removed coverage check
* bugfix for babel config

Babel config wasn't being found correctly and this fixes the issue. Also added a test case for it.

* removed dob from cli test

This is because dates won't generate the same thing when using seeds.

* added in code coverage check to `make ci`

* added `babel-plugin-array-includes`

* added `babel-plugin-transform-runtime`

* removed es6 instances from test/utils.js

* Fixed testing issues with older versions of node
* added spinner support to help show progression

* added spinners to base

* updated tests for documents, and index remove pre_run overwrites

These files were overwriting models `pre_run` function if it had `this.data.count` referenced to reduce the amount of time it took for unit tests to run for certain models. This is no longer needed because of a simple update to documents

* added spinners to models

* added spinners to documents

* added spinners to cli

This update also had to update the output to the console to match the new way of showing documents being generated.

* updated index tests to reflect the spinner update

* added spinners to output

Had to make a few updates around the console because the spinner output should go before the console output so the console outputter only prepares the output for the console and the main output function handles outputting it to the console

* fixed typo for cli and spinners

* updated documents to handle the spinners better by making it async

* Updated social models to output a smaller set of data

* updated logger to use format-seconds

This way when long processes happen it will display in min and not sec

* added a timer for the main generator

This way it will display the total number of documents that were created and how long it took.

* bugfix for base to turn off spinners if log is false

* added `require` to the arguments to pass the model functions

* updated cli to parse models better and updated help verbage

* added example and updated verbage

also added a changelog note about the progress indicator

* bugfix for older versions of node
tjbenton and others added 10 commits January 23, 2017 10:13
* moved model defaults to up ensure they're set

* fixed typo in cli

* updated install docs to include --save-dev and --global

* added better description for `type` complete with examples

* relocated `key` to be lower and added a better description with examples

* relocated `seed`

* updated examples

* updated badges to use img.shields.io
The output tests have been updated to account for the username not being required when outputting to couchbase
* updated dependencies

* fixed models spinner to be correct

* bugfix `parseModelDependencies`

Fixes a bug where if two files required the same dependency the second model passed would have it's dependencies removed which causes issues when trying to make the document generation smarter.

* updated to exit if lint fails

* bugfix for memory leak

* added `resolveDependants`

This adds an array of model files that are dependent on each model

* added `events-async`

* Created a `Documents` class that runs the models in a more efficient way

* pr fixes

* if the model that's passed is `flight-data` make it run serial

This is to improve performance on all tests since the flight-data tests are the most cpu intensive. It increases the speed of the tests, and decreases the cpu usage

* updated to `events-async@1.1.0`

* fixed error with `make lint` on node v4
@tjbenton tjbenton added this to the 1.0.0 milestone Feb 16, 2017
@coveralls
Copy link

coveralls commented Feb 16, 2017

Coverage Status

Changes Unknown when pulling 8db52fc on dev into ** on master**.

@bentonam bentonam merged commit f0ef37d into master Feb 16, 2017
tjbenton added a commit that referenced this pull request Feb 16, 2017
* 'master' of https://github.com/bentonam/fakeit:
  1.0.0
  1.0.0 (#125)
  Release 0.4.0
  Release 0.3.3

# Conflicts:
#	Makefile
#	README.md
#	package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants