Skip to content

Commit

Permalink
fix(package): upgrade dependencies, including prettier to 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
timmywil committed Mar 27, 2020
1 parent 8f48c2f commit 8d5dfa5
Show file tree
Hide file tree
Showing 7 changed files with 1,390 additions and 2,455 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const Panzoom = require('@panzoom/panzoom')
With an AMD loader in an anonymous module:

```js
define(['@panzoom/panzoom'], function(Panzoom) {
define(['@panzoom/panzoom'], function (Panzoom) {
Panzoom('.panzoom')
})
```
Expand Down Expand Up @@ -812,7 +812,7 @@ method or the `zoom` method's focal option.
// Bind to mousewheel
elem.parentElement.addEventListener('wheel', panzoom.zoomWithWheel)
// Bind to shift+mousewheel
elem.parentElement.addEventListener('wheel', function(event) {
elem.parentElement.addEventListener('wheel', function (event) {
if (!event.shiftKey) return
panzoom.zoomWithWheel(event)
})
Expand Down
2 changes: 1 addition & 1 deletion demo/examples/Focal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function Focal() {
useEffect(() => {
panzoom = panzoomRef.current = Panzoom(elem.current)
const parent = elem.current.parentElement
parent.addEventListener('wheel', function(event) {
parent.addEventListener('wheel', function (event) {
if (!event.shiftKey) {
return
}
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = function(config) {
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha', 'karma-typescript'],
Expand Down
3,754 changes: 1,345 additions & 2,409 deletions package-lock.json

Large diffs are not rendered by default.

75 changes: 37 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"commit": "git-cz",
"docs": "typedoc --plugin typedoc-plugin-markdown --hideBreadcrumbs --exclude \"**/src/+(css|isAttached|isSVGElement|pointers|shallowClone).ts\" --out docs --readme none src/panzoom.ts && node tasks/docs.js",
"eslint": "eslint .",
"format": "prettier --write \"**/*.tsx\" \"**/*.ts\" \"**/*.js\" \"**/*.md\"",
"lint": "concurrently --raw \"npm run type-check\" \"npm run eslint\" \"npm run prettier\"",
"lint:fix": "concurrently --raw \"npm run type-check\" \"lint-staged\"",
"minify": "uglifyjs --compress --mangle --comments /Timmy/ --output dist/panzoom.min.js -- dist/panzoom.js && npm run sizeup",
"prettier": "prettier --check \"**/*.tsx\" \"**/*.ts\" \"**/*.js\"",
"preinstall": "npx npm-force-resolutions",
"release": "cross-env HUSKY_SKIP_HOOKS=1 semantic-release",
"sizeup": "echo \"gzipped size: \" && gzip-size dist/panzoom.min.js",
"start": "webpack-dev-server",
Expand Down Expand Up @@ -44,60 +44,58 @@
"name": "Timmy Willison",
"email": "[email protected]"
},
"dependencies": {
"marked": ">=0.7.0",
"serialize-javascript": ">=2.1.1"
},
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.8.7",
"@babel/preset-env": "^7.8.7",
"@commitlint/cli": "^8.1.0",
"@commitlint/config-conventional": "^8.1.0",
"@commitlint/prompt": "^8.1.0",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@commitlint/prompt": "^8.3.5",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/git": "^9.0.0",
"@types/mocha": "^7.0.0",
"@types/prismjs": "^1.16.0",
"@types/react-dom": "^16.8.5",
"@typescript-eslint/eslint-plugin": "^2.24.0",
"@typescript-eslint/parser": "^2.24.0",
"@types/react-dom": "^16.9.5",
"@typescript-eslint/eslint-plugin": "^2.25.0",
"@typescript-eslint/parser": "^2.25.0",
"commitizen": "^4.0.3",
"commitlint": "^8.1.0",
"commitlint": "^8.3.5",
"concat-md": "^0.3.0",
"concurrently": "^5.0.0",
"concurrently": "^5.1.0",
"cross-env": "^7.0.2",
"css-loader": "^3.2.0",
"css-loader": "^3.4.2",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react": "^7.19.0",
"gzip-size-cli": "^3.0.0",
"html-webpack-plugin": "^3.2.0",
"html-webpack-plugin": "^4.0.2",
"husky": "^4.0.6",
"karma": "^4.2.0",
"karma-chrome-launcher": "^3.1.0",
"karma-mocha": "^1.3.0",
"karma-typescript": "^5.0.0",
"lint-staged": "^10.0.3",
"karma-typescript": "^5.0.1",
"lint-staged": "^10.0.9",
"marked": "^0.8.2",
"mocha": "^7.1.1",
"npm-force-resolutions": "0.0.3",
"prettier": "^1.18.2",
"prismjs": "^1.17.1",
"puppeteer": "^2.0.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"rollup": "^2.1.0",
"rollup-plugin-typescript2": "^0.26.0",
"prettier": "^2.0.2",
"prismjs": "^1.19.0",
"puppeteer": "^2.1.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"rollup": "^2.2.0",
"rollup-plugin-typescript2": "^0.27.0",
"semantic-release": "^17.0.1",
"style-loader": "^1.0.0",
"ts-loader": "^6.0.4",
"typedoc": "^0.17.1",
"typedoc-plugin-markdown": "^2.1.1",
"typescript": "^3.5.3",
"uglify-js": "^3.6.0",
"webpack": "^4.39.2",
"webpack-cli": "^3.3.6",
"webpack-dev-server": "^3.8.0"
"serialize-javascript": "^3.0.0",
"style-loader": "^1.1.3",
"ts-loader": "^6.2.2",
"typedoc": "^0.17.3",
"typedoc-plugin-markdown": "^2.2.17",
"typescript": "^3.8.3",
"uglify-js": "^3.8.0",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3"
},
"resolutions": {
"lodash": ">=4.17.15",
Expand All @@ -108,7 +106,8 @@
"semi": false,
"singleQuote": true,
"jsxBracketSameLine": true,
"arrowParens": "always"
"arrowParens": "always",
"trailingComma": "none"
},
"config": {
"commitizen": {
Expand Down
4 changes: 2 additions & 2 deletions tasks/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const [constructor, defaultOptions] = redoLinks(read('../docs/modules/_panzoom_.
.split('### `Const` defaultOptions')
data += constructor
const parsedDefaults = {}
defaultOptions.replace(/\*\*(\w+)\*\*: \*\w+\* = (["\w-\.]+)/g, function(all, key, value) {
defaultOptions.replace(/\*\*(\w+)\*\*: \*\w+\* = (["\w-\.]+)/g, function (all, key, value) {
parsedDefaults[key] = value
return all
})
Expand All @@ -55,7 +55,7 @@ const panzoomOptions =
.replace(rProperties, '\n\n---\n\n## `ZoomOptions`\n\nIncludes `MiscOptions`\n\n')
data += panzoomOptions
// Add in default values to option descriptions
.replace(/\*\*(\w+)\*\*\??\s*: \*\w+\*/g, function(all, key) {
.replace(/\*\*(\w+)\*\*\??\s*: \*\w+\*/g, function (all, key) {
return parsedDefaults[key] ? `${all} (Default: **${parsedDefaults[key]}**)` : all
})

Expand Down
4 changes: 2 additions & 2 deletions test/unit/panzoom.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ describe('Panzoom', () => {
const addEvent = Element.prototype.addEventListener
const removeEvent = Element.prototype.removeEventListener
// eslint-disable-next-line
Element.prototype.addEventListener = function(event: any, fn: any, options: any) {
Element.prototype.addEventListener = function (event: any, fn: any, options: any) {
events[event] = fn
addEvent.call(this, event, fn, options)
}
// eslint-disable-next-line
Element.prototype.removeEventListener = function(event: any, fn: any, options: any) {
Element.prototype.removeEventListener = function (event: any, fn: any, options: any) {
delete events[event]
removeEvent.call(this, event, fn, options)
}
Expand Down

0 comments on commit 8d5dfa5

Please sign in to comment.