Skip to content

Commit fdf3519

Browse files
authored
Merge branch 'master' into greenkeeper/eslint-plugin-jest-22.10.0
2 parents 6c04efc + 027b301 commit fdf3519

File tree

7 files changed

+544
-118
lines changed

7 files changed

+544
-118
lines changed

package-lock.json

Lines changed: 489 additions & 102 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"LICENSE"
3535
],
3636
"dependencies": {
37-
"@babel/runtime": "7.5.0",
37+
"@babel/runtime": "7.5.5",
3838
"bcryptjs": "2.3.0",
3939
"body-parser": "1.19.0",
4040
"codemirror-graphql": "github:timsuchanek/codemirror-graphql#details-fix",
@@ -49,7 +49,7 @@
4949
"history": "4.9.0",
5050
"immutable": "4.0.0-rc.9",
5151
"immutable-devtools": "0.1.3",
52-
"js-beautify": "1.10.0",
52+
"js-beautify": "1.10.1",
5353
"json-file-plus": "3.2.0",
5454
"package-json": "6.4.0",
5555
"parse": "2.4.0",
@@ -68,22 +68,22 @@
6868
"react-router-dom": "5.0.1"
6969
},
7070
"devDependencies": {
71-
"@babel/core": "7.5.0",
71+
"@babel/core": "7.5.5",
7272
"@babel/plugin-proposal-decorators": "7.4.4",
7373
"@babel/plugin-transform-regenerator": "7.4.5",
74-
"@babel/plugin-transform-runtime": "7.5.0",
74+
"@babel/plugin-transform-runtime": "7.5.5",
7575
"@babel/polyfill": "7.4.4",
76-
"@babel/preset-env": "7.5.0",
76+
"@babel/preset-env": "7.5.5",
7777
"@babel/preset-react": "7.0.0",
7878
"babel-eslint": "10.0.2",
7979
"babel-loader": "8.0.6",
8080
"babel-plugin-transform-object-rest-spread": "6.26.0",
8181
"core-js": "2.6.5",
82-
"css-loader": "2.1.1",
82+
"css-loader": "3.1.0",
8383
"eslint": "5.16.0",
8484
"eslint-plugin-jest": "22.10.0",
8585
"eslint-plugin-react": "7.14.1",
86-
"file-loader": "4.0.0",
86+
"file-loader": "4.1.0",
8787
"http-server": "0.11.1",
8888
"jest": "24.8.0",
8989
"marked": "0.6.2",

src/dashboard/Dashboard.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
.content {
99
margin-left: 300px;
1010
transition: margin-left 0.5s ease-in;
11+
overflow: auto;
12+
max-height: 100vh;
1113
}
1214

1315
@media (max-width: 980px) {

src/dashboard/Data/ApiConsole/ApiConsole.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
position: relative;
2626
height: calc(100vh - 96px);
2727
margin-top: 96px;
28+
overflow: hidden;
2829

2930
// Workaround to override graphql-playground-react
3031
// animations and query editor height
31-
& > div > div {
32+
& > div:not(.empty) > div {
3233
opacity: 1;
3334
transform: unset;
3435
animation: unset;

src/lib/getFileName.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ export default function getFileName(name) {
1111
if (name instanceof Parse.File) {
1212
return getFileName(name.name());
1313
}
14-
let offset = 37;
15-
if (name.indexOf('tfss-') === 0) {
16-
offset += 5;
17-
}
14+
const offset = name.indexOf('_') + 1;
1815
return name.substr(offset);
1916
}

src/lib/tests/getFileName.test.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2016-present, Parse, LLC
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the license found in the LICENSE file in
6+
* the root directory of this source tree.
7+
*/
8+
jest.dontMock('../getFileName');
9+
const getFileName = require('../getFileName').default;
10+
const Parse = require('parse');
11+
12+
describe('getFileName', () => {
13+
it('get filename prefixed with hex', () => {
14+
const actualFilename = 'profile.jpg';
15+
expect(getFileName(`7b16230f584b360f667665fcb7d7a98b_${actualFilename}`)).toBe(actualFilename);
16+
17+
const parseFile = new Parse.File(`7b16230f584b360f667665fcb7d7a98b_${actualFilename}`);
18+
expect(getFileName(parseFile)).toBe(actualFilename);
19+
});
20+
21+
it('get filename containing underscore and prefixed with hex', () => {
22+
const actualFilename = 'bg_img.png';
23+
expect(getFileName(`7b16230f584b360f667665fcb7d7a98b_${actualFilename}`)).toBe(actualFilename);
24+
25+
const parseFile = new Parse.File(`7b16230f584b360f667665fcb7d7a98b_${actualFilename}`);
26+
expect(getFileName(parseFile)).toBe(actualFilename);
27+
});
28+
});

webpack/base.config.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,28 @@ module.exports = {
3333
{
3434
test: /\.js$/,
3535
exclude: /node_modules/,
36-
use: {
37-
loader: 'babel-loader',
36+
use: {
37+
loader: 'babel-loader',
3838
query: {
3939
plugins: [["@babel/plugin-proposal-decorators", { "legacy": true }], '@babel/transform-regenerator', '@babel/transform-runtime'],
4040
presets: ['@babel/preset-react', '@babel/preset-env']
4141
},
4242
},
4343
}, {
4444
test: /\.scss$/,
45-
use: [ "style-loader", "css-loader?modules&localIdentName=[local]__[hash:base64:5]!sass-loader?includePaths[]=" +
46-
encodeURIComponent(path.resolve(__dirname, '../src')) ]
45+
use: [
46+
'style-loader',
47+
{
48+
loader: 'css-loader',
49+
options: {
50+
modules: {
51+
localIdentName: '[local]__[hash:base64:5]'
52+
},
53+
importLoaders: 2
54+
},
55+
},
56+
"sass-loader?includePaths[]=" + encodeURIComponent(path.resolve(__dirname, '../src'))
57+
]
4758
}, {
4859
test: /\.css$/,
4960
use: [ 'style-loader', 'css-loader' ]

0 commit comments

Comments
 (0)