-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE FROM CONSUMER POINT OF VIEW - Rework library's build: - Remove webpack - Transpile src to JavaScript using babel-preset-typescript + babel-preset-env - Add "active"/"modern" browserslist config - Transform JavaScript closest to our browser targets using bugfixes option - Transpile individual source files instead of bundling - Migrate unit tests from mocha/should/sinon to Jest - Upgrade all dev dependencies - Improve package's scripts:
- Loading branch information
Showing
18 changed files
with
4,249 additions
and
3,261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Firefox ESR | ||
last 2 Chrome major versions | ||
last 2 Edge major versions | ||
last 2 Firefox major versions | ||
last 2 Opera major versions | ||
last 2 Safari major versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
plugins: [ | ||
['@babel/plugin-proposal-class-properties', { loose: true }], | ||
], | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
bugfixes: true, | ||
useBuiltIns: false, | ||
modules: 'commonjs', | ||
}, | ||
], | ||
'@babel/preset-typescript', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,49 +7,56 @@ | |
"files": [ | ||
"build" | ||
], | ||
"husky": { | ||
"hooks": { | ||
"pre-push": "npm run ci" | ||
} | ||
}, | ||
"directories": { | ||
"example": "examples" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "^2.2.46", | ||
"@types/sinon": "^4.1.3", | ||
"@types/ws": "^3.2.1", | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-preset-env": "^1.6.1", | ||
"husky": "^2.4.0", | ||
"mocha": "^4.0.1", | ||
"should": "^13.1.3", | ||
"sinon": "^4.1.5", | ||
"ts-loader": "^5.2.2", | ||
"ts-node": "^3.3.0", | ||
"tslint": "^5.6.0", | ||
"typescript": "^3.1.2", | ||
"typescript-formatter": "^7.0.0", | ||
"webpack": "^4.23.1", | ||
"webpack-cli": "^3.1.2", | ||
"ws": "^3.3.2" | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:Dashlane/ts-event-bus.git" | ||
}, | ||
"keywords": [ | ||
"ts-event-bus", | ||
"typescript", | ||
"event-bus" | ||
], | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
"ci": "npm run validate:lint && npm run validate:format && npm run test && node ./meta/audit.js", | ||
"test": "mocha --require ts-node/register --inline-diffs --reporter spec --recursive ./test/**/*.ts", | ||
"prebuild": "yarn build:clean", | ||
"build": "webpack --config webpack.config.js", | ||
"ci": "run-s validate:* test", | ||
"test": "jest", | ||
"build": "run-s build:*", | ||
"build:clean": "rm -rf ./build", | ||
"build:src": "babel src -d ./build --extensions \".ts\"", | ||
"build:dec": "tsc -d --emitDeclarationOnly --declarationMap", | ||
"validate": "run-p validate:*", | ||
"validate:lint": "tslint -t stylish --project .", | ||
"validate:format": "tsfmt --verify", | ||
"validate:typecheck": "tsc --noEmit", | ||
"validate:audit": "node ./meta/audit.js", | ||
"lint": "tslint --fix --project .", | ||
"format": "tsfmt -r", | ||
"prepublish": "yarn run build" | ||
"prepublishOnly": "run-s validate build" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:Dashlane/ts-event-bus.git" | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.12.10", | ||
"@babel/core": "^7.12.10", | ||
"@babel/plugin-proposal-class-properties": "^7.12.1", | ||
"@babel/preset-env": "^7.12.11", | ||
"@babel/preset-typescript": "^7.12.7", | ||
"@types/jest": "^26.0.20", | ||
"@types/ws": "^3.2.1", | ||
"husky": "^4.3.8", | ||
"jest": "^26.6.3", | ||
"npm-run-all": "^4.1.5", | ||
"tslint": "^5.6.0", | ||
"typescript": "^4.1.3", | ||
"typescript-formatter": "^7.2.2", | ||
"ws": "^3.3.2" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-push": "npm run ci" | ||
} | ||
}, | ||
"contributors": [ | ||
{ | ||
|
@@ -60,22 +67,5 @@ | |
"name": "Denis Schneider", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"keywords": [ | ||
"ts-event-bus", | ||
"typescript", | ||
"event-bus" | ||
], | ||
"resolutions": { | ||
"elliptic": ">=6.5.3", | ||
"js-yaml": ">=3.13.1", | ||
"just-extend": ">=4.0.0", | ||
"lodash": ">=4.17.19", | ||
"minimist": ">=0.2.1 <1.0.0 || >=1.2.3", | ||
"mixin-deep": ">=1.3.2 <2.0.0 || >=2.0.1", | ||
"serialize-javascript": ">=3.1.0", | ||
"set-value": ">=2.0.1 <3.0.0 || >=3.0.1", | ||
"yargs-parser": ">=13.1.2 <14.0.0 || >=15.0.1 <16.0.0 || >=18.1.2" | ||
}, | ||
"license": "Apache-2.0" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.