feature-toggle-service
Advanced tools
Comparing version 4.1.1 to 5.0.0
@@ -10,2 +10,20 @@ # Change Log | ||
## [5.0.0][] - 2020-05-13 | ||
### Updated | ||
- Upgrading devDependencies to the latest version | ||
- Upgrading `tslib` to `v1.12.0` | ||
- Upgrading `nodejs` to `v12.16.2` | ||
- Upgrading `engines` in `package.json` to accept NodeJS versions only greater or equal than `>=12` | ||
- Using Jest as test framework | ||
### Added | ||
- Adding different bundles for package | ||
- ESM | ||
- ES2015 | ||
- UMD | ||
- CJS | ||
## [4.1.1][] - 2019-06-22 | ||
@@ -34,2 +52,4 @@ | ||
<img width="701" alt="Added method description for Editor/IDE integration" src="https://user-images.githubusercontent.com/1252570/59961226-53d91480-9518-11e9-8f3f-acbaf952e955.png"> | ||
## [4.0.0][] - 2018-10-07 | ||
@@ -52,4 +72,3 @@ | ||
[Unreleased]: https://github.com/willmendesneto/feature-toggle-service/compare/v4.1.1...HEAD | ||
[unreleased]: https://github.com/willmendesneto/feature-toggle-service/compare/v4.1.1...HEAD | ||
[4.1.1]: https://github.com/willmendesneto/feature-toggle-service/compare/v4.1.0...v4.1.1 | ||
@@ -59,1 +78,5 @@ [4.1.0]: https://github.com/willmendesneto/feature-toggle-service/compare/v4.0.1...v4.1.0 | ||
[4.0.0]: https://github.com/willmendesneto/feature-toggle-service/tree/v4.0.0 | ||
[Unreleased]: https://github.com/willmendesneto/feature-toggle-service/compare/v5.0.0...HEAD | ||
[5.0.0]: https://github.com/willmendesneto/feature-toggle-service/tree/v5.0.0 |
@@ -12,3 +12,3 @@ # Contributing guide | ||
- Proposing features: explain the proposed feature, what it should do, why it is useful, how users should use it. Give us as much info as possible so it will be easier to discuss, access and implement the proposed feature. When you're unsure about a certain aspect of the feature, feel free to leave it open for others to discuss and find an appropriate solution. | ||
- Proposing features: explain the proposed feature, what it should do, why it is useful, how users should use it. Give us as much info as possible so it will be easier to discuss, access and implement the proposed feature. When you're unsure about a certain aspect of the feature, feel free to leave it open for others to discuss and find an appropriate solution. In case of a specific scenario, please recreate that in our Stackblitz demo (http://stackblitz.com/edit/feature-toggle-service-playground) and share the link. This will help in make the fix as quick as possible | ||
@@ -21,3 +21,3 @@ ## Proposing pull requests | ||
Implement your bug fix or feature, write tests to cover it and make sure all tests are passing (run a final `npm test` to make sure everything is correct). Then commit your changes, push your bug fix/feature branch to the origin (your forked repo) and open a pull request to the upstream (the repository you originally forked)'s master branch. | ||
Implement your bug fix or feature, write tests to cover it and make sure all tests are passing (run a final `yarn test` to make sure everything is correct). Then commit your changes, push your bug fix/feature branch to the origin (your forked repo) and open a pull request to the upstream (the repository you originally forked)'s master branch. | ||
@@ -27,5 +27,1 @@ ## Documentation | ||
Documentation is extremely important and takes a fair deal of time and effort to write and keep updated. Please submit any and all improvements you can make to the repository's docs. | ||
## Known issues | ||
If you're using npm@3 you'll probably face some issues related to peerDependencies. | ||
https://github.com/npm/npm/issues/9204 |
121
package.json
{ | ||
"name": "feature-toggle-service", | ||
"version": "4.1.1", | ||
"version": "5.0.0", | ||
"author": "Will Mendes <willmendesneto@gmail.com>", | ||
@@ -10,5 +10,11 @@ "description": "The simplest solution for feature toggle in Javascript. Simple how it should be.", | ||
}, | ||
"sideEffects": false, | ||
"license": "MIT", | ||
"main": "lib/feature-toggle-service.js", | ||
"types": "lib/feature-toggle-service.d.ts", | ||
"browser": "dist/umd/feature-toggle-service.js", | ||
"jsnext:main": "dist/esm/index.js", | ||
"module": "dist/esm/index.js", | ||
"main": "dist/cjs/index.js", | ||
"es2015": "dist/cjs/index.js", | ||
"cjs": "dist/cjs/index.js", | ||
"types": "dist/cjs/index.d.ts", | ||
"keywords": [ | ||
@@ -21,43 +27,52 @@ "feature-toggle-service", | ||
], | ||
"dependencies": {}, | ||
"dependencies": { | ||
"tslib": "^1.12.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^12.0.10", | ||
"babel-cli": "^6.24.1", | ||
"babel-core": "^6.25.0", | ||
"babel-loader": "^8.0.3", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", | ||
"babel-plugin-transform-es2015-modules-umd": "^6.24.1", | ||
"babel-plugin-transform-object-assign": "^6.22.0", | ||
"babel-plugin-transform-runtime": "^6.23.0", | ||
"babel-polyfill": "^6.23.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"babel-register": "^6.24.1", | ||
"babel-runtime": "^6.23.0", | ||
"bundlesize": "^0.17.0", | ||
"@types/jest": "^25.2.1", | ||
"@types/node": "^14.0.0", | ||
"@typescript-eslint/eslint-plugin": "^2.33.0", | ||
"@typescript-eslint/parser": "^2.33.0", | ||
"bundlesize": "^0.18.0", | ||
"changelog-verify": "^1.1.0", | ||
"mocha": "^6.0.0", | ||
"mustache": "^3.0.0", | ||
"nyc": "^14.1.0", | ||
"ts-node": "^8.0.3", | ||
"tslint": "^5.4.3", | ||
"typescript": "^3.1.1", | ||
"coveralls": "^3.1.0", | ||
"eslint": "^7.0.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-compat": "^3.3.0", | ||
"eslint-plugin-prettier": "^3.1.3", | ||
"fs-extra": "^9.0.0", | ||
"glob": "^7.1.4", | ||
"husky": "^4.2.5", | ||
"jest": "^26.0.1", | ||
"jsdom": "^16.2.2", | ||
"lint-staged": "^10.2.2", | ||
"prettier": "^2.0.5", | ||
"rollup": "^2.9.1", | ||
"ts-jest": "^25.5.1", | ||
"ts-node": "^8.10.1", | ||
"typescript": "^3.9.2", | ||
"typings": "^2.1.1", | ||
"uglify-js": "^3.0.10", | ||
"uglify-js": "^3.9.2", | ||
"usertiming": "^0.1.8", | ||
"version-changelog": "^3.1.0" | ||
}, | ||
"engines": { | ||
"node": ">=6.10.2" | ||
"node": ">=12" | ||
}, | ||
"scripts": { | ||
"compile": "tsc", | ||
"build": "npm run compile && babel lib --out-dir lib && npm run build-min && npm run generate-banner", | ||
"build-min": "uglifyjs lib/feature-toggle-service.js --comments '/!/' -m --screw-ie8=true -c unused=false -o lib/feature-toggle-service.min.js", | ||
"pretest": "tslint --project tsconfig.json", | ||
"test": "npm run compile && NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test/*.spec.js --require ./test/setup.js", | ||
"clean": "rm -rf ./dist ./.jest ./coverage ./lib", | ||
"build": "yarn build:es2015 && yarn build:cjs && yarn build:esm && yarn build:umd", | ||
"build:umd": "rollup dist/esm/index.js --format umd --name PerfMarks -o dist/umd/feature-toggle-service.js && yarn build:umd:min", | ||
"build:umd:min": "uglifyjs --compress --mangle --screw-ie8 --comments -o dist/umd/feature-toggle-service.min.js -- dist/umd/feature-toggle-service.js && gzip dist/umd/feature-toggle-service.min.js -c > dist/umd/feature-toggle-service.min.js.gz", | ||
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015", | ||
"build:esm": "tsc --module esnext --target es5 --outDir dist/esm", | ||
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs", | ||
"test": "jest", | ||
"pretest:ci": "yarn lint", | ||
"test:ci": "jest --coverage --coverageReporters=text-lcov | coveralls", | ||
"check-coverage": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls && rm -rf coverage", | ||
"prepublish": "npm run build", | ||
"generate-banner": "node generate-banner.js", | ||
"bundlesize": "bundlesize", | ||
"lint": "eslint './src/**/*.[tj]s'", | ||
"lint:fix": "prettier --no-editorconfig --write", | ||
"version": "version-changelog CHANGELOG.md && changelog-verify CHANGELOG.md && git add CHANGELOG.md" | ||
@@ -67,6 +82,42 @@ }, | ||
{ | ||
"path": "./lib/feature-toggle-service.min.js", | ||
"maxSize": "449B" | ||
"path": "./dist/esm/index.js", | ||
"maxSize": "62B" | ||
}, | ||
{ | ||
"path": "./dist/es2015/index.js", | ||
"maxSize": "62B" | ||
}, | ||
{ | ||
"path": "./dist/cjs/index.js", | ||
"maxSize": "156B" | ||
}, | ||
{ | ||
"path": "./dist/umd/feature-toggle-service.js", | ||
"maxSize": "644B" | ||
}, | ||
{ | ||
"path": "./dist/umd/feature-toggle-service.min.js", | ||
"maxSize": "353B" | ||
} | ||
], | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.{js,ts}": [ | ||
"prettier --no-editorconfig --write", | ||
"git add" | ||
] | ||
}, | ||
"browserslist": [ | ||
"last 1 chrome versions", | ||
"last 1 edge versions", | ||
"last 1 firefox versions", | ||
"last 1 safari versions", | ||
"last 1 and_chr versions", | ||
"last 1 ios_saf versions", | ||
"ie 11" | ||
] | ||
} |
# Feature Toggle Service | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/willmendesneto/feature-toggle-service.svg)](https://greenkeeper.io/) | ||
[![npm](https://img.shields.io/badge/stackblitz-online-orange.svg)](https://stackblitz.com/edit/feature-toggle-service-playground) | ||
@@ -8,3 +9,3 @@ [![npm version](https://badge.fury.io/js/feature-toggle-service.svg)](http://badge.fury.io/js/feature-toggle-service) [![npm downloads](https://img.shields.io/npm/dm/feature-toggle-service.svg)](https://npmjs.org/feature-toggle-service) | ||
[![Build Status](https://travis-ci.org/willmendesneto/feature-toggle-service.svg?branch=master)](https://travis-ci.org/willmendesneto/feature-toggle-service) | ||
[![Build Status](https://circleci.com/gh/willmendesneto/feature-toggle-service.svg?style=shield)](https://circleci.com/gh/willmendesneto/feature-toggle-service) | ||
[![Coverage Status](https://coveralls.io/repos/willmendesneto/feature-toggle-service/badge.svg?branch=master)](https://coveralls.io/r/willmendesneto/feature-toggle-service?branch=master) | ||
@@ -16,2 +17,3 @@ [![Dependency Status](https://david-dm.org/willmendesneto/feature-toggle-service.svg)](https://david-dm.org/willmendesneto/feature-toggle-service) | ||
![Perf marks](./images/feature-toggle-service.png) | ||
The simplest solution for [feature toggles](http://martinfowler.com/bliki/FeatureToggle.html) in Javascript. Simple how it should be. | ||
@@ -31,2 +33,6 @@ | ||
## Contributing | ||
Please check our [contributing.md](https://github.com/willmendesneto/feature-toggle-service/blob/master/contributing.md) to know more about setup and how to contribute. | ||
## Setup and installation | ||
@@ -43,3 +49,2 @@ | ||
$ nvm use $(cat .nvmrc); # use nodejs version | ||
$ npm install | ||
``` | ||
@@ -54,3 +59,2 @@ | ||
$ nvm use $(cat .nvmrc); # use nodejs version | ||
$ npm install | ||
``` | ||
@@ -64,24 +68,42 @@ | ||
### Install yarn | ||
We use `yarn` as our package manager instead of `npm` | ||
[Install it following these steps](https://yarnpkg.com/lang/en/docs/install/#mac-tab) | ||
After that, just navigate to your local repository and run | ||
```bash | ||
$ yarn install | ||
``` | ||
## Demo | ||
Try out the [demo](https://github.com/willmendesneto/feature-toggle-service/blob/master/demo/index.html)! | ||
Try out our [demo on Stackblitz](https://feature-toggle-service-playground.stackblitz.io)! | ||
## Run the app | ||
### Run the tests | ||
```bash | ||
$ npm start | ||
$ yarn test # run the tests | ||
``` | ||
## Run the tests | ||
### Run the build | ||
```bash | ||
$ npm test # run the tests | ||
$ yarn build # run the tests | ||
``` | ||
## Run the build | ||
### Run the bundlesize check | ||
```bash | ||
$ npm run build # run the tests | ||
$ yarn bundlesize # run the tests | ||
``` | ||
### Run the code lint | ||
```bash | ||
$ yarn lint # run the tests | ||
``` | ||
## `FeatureToggleService` | ||
@@ -99,2 +121,8 @@ | ||
## Publish | ||
this project is using `np` package to publish, which makes things straightforward. EX: `np <patch|minor|major>` | ||
> For more details, [please check np package on npmjs.com](https://www.npmjs.com/package/np) | ||
## Author | ||
@@ -101,0 +129,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
20981
21
222
127
0
1
26
2
+ Addedtslib@^1.12.0
+ Addedtslib@1.14.1(transitive)