Skip to content

Commit

Permalink
7.5.0 Upgrade dependency versions (#321)
Browse files Browse the repository at this point in the history
* Upgrade dependencies

* fix build

* Add husky and prettier-quick

* 7.5.0

* fix build

* fix build
  • Loading branch information
JiuqingSong authored Jul 31, 2019
1 parent 3dd68f9 commit 39882de
Show file tree
Hide file tree
Showing 12 changed files with 6,399 additions and 8,195 deletions.
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "es5",
"printWidth": 100,
"jsxBracketSameLine": true,
"semi": true,
"bracketSpacing": true,
"endOfLine": "crlf"
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: required
addons:
chrome: stable
node_js:
- 9
- 10
before_install:
- yarn
- cd publish/samplesite/instrumentation-tests && yarn && cd ../../..
Expand Down
62 changes: 33 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "roosterjs",
"version": "7.4.1",
"version": "7.5.0",
"description": "Framework-independent javascript editor",
"repository": {
"type": "git",
Expand All @@ -23,7 +23,6 @@
"start": "webpack-dev-server",
"test": "karma start",
"test:debug": "karma start --no-single-run",
"prettier": "node tools/prettier.js",
"publish": "node tools/build.js clean normalize tslint buildcommonjs buildamd dts pack packprod copysample builddemo publish",
"publish:dark": "node tools/build.js clean normalize tslint buildcommonjs buildamd dts pack packprod copysample builddemo publishdark",
"instrumentation": "cd publish/samplesite/instrumentation-tests && npm run instrumentation",
Expand All @@ -32,40 +31,45 @@
},
"devDependencies": {
"@types/jasmine": "2.6.0",
"@types/dom-inputevent": "^1.0.3",
"glob": "7.1.2",
"jasmine-core": "2.8.0",
"karma": "2.0.0",
"@types/dom-inputevent": "1.0.5",
"glob": "7.1.4",
"husky": "^3.0.1",
"jasmine-core": "3.4.0",
"karma": "4.1.0",
"karma-chrome-launcher": "2.2.0",
"karma-jasmine": "1.1.1",
"karma-jasmine": "2.0.1",
"karma-phantomjs-launcher": "1.0.4",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "3.0.0",
"karma-webpack": "4.0.2",
"ncp": "2.0.0",
"prettier": "1.15.3",
"prettier": "1.18.2",
"pretty-quick": "^1.11.1",
"progress": "2.0.3",
"rimraf": "2.6.2",
"source-map-explorer": "1.6.0",
"toposort": "1.0.4",
"ts-loader": "^5.3.1",
"tslint": "5.11.0",
"rimraf": "2.6.3",
"source-map-explorer": "2.0.1",
"toposort": "2.0.2",
"ts-loader": "6.0.4",
"tslint": "5.18.0",
"tslint-eslint-rules": "5.4.0",
"tslint-microsoft-contrib": "5.2.1",
"tslint-microsoft-contrib": "6.2.0",
"typedoc": "0.8.0",
"typedoc-plugin-external-module-map": "0.1.0",
"typescript": "^3.2.2",
"webpack": "^4.27.1",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10",
"//": "Dependencies below are for sample site only",
"@microsoft/loader-load-themed-styles": "^1.7.118",
"@types/node": "^10.12.15",
"typedoc-plugin-external-module-map": "1.0.0",
"typescript": "3.5.2",
"webpack": "4.35.2",
"webpack-cli": "3.3.5",
"webpack-dev-server": "3.7.2",
"@microsoft/loader-load-themed-styles": "1.7.166",
"@types/node": "12.0.10",
"@types/object-assign": "4.0.30",
"@types/react": "^16.7.17",
"@types/react-dom": "^16.0.11",
"css-loader": "^2.0.1",
"node-sass": "^4.11.0",
"sass-loader": "^7.1.0",
"url-loader": "^1.1.2"
"@types/react-dom": "16.8.4",
"css-loader": "3.0.0",
"node-sass": "4.12.0",
"sass-loader": "7.1.0",
"url-loader": "2.0.1"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function extractClipboardEvent(
) {
let dataTransfer =
event.clipboardData ||
(<WindowForIE>event.srcElement.ownerDocument.defaultView).clipboardData;
(<WindowForIE>(<Node>event.target).ownerDocument.defaultView).clipboardData;
let result: ClipboardItems = {
types: dataTransfer.types ? [].slice.call(dataTransfer.types) : [],
text: dataTransfer.getData('text'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function getLongestReplacementSourceLength(replacements: Replacement[]): number
}

function getReplacementEndCharacters(replacements: Replacement[]): Set<string> {
const endChars = new Set();
const endChars = new Set<string>();
for (let replacement of replacements) {
const sourceString = replacement.sourceString;
if (sourceString.length == 0) {
Expand Down
7 changes: 3 additions & 4 deletions packages/roosterjs-editor-plugins/lib/HyperLink/HyperLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class HyperLink implements EditorPlugin {
}

protected onMouse = (e: MouseEvent) => {
const a = this.editor.getElementAtCursor('a[href]', e.srcElement) as HTMLAnchorElement;
const a = this.editor.getElementAtCursor('a[href]', <Node>e.target) as HTMLAnchorElement;
const href = this.tryGetHref(a);

if (href) {
Expand All @@ -67,10 +67,9 @@ export default class HyperLink implements EditorPlugin {
*/
public onPluginEvent(event: PluginEvent): void {
if (event.eventType == PluginEventType.MouseUp) {
const anchor = this.editor.getElementAtCursor(
'A',
const anchor = this.editor.getElementAtCursor('A', <Node>(
event.rawEvent.srcElement
) as HTMLAnchorElement;
)) as HTMLAnchorElement;

if (anchor) {
if (this.onLinkClick && this.onLinkClick(anchor, event.rawEvent) !== false) {
Expand Down
Loading

0 comments on commit 39882de

Please sign in to comment.