Skip to content

Commit 54b7242

Browse files
authored
Release 0.0.16 (#21)
* Update vulnerable dependencies Fix critical valnurable dependecies * Upgrade webpack from 4.x to 5.x * Upgrade multiple dependencies to latest versions * fix Explorer operation name input width * Update dependencies and fix tests
1 parent 6b92f17 commit 54b7242

16 files changed

+148
-175
lines changed

.eslintrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"parser": "babel-eslint",
33
"extends": [
4-
"prettier",
5-
"standard"
4+
"prettier"
65
],
76
"plugins": [
87
"flowtype",

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
- uses: actions/setup-node@v1
2626
with:
27-
node-version: '17.0.1'
27+
node-version: '17.1.0'
2828

2929
- uses: tarantool/setup-tarantool@v1
3030
with:

.github/workflows/test_on_push.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install npm
2424
uses: actions/setup-node@v1
2525
with:
26-
node-version: '17.0.1'
26+
node-version: '17.1.0'
2727
- name: Install sdk
2828
run: make sdk
2929
- name: Install rocks

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## 0.0.16
4+
5+
6+
7+
8+
9+
10+
11+
12+
- `update @babel/*@7.10.*-7.11.* to @babel/*@7.16.*`
13+
- `update [email protected] to [email protected] and all related dependencies`
14+
- `replace [email protected] with @emotion/[email protected]`
15+
16+
- `update multiple dependencies to latest versions`
17+
318
## 0.0.15
419

520
- `update @tarantool.io/[email protected] to @tarantool.io/[email protected]`

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SHELL := /bin/bash
22

3-
BUNDLE_VERSION=2.8.2-0-gfc96d10f5-r428
3+
BUNDLE_VERSION=2.8.2-0-gfc96d10f5-r429
44

55
.PHONY: .rocks
66
.rocks: graphqlide-scm-1.rockspec Makefile
@@ -10,7 +10,7 @@ BUNDLE_VERSION=2.8.2-0-gfc96d10f5-r428
1010
tarantoolctl rocks install luatest 0.5.6
1111
tarantoolctl rocks install luacov 0.13.0
1212
tarantoolctl rocks install luacheck 0.26.0
13-
tarantoolctl rocks install cartridge 2.7.2
13+
tarantoolctl rocks install cartridge 2.7.3
1414
tarantoolctl rocks make graphqlide-scm-1.rockspec
1515

1616
.PHONY: all install

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Based on:
88
- [Tarantool Cartridge 2.6.0+](https://github.com/tarantool/cartridge) (optional, module can work without Tarantool Cartridge)
99
- [Tarantool Frontend Core 7.12.0](https://github.com/tarantool/frontend-core)
1010
- [Tarantool Http 1.1.0](https://github.com/tarantool/http/tree/1.1.0)
11-
- [GraphiQL 1.4.6](https://github.com/graphql/graphiql)
11+
- [GraphiQL 1.5.1](https://github.com/graphql/graphiql)
1212
- [GraphiQL Explorer 0.6.3](https://github.com/OneGraph/graphiql-explorer)
1313

1414
GraphQL IDE interface:

config/webpack.config.dev.js

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const webpack = require('webpack');
44
const HtmlWebpackPlugin = require('html-webpack-plugin');
55
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
66
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
7-
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
87
const eslintFormatter = require('react-dev-utils/eslintFormatter');
98
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
109
const getClientEnvironment = require('./env');
@@ -102,7 +101,14 @@ module.exports = {
102101
// please link the files into your node_modules/ and let module-resolution kick in.
103102
// Make sure your source files are compiled, as they will not be processed in any way.
104103
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson])
105-
]
104+
],
105+
fallback: {
106+
dgram: false,
107+
fs: false,
108+
net: false,
109+
tls: false,
110+
child_process: false
111+
}
106112
},
107113
externals: {
108114
react: 'react',
@@ -118,7 +124,13 @@ module.exports = {
118124
// First, run the linter.
119125
// It's important to do this before Babel processes the JS.
120126
{
121-
test: /\.(js|jsx|mjs)$/,
127+
test: /\.m?js/,
128+
resolve: {
129+
fullySpecified: false
130+
}
131+
},
132+
{
133+
test: /\.(js|jsx|m?js)$/,
122134
enforce: 'pre',
123135
use: [
124136
{
@@ -287,6 +299,9 @@ module.exports = {
287299
// Make sure to add the new loader(s) before the "file" loader.
288300
]
289301
},
302+
optimization: {
303+
moduleIds: 'named'
304+
},
290305
plugins: [
291306
// Generates an `index.html` file with the <script> injected.
292307
new HtmlWebpackPlugin({
@@ -299,7 +314,7 @@ module.exports = {
299314
// In development, this will be an empty string.
300315
new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),
301316
// Add module names to factory functions so they appear in browser profiler.
302-
new webpack.NamedModulesPlugin(),
317+
//new webpack.NamedModulesPlugin(),
303318
// Makes some environment variables available to the JS code, for example:
304319
// if (process.env.NODE_ENV === 'development') { ... }. See `./env.js`.
305320
new webpack.DefinePlugin(env.stringified),
@@ -313,23 +328,16 @@ module.exports = {
313328
// to restart the development server for Webpack to discover it. This plugin
314329
// makes the discovery automatic so you don't have to restart.
315330
// See https://github.com/facebookincubator/create-react-app/issues/186
316-
new WatchMissingNodeModulesPlugin(paths.appNodeModules),
331+
// new WatchMissingNodeModulesPlugin(paths.appNodeModules),
317332
// Moment.js is an extremely popular library that bundles large locale files
318333
// by default due to how Webpack interprets its code. This is a practical
319334
// solution that requires the user to opt into importing specific locales.
320335
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
321336
// You can remove this if you don't use Moment.js:
322-
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
337+
new webpack.IgnorePlugin({
338+
resourceRegExp: /^\.\/locale$/,
339+
contextRegExp: /moment$/}),
323340
],
324-
// Some libraries import Node modules but don't use them in the browser.
325-
// Tell Webpack to provide empty mocks for them so importing them works.
326-
node: {
327-
dgram: 'empty',
328-
fs: 'empty',
329-
net: 'empty',
330-
tls: 'empty',
331-
child_process: 'empty'
332-
},
333341
// Turn off performance hints during development because we don't do any
334342
// splitting or minification in interest of speed. These warnings become
335343
// cumbersome.

config/webpack.config.prod.js

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const autoprefixer = require('autoprefixer');
22
const path = require('path');
33
const webpack = require('webpack');
4-
const ManifestPlugin = require('webpack-manifest-plugin');
4+
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
55
const eslintFormatter = require('react-dev-utils/eslintFormatter');
66
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
77
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
@@ -99,7 +99,14 @@ module.exports = {
9999
// please link the files into your node_modules/ and let module-resolution kick in.
100100
// Make sure your source files are compiled, as they will not be processed in any way.
101101
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson])
102-
]
102+
],
103+
fallback: {
104+
dgram: false,
105+
fs: false,
106+
net: false,
107+
tls: false,
108+
child_process: false
109+
}
103110
},
104111
externals: {
105112
react: 'react',
@@ -123,7 +130,13 @@ module.exports = {
123130
}
124131
},
125132
{
126-
test: /\.(js|jsx|mjs)$/,
133+
test: /\.m?js/,
134+
resolve: {
135+
fullySpecified: false
136+
}
137+
},
138+
{
139+
test: /\.(js|jsx|m?js)$/,
127140
enforce: 'pre',
128141
use: [
129142
{
@@ -329,7 +342,7 @@ module.exports = {
329342
// Generate a manifest file which contains a mapping of all asset filenames
330343
// to their corresponding output file so that tools can pick it up without
331344
// having to parse `index.html`.
332-
new ManifestPlugin({
345+
new WebpackManifestPlugin ({
333346
fileName: 'asset-manifest.json'
334347
}),
335348
// Generate a service worker script that will precache, and keep up to date,
@@ -339,23 +352,16 @@ module.exports = {
339352
// solution that requires the user to opt into importing specific locales.
340353
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
341354
// You can remove this if you don't use Moment.js:
342-
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
355+
new webpack.IgnorePlugin({
356+
resourceRegExp: /^\.\/locale$/,
357+
contextRegExp: /moment$/}),
343358
new BundleAnalyzerPlugin({
344359
analyzerMode: 'static',
345360
reportFilename: 'bundle-analyzer-report.html',
346361
openAnalyzer: false
347362
}),
348363
new LuaBundlerPlugin({ namespace: moduleConfig.namespace }),
349364
],
350-
// Some libraries import Node modules but don't use them in the browser.
351-
// Tell Webpack to provide empty mocks for them so importing them works.
352-
node: {
353-
dgram: 'empty',
354-
fs: 'empty',
355-
net: 'empty',
356-
tls: 'empty',
357-
child_process: 'empty'
358-
},
359365
performance: {
360366
maxEntrypointSize: 4000000,
361367
maxAssetSize: 4000000

config/webpackDevServer.config.js

Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -15,85 +15,24 @@ const host = process.env.HOST || '0.0.0.0';
1515

1616
module.exports = function(proxy, allowedHost) {
1717
return {
18-
// WebpackDevServer 2.4.3 introduced a security fix that prevents remote
19-
// websites from potentially accessing local content through DNS rebinding:
20-
// https://github.com/webpack/webpack-dev-server/issues/887
21-
// https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a
22-
// However, it made several existing use cases such as development in cloud
23-
// environment or subdomains in development significantly more complicated:
24-
// https://github.com/facebookincubator/create-react-app/issues/2271
25-
// https://github.com/facebookincubator/create-react-app/issues/2233
26-
// While we're investigating better solutions, for now we will take a
27-
// compromise. Since our WDS configuration only serves files in the `public`
28-
// folder we won't consider accessing them a vulnerability. However, if you
29-
// use the `proxy` feature, it gets more dangerous because it can expose
30-
// remote code execution vulnerabilities in backends like Django and Rails.
31-
// So we will disable the host check normally, but enable it if you have
32-
// specified the `proxy` setting. Finally, we let you override it if you
33-
// really know what you're doing with a special environment variable.
34-
disableHostCheck:
35-
!proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true',
3618
// Enable gzip compression of generated files.
3719
compress: true,
38-
// Silence WebpackDevServer's own logs since they're generally not useful.
39-
// It will still show compile warnings and errors with this setting.
40-
clientLogLevel: 'none',
41-
// By default WebpackDevServer serves physical files from current directory
42-
// in addition to all the virtual build products that it serves from memory.
43-
// This is confusing because those files won’t automatically be available in
44-
// production build folder unless we copy them. However, copying the whole
45-
// project directory is dangerous because we may expose sensitive files.
46-
// Instead, we establish a convention that only files in `public` directory
47-
// get served. Our build script will copy `public` into the `build` folder.
48-
// In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%:
49-
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
50-
// In JavaScript code, you can access it with `process.env.PUBLIC_URL`.
51-
// Note that we only recommend to use `public` folder as an escape hatch
52-
// for files like `favicon.ico`, `manifest.json`, and libraries that are
53-
// for some reason broken when imported through Webpack. If you just want to
54-
// use an image, put it in `src` and `import` it from JavaScript instead.
55-
contentBase: paths.appPublic,
56-
// By default files from `contentBase` will not trigger a page reload.
57-
watchContentBase: true,
5820
// Enable hot reloading server. It will provide /sockjs-node/ endpoint
5921
// for the WebpackDevServer client so it can learn when the files were
6022
// updated. The WebpackDevServer client is included as an entry point
6123
// in the Webpack development configuration. Note that only changes
6224
// to CSS are currently hot reloaded. JS changes will refresh the browser.
6325
hot: true,
64-
// It is important to tell WebpackDevServer to use the same "root" path
65-
// as we specified in the config. In development, we always serve from /.
66-
publicPath: config.output.publicPath,
67-
// WebpackDevServer is noisy by default so we emit custom message instead
68-
// by listening to the compiler events with `compiler.plugin` calls above.
69-
quiet: true,
70-
// Reportedly, this avoids CPU overload on some systems.
71-
// https://github.com/facebookincubator/create-react-app/issues/293
72-
// src/node_modules is not ignored to support absolute imports
73-
// https://github.com/facebookincubator/create-react-app/issues/1065
74-
watchOptions: {
75-
ignored: ignoredFiles(paths.appSrc)
76-
},
7726
// Enable HTTPS if the HTTPS environment variable is set to 'true'
7827
https: protocol === 'https',
7928
host: host,
80-
overlay: false,
29+
// overlay: false,
8130
historyApiFallback: {
8231
// Paths with dots should still use the history fallback.
8332
// See https://github.com/facebookincubator/create-react-app/issues/387.
8433
disableDotRule: true
8534
},
86-
public: allowedHost,
35+
// public: allowedHost,
8736
proxy,
88-
before(app) {
89-
// This lets us open files from the runtime error overlay.
90-
app.use(errorOverlayMiddleware());
91-
// This service worker file is effectively a 'no-op' that will reset any
92-
// previous service worker registered for the same host:port combination.
93-
// We do this in development to avoid hitting the production cache if
94-
// it used the same host and port.
95-
// https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432
96-
app.use(noopServiceWorkerMiddleware('/'));
97-
}
9837
};
9938
};

deps.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ set -e
55

66
tarantoolctl rocks install http 1.1.0
77
tarantoolctl rocks install checks
8-
tarantoolctl rocks install frontend-core 7.11.0
8+
tarantoolctl rocks install frontend-core 7.12.0
99
tarantoolctl rocks install luatest 0.5.6
1010
tarantoolctl rocks install luacov 0.13.0
1111
tarantoolctl rocks install luacheck 0.26.0
12-
tarantoolctl rocks install cartridge 2.7.2
12+
tarantoolctl rocks install cartridge 2.7.3

graphqlide.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,13 @@ end
115115

116116
local function get_cartridge_api_endpoint()
117117
local path = 'admin/api'
118-
local webui_prefix = argparse.parse().webui_prefix
119-
if webui_prefix ~= nil then
120-
webui_prefix = remove_side_slashes(webui_prefix)
121-
path = webui_prefix..'/'..path
118+
local args = argparse.parse()
119+
if args ~= nil then
120+
local webui_prefix = args.webui_prefix
121+
if webui_prefix ~= nil then
122+
webui_prefix = remove_side_slashes(webui_prefix)
123+
path = webui_prefix..'/'..path
124+
end
122125
end
123126
return path
124127
end

0 commit comments

Comments
 (0)