-
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.
* 1.3.0
- Loading branch information
Showing
16 changed files
with
56 additions
and
36 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,15 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.3.0] - 2017-12-22 | ||
### Added | ||
- start using CHANGELOG | ||
### Changed | ||
- use npm org in package name (rduk-errors -> @rduk/errors) | ||
- update README | ||
- update jasmine version (2.6.0 -> 2.8.0) | ||
- update coveralls version (2.13.0 -> 3.0.0) | ||
- update copyright |
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,6 +1,6 @@ | ||
MIT License | ||
|
||
Copyright (c) 2016 Kim UNG | ||
Copyright (c) 2016 - 2017 RDUK <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) 2016 Kim UNG | ||
* Copyright (c) 2016 - 2018 RDUK <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -67,7 +67,7 @@ | |
} | ||
|
||
var hidden = '_' + name; | ||
|
||
Object.defineProperty(factory, name, { | ||
get: function() { | ||
if (!factory.hasOwnProperty(hidden)) { | ||
|
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,7 +1,7 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) 2016 Kim UNG | ||
* Copyright (c) 2016 - 2018 RDUK <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -33,7 +33,7 @@ | |
this, | ||
util.format( | ||
'Invalid argument "%s" (value: "%s").', | ||
propertyName, | ||
propertyName, | ||
propertyValue)); | ||
}; | ||
|
||
|
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,7 +1,7 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) 2016 Kim UNG | ||
* Copyright (c) 2016 - 2018 RDUK <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
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,7 +1,7 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) 2016 Kim UNG | ||
* Copyright (c) 2016 - 2018 RDUK <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
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,7 +1,7 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) 2016 Kim UNG | ||
* Copyright (c) 2016 - 2018 RDUK <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
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,7 +1,7 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) 2016 Kim UNG | ||
* Copyright (c) 2016 - 2018 RDUK <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
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,7 +1,7 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) 2016 Kim UNG | ||
* Copyright (c) 2016 - 2018 RDUK <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
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,7 +1,7 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) 2016 Kim UNG | ||
* Copyright (c) 2016 - 2018 RDUK <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
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,30 +1,31 @@ | ||
{ | ||
"name": "rduk-errors", | ||
"version": "1.2.3", | ||
"name": "@rduk/errors", | ||
"version": "1.3.0", | ||
"description": "Custom Errors library for Node", | ||
"main": "lib/factory.js", | ||
"scripts": { | ||
"lint": "jshint lib/**/*.js", | ||
"pretest": "npm run lint", | ||
"test": "istanbul cover jasmine", | ||
"posttest": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" | ||
"test": "istanbul cover node_modules/jasmine/bin/jasmine.js --report cobertura", | ||
"posttest": "istanbul report && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" | ||
}, | ||
"author": "Kim UNG", | ||
"author": "RDUK", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/rd-uk/rduk-errors" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/rd-uk/rduk-errors/issues" | ||
}, | ||
"homepage": "https://github.com/rd-uk/rduk-errors#readme", | ||
"keywords": [ | ||
"rduk", | ||
"custom", | ||
"errors", | ||
"nodejs" | ||
], | ||
"devDependencies": { | ||
"coveralls": "2.13.0", | ||
"coveralls": "3.0.0", | ||
"istanbul": "0.4.5", | ||
"jasmine": "2.6.0", | ||
"jshint": "2.9.5" | ||
"jasmine": "2.8.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) 2016 Kim UNG | ||
* Copyright (c) 2016 - 2018 RDUK <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
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,7 +1,7 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) 2016 Kim UNG | ||
* Copyright (c) 2016 - 2018 RDUK <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
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,7 +1,7 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) 2016 Kim UNG | ||
* Copyright (c) 2016 - 2018 RDUK <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
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,7 +1,7 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) 2016 Kim UNG | ||
* Copyright (c) 2016 - 2018 RDUK <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -105,7 +105,7 @@ describe('errors', function() { | |
describe('call with bad ctor', function() { | ||
it('should throw an ArgumentError on error instantiation', function() { | ||
expect(function() { | ||
errors.add('UnknownError'); | ||
errors.add('UnknownError'); | ||
errors.throwUnknownError(); | ||
}).toThrowError(errors.ArgumentError); | ||
}); | ||
|
@@ -122,7 +122,7 @@ describe('errors', function() { | |
describe('call with name and ctor as class path', function() { | ||
it('should success', function() { | ||
errors.add('FakeError1', path.resolve('spec/FakeError1')); | ||
|
||
expect(function() { | ||
errors.throwFakeError1(); | ||
}).toThrowError(errors.FakeError1); | ||
|
@@ -132,7 +132,7 @@ describe('errors', function() { | |
describe('call with name and ctor as function', function() { | ||
it('should success', function() { | ||
errors.add('FakeError2', require('./FakeError2')); | ||
|
||
expect(function() { | ||
errors.throwFakeError2(); | ||
}).toThrowError(errors.FakeError2); | ||
|
@@ -142,7 +142,7 @@ describe('errors', function() { | |
describe('call with custom base', function() { | ||
it('should success', function() { | ||
errors.add('FakeError3', require('./FakeError3'), errors.FakeError2); | ||
|
||
expect(function() { | ||
errors.throwFakeError3(); | ||
}).toThrowError(errors.FakeError3); | ||
|
@@ -157,7 +157,7 @@ describe('errors', function() { | |
errors.add('FakeError4', function FakeError4() { | ||
FakeError4.super_.call(this); | ||
}, errors.FakeError3); | ||
|
||
expect(function() { | ||
errors.throwFakeError4(); | ||
}).toThrowError(errors.FakeError4); | ||
|