Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

Commit c9ebb09

Browse files
authored
chore: update dependencies
* chore: update eslint and build config * chore: update dependencies * fix: fix unit test of clipboard * chore: update config files * chore: update to webpack 4 * chore: rename packages.json * chore: rename @oui-angular to @ovh-ui * chore: update for yarn workspaces
1 parent f943398 commit c9ebb09

File tree

107 files changed

+2138
-1451
lines changed

Some content is hidden

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

107 files changed

+2138
-1451
lines changed

.editorconfig

+26-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
15
root = true
26

7+
38
[*]
4-
charset = utf-8
9+
10+
# Change these settings to your own preference
511
indent_style = space
612
indent_size = 4
13+
14+
# We recommend you to keep these unchanged
715
end_of_line = lf
8-
insert_final_newline = true
16+
charset = utf-8
917
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
20+
[*.js]
21+
indent_style = space
22+
indent_size = 2
23+
24+
[*.less]
25+
indent_style = space
26+
indent_size = 2
27+
28+
[*.md]
29+
trim_trailing_whitespace = false
30+
31+
[package.json]
32+
indent_style = space
33+
indent_size = 2

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
node_modules

.eslintrc.js

+31-33
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,35 @@
1-
const isDistribution = process.env.NODE_ENV === "dist"
1+
const isDistribution = process.env.NODE_ENV === "dist";
22

33
module.exports = {
4-
"root": true,
5-
"parser": "babel-eslint",
6-
"parserOptions": {
7-
"sourceType": "module"
8-
},
9-
"env": {
10-
"browser": true,
11-
"node": true,
12-
"jasmine": true,
13-
"es6": true
14-
},
15-
"globals": {
16-
"angular": true,
17-
"inject": true
18-
},
19-
"extends": "ovh",
4+
"root": true,
5+
"parser": "babel-eslint",
6+
"parserOptions": {
7+
"sourceType": "module"
8+
},
9+
"env": {
10+
"browser": true,
11+
"node": true,
12+
"jasmine": true,
13+
"es6": true
14+
},
15+
"globals": {
16+
"angular": true,
17+
"inject": true
18+
},
19+
"extends": "ovh",
20+
"rules": {
21+
"arrow-parens": 0,
22+
"generator-star-spacing": 0,
23+
"no-console": isDistribution ? 2 : 0,
24+
"no-debugger": isDistribution ? 2 : 0,
25+
"no-magic-numbers": ["error", { "ignore": [0, -1, 1] }]
26+
},
27+
"overrides": {
28+
"files": "*.spec.js",
2029
"rules": {
21-
"arrow-parens": 0,
22-
"generator-star-spacing": 0,
23-
"no-console": isDistribution ? 2 : 0,
24-
"no-debugger": isDistribution ? 2 : 0,
25-
"no-magic-numbers": ["error", {
26-
"ignore": [0, -1, 1]
27-
}]
28-
},
29-
"overrides": {
30-
"files": "*.spec.js",
31-
"rules": {
32-
"no-magic-numbers": false,
33-
"no-underscore-dangle": false,
34-
"no-empty-function": false
35-
}
30+
"no-magic-numbers": false,
31+
"no-underscore-dangle": false,
32+
"no-empty-function": false
3633
}
37-
}
34+
}
35+
};

.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# JS files must always use LF for tools to work
5+
*.js eol=lf
6+
7+
*.png binary
8+
*.jpg binary

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

build/karma.conf.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// we are also using it with karma-webpack
44
// https://github.com/webpack/karma-webpack
55

6-
import webpackConfig from "./webpack.test.babel";
6+
const webpackConfig = require("./webpack.test.config");
77

8-
export default config => {
8+
module.exports = function (config) {
99
config.set({
1010
// to run in additional browsers:
1111
// 1. install corresponding karma launcher

build/webpack.base.babel.js build/webpack.base.config.js

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
1-
import formatter from "eslint-friendly-formatter";
2-
import path from "path";
3-
import webpack from "webpack";
4-
import LodashModuleReplacementPlugin from "lodash-webpack-plugin";
1+
const formatter = require("eslint-friendly-formatter");
2+
const webpack = require("webpack");
3+
const LodashModuleReplacementPlugin = require("lodash-webpack-plugin");
54

65
const exclude = [/node_modules/, /dist/];
76

8-
export default {
7+
module.exports = {
8+
mode: "development",
99
entry: {
1010
component: ["./packages/oui-angular/src/index.js"]
1111
},
12-
resolve: {
13-
extensions: [".js", ".json"],
14-
alias: {
15-
"@oui-angular": path.resolve(__dirname, "../packages")
16-
}
17-
},
1812
plugins: [
1913
new webpack.DefinePlugin({
2014
"process.env": process.env.NODE_ENV
2115
}),
2216
new LodashModuleReplacementPlugin({
2317
shorthands: true,
2418
paths: true
25-
}), // Save bytes on Lodash
19+
})
2620
],
2721
module: {
2822
rules: [

build/webpack.dist.babel.js

-24
This file was deleted.

build/webpack.dist.config.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
const baseConfig = require("./webpack.base.config");
2+
const merge = require("webpack-merge");
3+
const path = require("path");
4+
const webpack = require("webpack");
5+
6+
module.exports = merge(baseConfig, {
7+
mode: "production",
8+
devtool: "source-map",
9+
externals: {
10+
clipboard: "clipboard",
11+
"escape-string-regexp": "escape-string-regexp",
12+
flatpickr: "flatpickr",
13+
"popper.js": "popper.js"
14+
},
15+
output: {
16+
path: path.resolve(".", "dist"),
17+
filename: "oui-angular.min.js"
18+
},
19+
performance: {
20+
hints: false
21+
},
22+
plugins: [
23+
new webpack.DefinePlugin({
24+
"process.env": process.env.NODE_ENV
25+
}),
26+
new webpack.optimize.ModuleConcatenationPlugin() // Enable scope hoisting
27+
]
28+
});

build/webpack.test.babel.js

-6
This file was deleted.

build/webpack.test.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const baseConfig = require("./webpack.base.config");
2+
const merge = require("webpack-merge");
3+
4+
module.exports = merge(baseConfig, {
5+
devtool: "inline-source-map"
6+
});

dist/oui-angular.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/oui-angular.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+51-47
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"name": "ovh-ui-angular",
33
"description": "A set of maintainable components for the OVH ecosystem (Angular).",
4+
"private": true,
45
"license": "BSD-3-Clause",
56
"author": "OVH SAS",
67
"version": "2.20.0",
78
"keywords": [
89
"angular"
910
],
1011
"repository": "ovh-ux/ovh-ui-angular",
11-
"main": "./dist/oui-angular.min.js",
12-
"browser": "./dist/oui-angular.min.js",
12+
"main": "dist/oui-angular.min.js",
13+
"browser": "dist/oui-angular.min.js",
1314
"module": "packages/oui-angular/src/index.js",
1415
"scripts": {
1516
"commit": "npm-scripts-config commit",
@@ -20,8 +21,10 @@
2021
"preview-changelog": "npm-scripts-config preview-changelog",
2122
"build": "npm run build:clean && npm run build:webpack",
2223
"build:clean": "rimraf dist",
23-
"build:webpack": "webpack --progress --colors --config build/webpack.dist.babel.js",
24-
"build:watch": "webpack --progress --colors --config build/webpack.dist.babel.js --watch",
24+
"build:webpack": "webpack --progress --colors --config build/webpack.dist.config.js",
25+
"build:watch": "webpack --progress --colors --config build/webpack.dist.config.js --watch",
26+
"eslint": "eslint ./packages",
27+
"eslint:fix": "eslint --fix ./packages",
2528
"test": "npm run unit:ci",
2629
"unit": "cross-env NODE_ENV=test babel-node node_modules/karma/bin/karma start build/karma.conf.js --reporters nyan,coverage --single-run",
2730
"unit:ci": "cross-env NODE_ENV=test babel-node node_modules/karma/bin/karma start build/karma.conf.js --reporters spec,coverage --single-run",
@@ -33,73 +36,74 @@
3336
}
3437
},
3538
"dependencies": {
36-
"angular": "^1.6.x",
37-
"angular-aria": "^1.6.x",
38-
"angular-sanitize": "^1.6.x",
39-
"clipboard": "^2.0.1",
40-
"escape-string-regexp": "^1.0.5",
41-
"flatpickr": "^4.5.1",
42-
"popper.js": "^1.14.3"
39+
"angular": ">=1.6.x",
40+
"angular-aria": ">=1.6.x",
41+
"angular-sanitize": ">=1.6.x",
42+
"ovh-ui-kit": "^2.20.0"
4343
},
4444
"devDependencies": {
45-
"angular-mocks": "^1.6.x",
45+
"angular-mocks": ">=1.6.x",
4646
"autoprefixer": "^8.0.0",
47-
"babel-cli": "^6.18.0",
48-
"babel-core": "^6.21.0",
49-
"babel-eslint": "^8.0.1",
50-
"babel-loader": "^7.1.2",
51-
"babel-plugin-istanbul": "^4.1.5",
52-
"babel-plugin-lodash": "^3.2.11",
53-
"babel-plugin-transform-runtime": "^6.15.0",
54-
"babel-preset-env": "^1.6.1",
55-
"babel-preset-stage-2": "^6.22.0",
56-
"babel-register": "^6.18.0",
57-
"cross-env": "^5.1.0",
58-
"css-loader": "^0.28.4",
47+
"babel-cli": "^6.26.0",
48+
"babel-core": "^6.26.3",
49+
"babel-eslint": "^8.2.6",
50+
"babel-loader": "^7.1.5",
51+
"babel-plugin-istanbul": "^4.1.6",
52+
"babel-plugin-lodash": "^3.3.4",
53+
"babel-plugin-transform-runtime": "^6.23.0",
54+
"babel-preset-env": "^1.7.0",
55+
"babel-preset-stage-2": "^6.24.1",
56+
"babel-register": "^6.26.0",
57+
"cross-env": "^5.2.0",
58+
"css-loader": "^1.0.0",
5959
"eslint": "^4.3.0",
6060
"eslint-config-ovh": "^0.1.1",
6161
"eslint-friendly-formatter": "^3.0.0",
62-
"eslint-loader": "^1.9.0",
62+
"eslint-loader": "^2.1.0",
6363
"eventsource-polyfill": "^0.9.6",
64-
"express": "^4.15.3",
65-
"html-loader": "^0.5.1",
66-
"html-webpack-plugin": "^2.26.0",
67-
"istanbul-instrumenter-loader": "^3.0.0",
68-
"jasmine-core": "^2.5.2",
64+
"express": "^4.16.3",
65+
"html-loader": "^0.5.5",
66+
"html-webpack-plugin": "^3.2.0",
67+
"istanbul-instrumenter-loader": "^3.0.1",
68+
"jasmine-core": "^3.2.1",
6969
"karma": "^2.0.0",
70-
"karma-chrome-launcher": "^2.0.0",
71-
"karma-coverage": "^1.1.1",
72-
"karma-jasmine": "^1.1.0",
70+
"karma-chrome-launcher": "^2.2.0",
71+
"karma-coverage": "^1.1.2",
72+
"karma-jasmine": "^1.1.2",
7373
"karma-junit-reporter": "^1.2.0",
7474
"karma-nyan-reporter": "^0.2.5",
7575
"karma-phantomjs-launcher": "^1.0.4",
7676
"karma-sourcemap-loader": "^0.3.7",
7777
"karma-spec-reporter": "^0.0.32",
78-
"karma-webpack": "^2.0.4",
78+
"karma-webpack": "^4.0.0-rc.2",
7979
"less": "^3.0.0",
80-
"less-loader": "^4.0.5",
80+
"less-loader": "^4.1.0",
8181
"loader-utils": "^1.1.0",
82-
"lodash": "^4.17.4",
83-
"lodash-webpack-plugin": "^0.11.4",
84-
"marked": "^0.3.6",
82+
"lodash": "^4.17.11",
83+
"lodash-webpack-plugin": "^0.11.5",
84+
"marked": "^0.5.0",
8585
"minimist": "^1.2.0",
8686
"ng-annotate": "^1.2.2",
8787
"ng-annotate-loader": "^0.6.1",
8888
"npm-scripts-config": "^0.0.2",
8989
"npm-scripts-conventional-changelog": "^0.1.0",
90-
"opn": "^5.1.0",
91-
"portscanner": "^2.1.1",
92-
"postcss-loader": "^2.0.8",
93-
"rimraf": "^2.5.4",
94-
"style-loader": "^0.20.1",
95-
"webpack": "^3.8.1",
96-
"webpack-dev-middleware": "^2.0.5",
97-
"webpack-hot-middleware": "^2.20.0",
98-
"webpack-merge": "^4.1.0"
90+
"opn": "^5.3.0",
91+
"portscanner": "^2.2.0",
92+
"postcss-loader": "^3.0.0",
93+
"rimraf": "^2.6.2",
94+
"style-loader": "^0.23.0",
95+
"webpack": "^4.19.1",
96+
"webpack-cli": "^3.1.0",
97+
"webpack-dev-middleware": "^3.3.0",
98+
"webpack-hot-middleware": "^2.24.0",
99+
"webpack-merge": "^4.1.4"
99100
},
100101
"peerDependencies": {
101102
"ovh-ui-kit": "*"
102103
},
104+
"workspaces": [
105+
"packages/*"
106+
],
103107
"engines": {
104108
"node": ">= 6.9.0",
105109
"npm": ">= 3.10.0",

0 commit comments

Comments
 (0)