@readme/syntax-highlighter 12.1.2 → 12.1.5

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/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.5",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
7
7
  "license": "ISC",
@@ -11,13 +11,12 @@
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",
18
18
  "lint": "eslint . --ext .jsx --ext .js",
19
19
  "prepack": "npm run build",
20
- "prepare": "husky install",
21
20
  "pretest": "npm run lint",
22
21
  "prettier": "prettier --list-different --write \"./**/**.{js,jsx}\"",
23
22
  "start": "webpack serve --open --config ./webpack.config.dev.js",
@@ -25,53 +24,45 @@
25
24
  "watch": "webpack -w --progress"
26
25
  },
27
26
  "dependencies": {
28
- "codemirror": "5.54.0",
27
+ "codemirror": "^5.54.0",
29
28
  "codemirror-graphql": "1.0.2",
30
29
  "prop-types": "^15.7.2",
31
30
  "react-codemirror2": "^7.2.1"
32
31
  },
33
32
  "peerDependencies": {
34
- "@readme/variable": "^15.1.0",
33
+ "@readme/variable": "15.x || 16.x",
35
34
  "react": "16.x || 17.x",
36
35
  "react-dom": "16.x || 17.x"
37
36
  },
38
37
  "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",
38
+ "@babel/preset-env": "^7.22.20",
39
+ "@babel/preset-react": "^7.22.15",
40
+ "@readme/eslint-config": "^13.5.0",
44
41
  "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
45
- "babel-jest": "^29.5.0",
42
+ "babel-jest": "^29.7.0",
46
43
  "babel-loader": "^8.2.4",
47
- "core-js": "^3.31.0",
44
+ "core-js": "^3.33.0",
48
45
  "css-loader": "^6.7.3",
49
46
  "enzyme": "^3.11.0",
50
- "eslint": "^8.44.0",
51
- "glob": "^10.3.1",
47
+ "eslint": "^8.57.0",
48
+ "glob": "^10.3.10",
52
49
  "html-webpack-plugin": "^5.5.3",
53
- "husky": "^8.0.3",
54
50
  "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",
51
+ "jest": "^29.7.0",
52
+ "jest-environment-jsdom": "^29.7.0",
53
+ "node-sass": "^9.0.0",
54
+ "prettier": "^3.0.3",
59
55
  "react": "^17.0.2",
60
56
  "react-dom": "^17.0.2",
61
- "regenerator-runtime": "^0.13.9",
57
+ "regenerator-runtime": "^0.14.0",
62
58
  "sass-loader": "^13.3.2",
63
59
  "style-loader": "^3.3.2",
64
60
  "terser-webpack-plugin": "^5.3.7",
65
- "webpack": "^5.88.1",
61
+ "webpack": "^5.88.2",
66
62
  "webpack-cli": "^5.1.4",
67
63
  "webpack-dev-server": "^4.15.1"
68
64
  },
69
65
  "prettier": "@readme/eslint-config/prettier",
70
- "commitlint": {
71
- "extends": [
72
- "@commitlint/config-conventional"
73
- ]
74
- },
75
66
  "bundlewatch": {
76
67
  "files": [
77
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 */