Skip to content

Commit

Permalink
chore(dev): update major devDep versions
Browse files Browse the repository at this point in the history
Remove power-assert, it's just not worth it now that
it's this old
  • Loading branch information
STRML committed Mar 5, 2021
1 parent 2526e68 commit 006dabd
Show file tree
Hide file tree
Showing 7 changed files with 681 additions and 1,565 deletions.
9 changes: 1 addition & 8 deletions .babelrc.js
Expand Up @@ -15,12 +15,5 @@ module.exports = {
"@babel/plugin-transform-flow-comments",
"@babel/plugin-proposal-class-properties",
"transform-inline-environment-variables"
],
"env": {
"test": {
"plugins": [
"espower"
]
}
}
]
}
2 changes: 2 additions & 0 deletions .flowconfig
@@ -1,4 +1,5 @@
[ignore]
<PROJECT_ROOT>/node_modules/webpack-cli.*

[include]
lib/
Expand All @@ -12,3 +13,4 @@ suppress_comment=\\(.\\|\n\\)*\\s*\\$FlowNewLine.*
suppress_comment=\\(.\\|\n\\)*\\s*\\$FlowIssue
esproposal.class_instance_fields=enable
esproposal.class_static_fields=enable
sharedmemory.heap_size=3221225472
8 changes: 4 additions & 4 deletions Makefile
Expand Up @@ -22,7 +22,7 @@ build-cjs: $(BIN)
$(BIN)/babel --out-dir ./build/cjs ./lib

build-web: $(BIN)
$(BIN)/webpack --mode=production --display-modules
$(BIN)/webpack --mode=production

# Allows usage of `make install`, `make link`
install link:
Expand Down Expand Up @@ -54,13 +54,13 @@ define release
git tag "v$$NEXT_VERSION" -m "release v$$NEXT_VERSION"
endef

release-patch: test
release-patch: test
@$(call release,patch)

release-minor: test
release-minor: test
@$(call release,minor)

release-major: test
release-major: test
@$(call release,major)

publish: build
Expand Down
43 changes: 24 additions & 19 deletions karma.conf.js
@@ -1,15 +1,37 @@
'use strict';

const _ = require('lodash');
const webpack = require('webpack');
process.env.NODE_ENV = 'test';
process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function(config) {
const webpackConfig = _.merge(
require('./webpack.config.js')({}, {}),
{
mode: 'production',
// Remove source maps: *speeeeeed*
devtool: false,
cache: true,
performance: {
hints: false,
},
// zero out externals; we want to bundle React
externals: '',
}
);

delete webpackConfig.entry; // karma-webpack complains
delete webpackConfig.output; // karma-webpack complains
webpackConfig.plugins.push(new webpack.DefinePlugin({
process: {env: {}},
}));

config.set({

basePath: '',

frameworks: [ 'jasmine'],
frameworks: ['webpack', 'jasmine'],

files: [
'specs/draggable.spec.jsx'
Expand All @@ -22,24 +44,7 @@ module.exports = function(config) {
'specs/draggable.spec.jsx': ['webpack']
},

webpack: _.merge(
require('./webpack.config.js')({}, {}),
{
mode: 'production',
// Remove source maps: *speeeeeed*
devtool: 'none',
cache: true,
module: {
// Suppress power-assert warning
exprContextCritical: false,
},
performance: {
hints: false,
},
// zero out externals; we want to bundle React
externals: '',
}
),
webpack: webpackConfig,

webpackServer: {
stats: {
Expand Down
16 changes: 8 additions & 8 deletions package.json
Expand Up @@ -47,27 +47,27 @@
"@babel/preset-react": "^7.9.4",
"@types/react": "^16.9.35",
"@types/react-dom": "^16.9.8",
"assert": "^2.0.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"babel-plugin-espower": "^3.0.1",
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
"eslint": "^7.0.0",
"eslint-plugin-react": "^7.20.0",
"flow-bin": "^0.125.1",
"jasmine-core": "^3.5.0",
"karma": "^5.0.9",
"karma": "^6.1.1",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "2.0.0",
"karma-firefox-launcher": "^1.3.0",
"karma-firefox-launcher": "^2.1.0",
"karma-ie-launcher": "^1.0.0",
"karma-jasmine": "^3.1.1",
"karma-jasmine": "^4.0.1",
"karma-phantomjs-launcher": "^1.0.4",
"karma-phantomjs-shim": "^1.5.0",
"karma-webpack": "^4.0.2",
"karma-webpack": "^5.0.0",
"lodash": "^4.17.4",
"phantomjs-prebuilt": "^2.1.16",
"power-assert": "^1.4.4",
"pre-commit": "^1.2.2",
"process": "^0.11.10",
"puppeteer": "^3.1.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
Expand All @@ -76,8 +76,8 @@
"semver": "^7.3.2",
"static-server": "^3.0.0",
"typescript": "^3.9.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack": "^5.24.3",
"webpack-cli": "^4.5.0",
"webpack-dev-server": "^3.11.0"
},
"resolutions": {
Expand Down
4 changes: 2 additions & 2 deletions specs/draggable.spec.jsx
Expand Up @@ -5,7 +5,7 @@ import TestUtils from 'react-dom/test-utils';
import ShallowRenderer from 'react-test-renderer/shallow';
import Draggable, {DraggableCore} from '../lib/Draggable';
import FrameComponent from 'react-frame-component';
import assert from 'power-assert';
import assert from 'assert';
import _ from 'lodash';
import {getPrefix, browserPrefixToKey, browserPrefixToStyle} from '../lib/utils/getPrefix';
const transformStyle = browserPrefixToStyle('transform', getPrefix('transform'));
Expand Down Expand Up @@ -143,7 +143,7 @@ describe('react-draggable', function () {
assert(data.deltaY === 200);
}
drag = TestUtils.renderIntoDocument(
<Draggable
<Draggable
scale={0.5}
onDrag={onDrag}>
<div />
Expand Down

0 comments on commit 006dabd

Please sign in to comment.