-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to current babel, switch to jest. BREAKING CHANGE: Changed major versions of tools respectively changed tools completly and drop support for node < 6.
- Loading branch information
Showing
24 changed files
with
3,773 additions
and
2,411 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,30 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: 6, | ||
browsers: ['last 4 versions', 'safari >= 7'] | ||
} | ||
} | ||
] | ||
], | ||
env: { | ||
production: { | ||
presets: ['minify'], | ||
retainLines: false | ||
} | ||
}, | ||
plugins: [ | ||
// ['@babel/plugin-proposal-decorators', { legacy: true }], | ||
'@babel/plugin-transform-modules-commonjs', | ||
'@babel/plugin-transform-runtime', | ||
'@babel/plugin-proposal-class-properties', | ||
'@babel/plugin-proposal-object-rest-spread', | ||
'@babel/plugin-transform-react-constant-elements', | ||
'@babel/plugin-proposal-function-bind' | ||
] | ||
// ignore: ['/node_modules/(?!__mocks__|__tests__)'], | ||
// retainLines: true | ||
}; |
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 @@ | ||
8 |
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 |
---|---|---|
@@ -1,23 +1,21 @@ | ||
sudo: false | ||
language: node_js | ||
cache: | ||
directories: | ||
- node_modules | ||
- ~/.npm | ||
notifications: | ||
email: false | ||
node_js: | ||
- '4' | ||
- '0.12' | ||
- '0.10' | ||
before_install: | ||
- npm i -g npm@^2.0.0 | ||
- '10' | ||
- '9' | ||
- '8' | ||
- '6' | ||
before_script: | ||
- npm prune | ||
- yarn install --ignore-engines | ||
script: | ||
- yarn test | ||
- yarn run build | ||
after_success: | ||
- 'curl -Lo travis_after_all.py https://git.io/travis_after_all' | ||
- python travis_after_all.py | ||
- 'export $(cat .to_export_back) &> /dev/null' | ||
- npm run semantic-release | ||
- npm run travis-deploy-once "npm run semantic-release" | ||
branches: | ||
except: | ||
- "/^v\\d+\\.\\d+\\.\\d+$/" | ||
- /^v\d+\.\d+\.\d+$/ |
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 @@ | ||
--install.ignore-engines true |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,16 +1,37 @@ | ||
{ | ||
"name": "tiny-di", | ||
"description": "A tini tiny dependency injection container for node/io.js applications", | ||
"version": "0.0.0", | ||
"version": "0.0.0-development", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"prepublish": "npm run clean && npm run build && npm test", | ||
"clean": "rimraf dist", | ||
"test": "istanbul cover jasmine", | ||
"test": "jest", | ||
"test-travis": "istanbul cover jasmine && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", | ||
"build": "gulp", | ||
"watch": "gulp watch", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
"build": "babel src -d dist", | ||
"watch": "babel src -d dist --watch", | ||
"semantic-release": "semantic-release", | ||
"travis-deploy-once": "travis-deploy-once" | ||
}, | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
"js", | ||
"jsx", | ||
"ts", | ||
"tsx" | ||
], | ||
"testMatch": [ | ||
"**/__tests__/**/*.(js|ts)?(x)", | ||
"**/?(*.)+(spec|test).(js|ts)?(x)" | ||
], | ||
"testPathIgnorePatterns": [ | ||
"<rootDir>/build/", | ||
"<rootDir>/node_modules/", | ||
"<rootDir>/dist/" | ||
], | ||
"transform": { | ||
"^.+\\.(js|jsx|ts|tsx)$": "babel-jest" | ||
} | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
@@ -28,23 +49,25 @@ | |
"author": "Dennis Saenger <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"coveralls": "2.11.4", | ||
"@babel/cli": "7.2.0", | ||
"@babel/core": "7.2.0", | ||
"@babel/plugin-proposal-class-properties": "7.2.1", | ||
"@babel/plugin-proposal-function-bind": "7.2.0", | ||
"@babel/plugin-proposal-object-rest-spread": "7.2.0", | ||
"@babel/plugin-transform-modules-commonjs": "7.2.0", | ||
"@babel/plugin-transform-react-constant-elements": "7.2.0", | ||
"@babel/plugin-transform-runtime": "7.2.0", | ||
"@babel/preset-env": "7.2.0", | ||
"@babel/runtime": "7.2.0", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-jest": "23.6.0", | ||
"git-changelog": "0.1.8", | ||
"grunt": "0.4.5", | ||
"gulp": "3.9.0", | ||
"gulp-babel": "5.2.1", | ||
"gulp-cli": "0.3.0", | ||
"gulp-jasmine": "2.1.0", | ||
"gulp-rename": "1.2.2", | ||
"gulp-sourcemaps": "1.5.2", | ||
"istanbul": "0.3.21", | ||
"jasmine": "2.4.1", | ||
"proxyquire": "1.7.3", | ||
"jest": "23.6.0", | ||
"rimraf": "2.4.3", | ||
"source-map-support": "0.3.2", | ||
"semantic-release": "^4.3.5" | ||
"semantic-release": "15", | ||
"travis-deploy-once": "^5.0.9" | ||
}, | ||
"dependencies": { | ||
"babel-runtime": "5.8.25" | ||
"@babel/polyfill": "7.0.0" | ||
} | ||
} |
File renamed without changes.
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 |
---|---|---|
@@ -1,17 +1,15 @@ | ||
'use strict'; | ||
|
||
var UUT = require('../dist/base').AbstractBase; | ||
const { AbstractBase } = require('../base'); | ||
|
||
describe('base.es6', function() { | ||
|
||
it('should take injector & key via constructor', function() { | ||
var injector = jasmine.createSpy('injector'); | ||
var key = jasmine.createSpy(key); | ||
var injector = jest.fn(); | ||
var key = jest.fn(); | ||
|
||
var uut = new UUT(injector, key); | ||
var uut = new AbstractBase(injector, key); | ||
|
||
expect(uut.injector).toEqual(injector); | ||
expect(uut.key).toEqual(key); | ||
}); | ||
|
||
}); |
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.