Skip to content

Commit

Permalink
upgrade rollup, prep new release (#92)
Browse files Browse the repository at this point in the history
* upgrade rollup, prep new release

* Update node to 6.14.0

* drop eslint like a rock
  • Loading branch information
Bryan Clark authored Oct 23, 2018
1 parent 5e26c0f commit 3baceed
Show file tree
Hide file tree
Showing 8 changed files with 1,284 additions and 880 deletions.
13 changes: 5 additions & 8 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"presets": [
[
"env",
{
"targets": {
"node": "6.11.3"
}
["@babel/preset-env", {
"targets": {
"node": "6.14.0",
}
]
]
}]
],
}
4 changes: 2 additions & 2 deletions __tests__/setup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ describe('setup', () => {

['_localStorage', '_sessionStorage'].forEach(gKey => {
it(`[${gKey}] should define a property on the global object with writable false`, () => {
require('../src/setup');
require('../src/setup');
expect(global[gKey.replace('_', '')].constructor.name).toBe(
'LocalStorage'
);
});

it(`[${gKey}] should define a property on the global object with writable false`, () => {
global[gKey] = true;
require('../src/setup');
require('../src/setup');
let e;
try {
global[`_${gKey.replace('_', '')}`] = 'blah';
Expand Down
13 changes: 9 additions & 4 deletions dist/setup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/setup.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 9 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,19 @@
},
"dependencies": {},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-jest": "^23.4.2",
"babel-plugin-external-helpers": "^6.22.0",
"babel-preset-env": "^1.6.1",
"eslint": "^4.10.0",
"eslint-config-prettier": "^3.0.1",
"eslint-plugin-prettier": "^2.3.1",
"jest": "^23.4.2",
"@babel/core": "^7.1.2",
"@babel/plugin-external-helpers": "^7.0.0",
"@babel/preset-env": "^7.1.0",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "*",
"jest": "*",
"prettier": "^1.8.2",
"rollup": "^0.66.0",
"rollup-plugin-babel": "^4.0.2",
"rollup": "^0.66.6",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-node-resolve": "^3.0.0"
},
"engines": {
"node": ">=6.11.3"
"node": ">=6.14.0"
},
"jest": {
"testURL": "http://localhost/",
Expand Down
12 changes: 0 additions & 12 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@ export default {
babel({
exclude: 'node_modules/**',
babelrc: false,
presets: [
[
'env',
{
targets: {
node: '6.11.3',
},
modules: false,
},
],
],
plugins: ['external-helpers'],
}),
],
output: {
Expand Down
14 changes: 7 additions & 7 deletions src/setup.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { LocalStorage } from "./localstorage";
import { LocalStorage } from './localstorage';

if (typeof global._localStorage !== "undefined") {
Object.defineProperty(global, "_localStorage", {
if (typeof global._localStorage !== 'undefined') {
Object.defineProperty(global, '_localStorage', {
value: new LocalStorage(jest),
writable: false
writable: false,
});
} else {
global.localStorage = new LocalStorage(jest);
}

if (typeof global._sessionStorage !== "undefined") {
Object.defineProperty(global, "_sessionStorage", {
if (typeof global._sessionStorage !== 'undefined') {
Object.defineProperty(global, '_sessionStorage', {
value: new LocalStorage(jest),
writable: false
writable: false,
});
} else {
global.sessionStorage = new LocalStorage(jest);
Expand Down
Loading

0 comments on commit 3baceed

Please sign in to comment.