Skip to content
This repository was archived by the owner on Sep 25, 2021. It is now read-only.

Commit da8b649

Browse files
authored
Merge pull request #980 from openlattice/develop
2021-03-04 release
2 parents 9ee1394 + c41a1e3 commit da8b649

File tree

72 files changed

+20870
-2468
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+20870
-2468
lines changed

.eslintrc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,14 @@
7979
],
8080
"padded-blocks": "off",
8181
"prefer-destructuring": "warn",
82-
"space-before-function-paren": ["error", "never"],
82+
"space-before-function-paren": [
83+
"error",
84+
{
85+
"anonymous": "never",
86+
"named": "never",
87+
"asyncArrow": "always"
88+
}
89+
],
8390

8491
"flowtype/define-flow-type": "error",
8592
"flowtype/space-after-type-colon": ["error", "never"],

.flowconfig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
<PROJECT_ROOT>/build/.*
1717
<PROJECT_ROOT>/config/.*
1818
!<PROJECT_ROOT>/node_modules/lattice
19+
!<PROJECT_ROOT>/node_modules/lattice-auth
1920
!<PROJECT_ROOT>/node_modules/lattice-sagas
21+
!<PROJECT_ROOT>/node_modules/lattice-utils
2022
!<PROJECT_ROOT>/node_modules/redux-reqseq
2123
.*/node_modules/immutable/.*
2224

23-
[libs]
24-
./src/types.js.flow
25+
[options]
26+
esproposal.optional_chaining=enable

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
day: sunday
8+
time: "01:00"
9+
timezone: America/Los_Angeles
10+
open-pull-requests-limit: 50
11+
versioning-strategy: increase-if-necessary
12+
ignore:
13+
- dependency-name: immutable
14+
versions:
15+
- ">= 0"

.github/workflows/build.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- master
8+
pull_request:
9+
branches:
10+
- develop
11+
- master
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: [10.x, 12.x, 14.x]
19+
steps:
20+
- name: checkout
21+
uses: actions/checkout@v2
22+
23+
- name: node ${{ matrix.node-version }}
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
28+
- name: cache node modules
29+
uses: actions/cache@v2
30+
with:
31+
# https://github.com/actions/cache/blob/main/examples.md#macos-and-ubuntu
32+
# https://github.com/actions/cache/issues/67
33+
path: ~/.npm
34+
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
35+
restore-keys: |
36+
${{ runner.OS }}-node-
37+
38+
- name: npm config
39+
env:
40+
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
41+
run: |
42+
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
43+
npm config set "//npm.fontawesome.com/:_authToken" "$FONTAWESOME_NPM_AUTH_TOKEN"
44+
45+
# https://docs.npmjs.com/cli/v6/commands/npm-ci
46+
- name: npm ci
47+
run: npm ci
48+
49+
- name: npm run lint
50+
run: npm run lint
51+
52+
- name: npm run flow
53+
run: npm run flow
54+
55+
- name: npm run test
56+
run: npm run test
57+
58+
- name: npm run build:prod
59+
run: npm run build:prod
60+
61+
- name: codecov
62+
uses: codecov/codecov-action@v1

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ coverage/
22

33
# npm
44
npm-debug.log
5-
package-lock.json
65
node_modules/
76

87
# macOS

.importsortrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
".js": {
3+
"parser": "babylon",
4+
"style": "openlattice"
5+
}
6+
}

.travis.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
# lattice-edm
2-
3-
[![Greenkeeper badge](https://badges.greenkeeper.io/openlattice/lattice-edm.svg)](https://greenkeeper.io/)

config/webpack/webpack.config.base.js

Lines changed: 23 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,56 +14,36 @@ const {
1414

1515
module.exports = (env) => {
1616

17-
/*
18-
* constants
19-
*/
17+
//
18+
// constants
19+
//
2020

2121
const BABEL_CONFIG = path.resolve(__dirname, '../babel/babel.config.js');
2222
const BASE_PATH = `/${env.basePath || 'edm'}/`;
2323
const ENV_DEV = 'development';
2424
const ENV_PROD = 'production';
2525

26-
// NOTE: for future reference
27-
// const getNodeModulesRegEx = toInclude => (
28-
// new RegExp(`/(node_modules|openlattice)/(${toInclude.join('|')})`)
29-
// );
30-
31-
/*
32-
* loaders
33-
*/
26+
//
27+
// loaders
28+
//
3429

3530
const BABEL_LOADER = {
3631
test: /\.js$/,
3732
exclude: /node_modules/,
3833
include: [
3934
APP_PATHS.ABS.SOURCE,
40-
// NOTE: for future reference
41-
// getNodeModulesRegEx(['redux-reqseq']),
4235
],
4336
use: {
4437
loader: 'babel-loader',
4538
options: {
46-
cacheDirectory: true,
4739
configFile: BABEL_CONFIG,
4840
},
4941
},
5042
};
5143

52-
const FILE_LOADER_ASSETS_IMAGES = {
53-
test: /\.(gif|ico|jpg|jpeg|png|svg|webp)(\?.*)?$/,
54-
exclude: /node_modules/,
55-
use: [{
56-
loader: 'file-loader',
57-
options: {
58-
name: '[name].[hash:8].[ext]',
59-
outputPath: `${APP_PATHS.REL.STATIC_ASSETS_IMAGES}/`,
60-
}
61-
}]
62-
};
63-
64-
/*
65-
* plugins
66-
*/
44+
//
45+
// plugins
46+
//
6747

6848
const BANNER_PLUGIN = new Webpack.BannerPlugin({
6949
banner: APP_CONFIG.BANNER,
@@ -80,14 +60,9 @@ module.exports = (env) => {
8060
__VERSION__: JSON.stringify(`v${PACKAGE.version}`),
8161
});
8262

83-
// https://github.com/moment/moment/issues/2373
84-
// https://stackoverflow.com/a/25426019/196921
85-
// https://github.com/facebookincubator/create-react-app/pull/2187
86-
const IGNORE_MOMENT_LOCALES = new Webpack.IgnorePlugin(/^\.\/locale$/, /moment$/);
87-
88-
/*
89-
* base webpack config
90-
*/
63+
//
64+
// base webpack config
65+
//
9166

9267
return {
9368
bail: true,
@@ -99,12 +74,19 @@ module.exports = (env) => {
9974
module: {
10075
rules: [
10176
BABEL_LOADER,
102-
FILE_LOADER_ASSETS_IMAGES,
77+
{
78+
generator: {
79+
filename: (
80+
env.production
81+
? `${APP_PATHS.REL.STATIC_ASSETS}/[name].[contenthash].[ext]`
82+
: `${APP_PATHS.REL.STATIC_ASSETS}/[name].[ext]`
83+
)
84+
},
85+
test: /\.(gif|ico|jpg|jpeg|png|svg|webp)(\?.*)?$/,
86+
type: 'asset/resource',
87+
},
10388
],
10489
},
105-
node: {
106-
net: 'empty',
107-
},
10890
optimization: {
10991
minimize: !!env.production,
11092
},
@@ -118,7 +100,6 @@ module.exports = (env) => {
118100
plugins: [
119101
DEFINE_PLUGIN,
120102
BANNER_PLUGIN,
121-
IGNORE_MOMENT_LOCALES,
122103
],
123104
resolve: {
124105
extensions: ['.js', '.css'],
Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,17 @@
11
/* eslint-disable import/extensions */
22

33
const HtmlWebpackPlugin = require('html-webpack-plugin');
4-
const Webpack = require('webpack');
54

65
const APP_PATHS = require('../app/paths.config.js');
76
const baseWebpackConfig = require('./webpack.config.base.js');
87

98
module.exports = (env) => {
109

11-
const DEV_SERVER_PORT = 9100;
10+
const DEV_SERVER_PORT = 9000;
1211
const baseConfig = baseWebpackConfig(env);
1312

14-
const output = Object.assign({}, baseConfig.output, {
15-
filename: `${APP_PATHS.REL.STATIC_JS}/index.js`,
16-
});
17-
18-
const plugins = [
19-
new HtmlWebpackPlugin({
20-
favicon: `${APP_PATHS.ABS.SOURCE_ASSETS_IMAGES}/ol-favicon.png`,
21-
inject: true,
22-
template: `${APP_PATHS.ABS.SOURCE}/index.html`,
23-
}),
24-
new Webpack.HotModuleReplacementPlugin(),
25-
...baseConfig.plugins
26-
];
27-
28-
return Object.assign({}, baseConfig, {
29-
output,
30-
plugins,
13+
return {
14+
...baseConfig,
3115
devServer: {
3216
contentBase: APP_PATHS.ABS.BUILD,
3317
historyApiFallback: {
@@ -38,5 +22,16 @@ module.exports = (env) => {
3822
publicPath: baseConfig.output.publicPath,
3923
},
4024
devtool: false,
41-
});
25+
output: {
26+
...baseConfig.output,
27+
filename: `${APP_PATHS.REL.STATIC_JS}/index.js`,
28+
},
29+
plugins: [
30+
new HtmlWebpackPlugin({
31+
favicon: `${APP_PATHS.ABS.SOURCE_ASSETS_IMAGES}/ol-favicon.png`,
32+
template: `${APP_PATHS.ABS.SOURCE}/index.html`,
33+
}),
34+
...baseConfig.plugins
35+
],
36+
};
4237
};

0 commit comments

Comments
 (0)