Skip to content

Commit

Permalink
Updated all dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lmaccherone committed Nov 17, 2019
1 parent 7873171 commit 5c4b330
Show file tree
Hide file tree
Showing 16 changed files with 676 additions and 321 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
@@ -1,5 +1,5 @@
language: node_js
node_js:
- "0.12"
- "4.0"
- "5.1"
- "8"
- "10"
- "12"
18 changes: 1 addition & 17 deletions Cakefile
Expand Up @@ -38,25 +38,9 @@ task('compile', 'Compile CoffeeScript source files to JavaScript', () ->
)
)

task('test', 'Run the CoffeeScript test suite with nodeunit', () ->
# invoke('testES6') # Commented out for now until we use Proxy support in later versions to enable array/
{reporters} = require('nodeunit')
process.chdir(__dirname)
reporters.default.run(['test'], undefined, (failure) ->
if failure?
console.log(failure)
process.exit(1)
)
)

task('testES6', 'Run tests in testES6 folder with --harmony-proxies flag', () ->
# runSync("node --harmony-proxies node_modules/nodeunit/bin/nodeunit testES6/es6Test.coffee")
runSync("node node_modules/nodeunit/bin/nodeunit testES6/es6Test.coffee")
)

task('publish', 'Publish to npm and add git tags', () ->
process.chdir(__dirname)
runSync('cake test') # Doing this externally to make it synchronous
runSync('npm test') # Doing this externally to make it synchronous
process.chdir(__dirname)
runSync('cake compile')
console.log('checking git status --porcelain')
Expand Down
16 changes: 16 additions & 0 deletions LICENSE.md
@@ -0,0 +1,16 @@
Copyright (c) 2011 Lawrence S. Maccherone, Jr.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
6 changes: 5 additions & 1 deletion LocalStorage.coffee
Expand Up @@ -24,14 +24,14 @@ _escapeKey = (key) ->

class QUOTA_EXCEEDED_ERR extends Error
constructor: (@message = 'Unknown error.') ->
super()
if Error.captureStackTrace?
Error.captureStackTrace(this, @constructor)
@name = @constructor.name

toString: () ->
return "#{@name}: #{@message}"


class StorageEvent
constructor: (@key, @oldValue, @newValue, @url, @storageArea = 'localStorage') ->

Expand All @@ -51,6 +51,10 @@ class LocalStorage extends events.EventEmitter
instanceMap = {}

constructor: (@_location, @quota = 5 * 1024 * 1024) ->
super()
# super(_location, quota)
# @_location = _location
# @quota = quota
unless this instanceof LocalStorage
return new LocalStorage(@_location, @quota)

Expand Down
37 changes: 11 additions & 26 deletions README.md
@@ -1,5 +1,4 @@
[![build status](https://secure.travis-ci.org/lmaccherone/node-localstorage.png)](http://travis-ci.org/lmaccherone/node-localstorage)
[![bitHound Score](https://www.bithound.io/github/lmaccherone/node-localstorage/badges/score.svg)](https://www.bithound.io/github/lmaccherone/node-localstorage)
# node-localstorage #

Copyright (c) 2012, Lawrence S. Maccherone, Jr.
Expand Down Expand Up @@ -40,15 +39,17 @@ Author: [Larry Maccherone](http://maccherone.com)

### CoffeeScript ###

unless localStorage?
{LocalStorage} = require('../') # require('node-localstorage') for you
localStorage = new LocalStorage('./scratch')
```coffee
unless localStorage?
{LocalStorage} = require('../') # require('node-localstorage') for you
localStorage = new LocalStorage('./scratch')

localStorage.setItem('myFirstKey', 'myFirstValue')
console.log(localStorage.getItem('myFirstKey'))
# myFirstValue

localStorage._deleteLocation() # cleans up ./scratch created during doctest
localStorage.setItem('myFirstKey', 'myFirstValue')
console.log(localStorage.getItem('myFirstKey'))
# myFirstValue

localStorage._deleteLocation() # cleans up ./scratch created during doctest
```

### ReactJs ###

Expand Down Expand Up @@ -87,6 +88,7 @@ node -r node-localstorage/register my-code.js

## Changelog ##

* 2.0.0 - 2019-10-17 - Updated all the depdendencies, added ability to register as polyfill (thanks @dy)
* 1.3.1 - 2018-03-19 - Resolves issue #32 (thanks, plamens)
* 1.3.0 - 2016-04-09 - **Possibly backward breaking if you were using experimental syntax** Reverted experimental
associative array and dot-property syntax. The API for Proxy changed with node.js v6.x which broke it. Then when
Expand Down Expand Up @@ -114,20 +116,3 @@ node -r node-localstorage/register my-code.js
* 0.1.2 - 2012-11-02 - Finally got Travis CI working
* 0.1.1 - 2012-10-29 - Update to support Travis CI
* 0.1.0 - 2012-10-29 - Original version

## MIT License ##

Copyright (c) 2011, 2012, Lawrence S. Maccherone, Jr.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

0 comments on commit 5c4b330

Please sign in to comment.