New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@openstax/highlighter

Package Overview
Dependencies
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openstax/highlighter - npm Package Compare versions

Comparing version 1.1.9 to 1.2.0-beta.1

.travis.yml

19

package.json
{
"name": "@openstax/highlighter",
"version": "1.1.9",
"main": "dist/highlighter.js",
"version": "1.2.0-beta.1",
"main": "dist/index.js",
"license": "MIT",

@@ -9,5 +9,5 @@ "scripts": {

"clean": "rm -rf dist",
"build": "webpack --config=webpack.config.js --mode=production",
"build": "tsc -m es6 --outDir dist",
"build:clean": "npm-run-all clean build",
"test": "jest --coverage --verbose --maxWorkers=2",
"deploy:examples": "gh-pages -d examples",
"lint": "npm-run-all lint:js lint:ts lint:ts-types",

@@ -17,5 +17,5 @@ "lint:js": "eslint src/**/*.js",

"lint:ts-types": "tsc",
"watch": "webpack --config=webpack.config.js --mode=development --watch",
"watch:test": "jest --watchAll",
"watch:ts": "tsc --noEmit --watch"
"test": "jest --coverage --verbose --maxWorkers=2",
"watch": "tsc --noEmit --watch",
"watch:test": "jest --watchAll"
},

@@ -34,2 +34,3 @@ "devDependencies": {

"eslint-loader": "^2.1.1",
"gh-pages": "^2.0.1",
"jest": "^23.6.0",

@@ -41,5 +42,3 @@ "npm-run-all": "^4.1.3",

"typescript": "^3.1.1",
"typescript-babel-jest": "^1.0.5",
"webpack": "^4.20.2",
"webpack-cli": "^3.1.2"
"typescript-babel-jest": "^1.0.5"
},

@@ -46,0 +45,0 @@ "resolutions": {

@@ -60,1 +60,18 @@ # Highlighter

```
## Running the examples with docker
```bash
# builds the library for the examples to use
docker-compose run build
# runs the test server on port 8080
docker-compose up serve
```
## Deploy examples to gh-pages
```bash
yarn build:clean && yarn deploy:examples
```

@@ -32,3 +32,7 @@ import Highlight, {FOCUS_CSS} from './Highlight';

public erase(highlight: Highlight): void {
public eraseAll = (): void => {
this.getHighlights().forEach(this.erase);
}
public erase = (highlight: Highlight): void => {
removeHighlightWrappers(highlight);

@@ -35,0 +39,0 @@ delete this.highlights[highlight.id];

@@ -53,9 +53,11 @@ import dom from '../../dom';

const [startContainer, startOffset] = getFirstByXPath(data.startContainer, data.startOffset, referenceElement);
const [endContainer, endOffset] = getFirstByXPath(data.endContainer, data.endOffset, referenceElement);
const [startContainer, startOffset] = getFirstByXPath(data.startContainer, data.startOffset, referenceElement!);
const [endContainer, endOffset] = getFirstByXPath(data.endContainer, data.endOffset, referenceElement!);
range.setStart(startContainer, startOffset);
range.setEnd(endContainer, endOffset);
if (startContainer && endContainer) {
range.setStart(startContainer, startOffset);
range.setEnd(endContainer, endOffset);
}
return range;
}

@@ -14,11 +14,12 @@ {

"strict": true,
"declaration": true,
"module": "es6",
"moduleResolution": "node",
"sourceMap": true,
"allowJs": true
"sourceMap": true
},
"exclude": [
"node_modules",
"dist",
"**/*.js"
]
}

@@ -1,1 +0,1 @@

declare module "serialize-selection";
declare module 'serialize-selection';
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc