@readme/syntax-highlighter 12.1.2 → 12.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@ ReadMe's React-based syntax highlighter based on [CodeMirror][codemirror] and [r
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@readme/syntax-highlighter)](https://npm.im/@readme/syntax-highlighter) [![Build](https://github.com/readmeio/syntax-highlighter/workflows/CI/badge.svg)](https://github.com/readmeio/syntax-highlighter)
6
6
 
7
- [![](https://d3vv6lp55qjaqc.cloudfront.net/items/1M3C3j0I0s0j3T362344/Untitled-2.png)](https://readme.io)
7
+ [![](https://raw.githubusercontent.com/readmeio/.github/main/oss-header.png)](https://readme.io)
8
8
 
9
9
  ## Installation
10
10
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@readme/syntax-highlighter",
3
3
  "description": "ReadMe's React-based syntax highlighter",
4
- "version": "12.1.2",
4
+ "version": "12.1.3",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
7
7
  "license": "ISC",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "homepage": "https://readmeio.github.io/syntax-highlighter/",
13
13
  "engines": {
14
- "node": ">=16"
14
+ "node": ">=18"
15
15
  },
16
16
  "scripts": {
17
17
  "build": "webpack --progress",
@@ -31,38 +31,38 @@
31
31
  "react-codemirror2": "^7.2.1"
32
32
  },
33
33
  "peerDependencies": {
34
- "@readme/variable": "^15.1.0",
34
+ "@readme/variable": "15.x || 16.x",
35
35
  "react": "16.x || 17.x",
36
36
  "react-dom": "16.x || 17.x"
37
37
  },
38
38
  "devDependencies": {
39
- "@babel/preset-env": "^7.22.5",
40
- "@babel/preset-react": "^7.22.5",
41
- "@commitlint/cli": "^17.6.6",
42
- "@commitlint/config-conventional": "^17.6.6",
43
- "@readme/eslint-config": "^10.6.1",
39
+ "@babel/preset-env": "^7.22.20",
40
+ "@babel/preset-react": "^7.22.15",
41
+ "@commitlint/cli": "^17.7.2",
42
+ "@commitlint/config-conventional": "^17.7.0",
43
+ "@readme/eslint-config": "^13.0.1",
44
44
  "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
45
- "babel-jest": "^29.5.0",
45
+ "babel-jest": "^29.7.0",
46
46
  "babel-loader": "^8.2.4",
47
- "core-js": "^3.31.0",
47
+ "core-js": "^3.33.0",
48
48
  "css-loader": "^6.7.3",
49
49
  "enzyme": "^3.11.0",
50
- "eslint": "^8.44.0",
51
- "glob": "^10.3.1",
50
+ "eslint": "^8.50.0",
51
+ "glob": "^10.3.10",
52
52
  "html-webpack-plugin": "^5.5.3",
53
53
  "husky": "^8.0.3",
54
54
  "identity-obj-proxy": "^3.0.0",
55
- "jest": "^29.5.0",
56
- "jest-environment-jsdom": "^29.5.0",
57
- "node-sass": "^7.0.3",
58
- "prettier": "^2.8.8",
55
+ "jest": "^29.7.0",
56
+ "jest-environment-jsdom": "^29.7.0",
57
+ "node-sass": "^9.0.0",
58
+ "prettier": "^3.0.3",
59
59
  "react": "^17.0.2",
60
60
  "react-dom": "^17.0.2",
61
- "regenerator-runtime": "^0.13.9",
61
+ "regenerator-runtime": "^0.14.0",
62
62
  "sass-loader": "^13.3.2",
63
63
  "style-loader": "^3.3.2",
64
64
  "terser-webpack-plugin": "^5.3.7",
65
- "webpack": "^5.88.1",
65
+ "webpack": "^5.88.2",
66
66
  "webpack-cli": "^5.1.4",
67
67
  "webpack-dev-server": "^4.15.1"
68
68
  },
package/public/index.js CHANGED
@@ -164,5 +164,5 @@ ReactDOM.render(
164
164
  {syntaxHighlighter(exampleJson, 'json', { foldGutter: true, readOnly: true, dark: false })}
165
165
  </pre>
166
166
  </div>,
167
- document.getElementById('root')
167
+ document.getElementById('root'),
168
168
  );
package/src/index.js CHANGED
@@ -18,7 +18,7 @@ const SyntaxHighlighter = (
18
18
  inline: false,
19
19
  tokenizeVariables: false,
20
20
  },
21
- editorProps = {}
21
+ editorProps = {},
22
22
  ) => {
23
23
  let theme = opts.dark ? 'material-palenight' : 'neo';
24
24
  if (opts.customTheme) {
@@ -57,7 +57,7 @@ const SyntaxHighlighter = (
57
57
  return React.createElement(
58
58
  wrapper,
59
59
  { className: classes.join(' ') },
60
- codemirror(typeof code === 'string' ? code : '', lang, opts)
60
+ codemirror(typeof code === 'string' ? code : '', lang, opts),
61
61
  );
62
62
  };
63
63
 
@@ -2,7 +2,6 @@
2
2
  /* eslint-disable prefer-template */
3
3
  /* eslint-disable object-shorthand */
4
4
  /* eslint-disable no-return-assign */
5
- /* eslint-disable unicorn/no-unsafe-regex */
6
5
  /* eslint-disable no-unused-expressions */
7
6
  /* eslint-disable consistent-return */
8
7
  /* eslint-disable no-prototype-builtins */