Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
Merge pull request #5 from hvolschenk/fix/dependency-updates
Browse files Browse the repository at this point in the history
fix: update dependencies

use new `dubnium-alpine` base docker image
update babel configuration
update jest configuration
use `files` section in `package.json` instead of `.npmignore`
  • Loading branch information
hvolschenk committed Dec 11, 2018
2 parents d0d41fd + 64883cc commit fdbed81
Show file tree
Hide file tree
Showing 12 changed files with 10,960 additions and 7,340 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

16 changes: 16 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,23 @@
"node": true
},
"extends": "airbnb",
"parser": "babel-eslint",
"rules": {
"function-paren-newline": ["error", "consistent"],
"implicit-arrow-linebreak": "off",
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"newlines-between": "always"
}
],
"jsx-a11y/anchor-is-valid": "off",
"lines-between-class-members": "off",
"object-curly-newline": ["error", { "consistent": true }],
"operator-linebreak": "off",
"react/destructuring-assignment": "off",
"react/jsx-one-expression-per-line": "off",
"react/no-typos": "off"
}
}
71 changes: 8 additions & 63 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,66 +1,11 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.config/
.node-gyp/
.npm/

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
jest_0/

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
lib/
coverage/
dist/
jest_modules/
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# OS Specific files
.DS_Store
Thumbs.db

# Build
lib/
.ash_history
37 changes: 37 additions & 0 deletions .jest/mutation-observer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
(function() {
var MutationObserver;

if (window.MutationObserver != null) {
return;
}

MutationObserver = (function() {
function MutationObserver(callBack) {
this.callBack = callBack;
}

MutationObserver.prototype.observe = function(element, options) {
this.element = element;
return this.interval = setInterval((function(_this) {
return function() {
var html;
html = _this.element.innerHTML;
if (html !== _this.oldHtml) {
_this.oldHtml = html;
return _this.callBack.apply(null);
}
};
})(this), 200);
};

MutationObserver.prototype.disconnect = function() {
return window.clearInterval(this.interval);
};

return MutationObserver;

})();

window.MutationObserver = MutationObserver;

}).call(this);
12 changes: 0 additions & 12 deletions .npmignore

This file was deleted.

9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ language: node_js
cache:
directories:
- ~/.npm
- node_modules
notifications:
email: false
node_js:
- '8'
before_script:
- npm prune
- '10'
after_success:
- npm run build:production
- npm run semantic-release
- npm run build
- npm run travis-deploy-once "npm run semantic-release"
- npm run coveralls
branches:
except:
Expand Down
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
FROM node:carbon-alpine
FROM node:dubnium-alpine

WORKDIR /home/node/app
ENV HOME /home/node/app

CMD ["npm", "test"]
WORKDIR $HOME

VOLUME [$HOME]

RUN chown -Rv node:node $HOME
USER node
30 changes: 30 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-import-meta',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-json-strings',
[
'@babel/plugin-proposal-decorators',
{ legacy: true },
],
'@babel/plugin-proposal-function-sent',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-numeric-separator',
'@babel/plugin-proposal-throw-expressions',
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-logical-assignment-operators',
'@babel/plugin-proposal-optional-chaining',
[
'@babel/plugin-proposal-pipeline-operator',
{ proposal: 'minimal' },
],
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-do-expressions',
'@babel/plugin-proposal-function-bind',
],
presets: [
'@babel/preset-env',
'@babel/preset-react',
],
};
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ version: "3.0"
services:
app:
build: "."
container_name: "lifecycler"
volumes:
- ./:/home/node/app
22 changes: 21 additions & 1 deletion jest.config.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
{
"cacheDirectory": "<rootDir>/jest_modules",
"coveragePathIgnorePatterns": [
"/node_modules/",
"<rootDir>/.jest"
],
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
},
"moduleDirectories": [
"node_modules",
"src"
],
"moduleFileExtensions": [
"js",
"json",
"jsx"
],
"roots": [
"<rootDir>/src"
],
"setupFiles": [
"<rootDir>/.jest/mutation-observer.js",
"<rootDir>/.jest/shim.js",
"<rootDir>/.jest/test-setup.js"
],
"testPathIgnorePatterns": [
"/node_modules/",
"<rootDir>/.jest"
]
],
"testURL": "https://0.0.0.0"
}
Loading

0 comments on commit fdbed81

Please sign in to comment.