@mongosh/browser-repl 1.6.2 → 1.7.0

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.
@@ -30,20 +30,16 @@ exports.SyntaxHighlight = void 0;
30
30
  const react_1 = __importStar(require("react"));
31
31
  const prop_types_1 = __importDefault(require("prop-types"));
32
32
  const compass_components_1 = require("@mongodb-js/compass-components");
33
- const syntaxHighlight = (0, compass_components_1.css)({
34
- '& *': {
35
- background: 'transparent',
36
- border: '0px transparent',
37
- padding: 0,
38
- margin: 0,
39
- fontSize: 'inherit',
40
- borderRadius: 0,
41
- color: 'inherit'
33
+ const compass_editor_1 = require("@mongodb-js/compass-editor");
34
+ const syntaxHighlightStyles = (0, compass_components_1.css)({
35
+ lineHeight: '24px',
36
+ '& .cm-scroller': {
37
+ lineHeight: '24px'
42
38
  }
43
39
  });
44
40
  class SyntaxHighlight extends react_1.Component {
45
41
  render() {
46
- return (react_1.default.createElement(compass_components_1.Code, { language: "javascript", className: syntaxHighlight, copyable: false }, this.props.code));
42
+ return (react_1.default.createElement(compass_editor_1.SyntaxHighlight, { language: "javascript", text: this.props.code, showFoldGutter: false, showLineNumbers: false, className: syntaxHighlightStyles }));
47
43
  }
48
44
  }
49
45
  exports.SyntaxHighlight = SyntaxHighlight;
@@ -1 +1 @@
1
- {"version":3,"file":"syntax-highlight.js","sourceRoot":"","sources":["../../../src/components/utils/syntax-highlight.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,4DAAmC;AACnC,uEAA2D;AAE3D,MAAM,eAAe,GAAG,IAAA,wBAAG,EAAC;IAC1B,KAAK,EAAE;QACL,UAAU,EAAE,aAAa;QACzB,MAAM,EAAE,iBAAiB;QACzB,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,SAAS;QACnB,YAAY,EAAE,CAAC;QACf,KAAK,EAAE,SAAS;KACjB;CACF,CAAC,CAAC;AAMH,MAAa,eAAgB,SAAQ,iBAA+B;IAKlE,MAAM;QACJ,OAAO,CACL,8BAAC,yBAAI,IACH,QAAQ,EAAC,YAAY,EACrB,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,KAAK,IACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAQ,CAC1B,CAAC;IACJ,CAAC;;AAbH,0CAcC;AAbQ,yBAAS,GAAG;IACjB,IAAI,EAAE,oBAAS,CAAC,MAAM,CAAC,UAAU;CAClC,CAAC"}
1
+ {"version":3,"file":"syntax-highlight.js","sourceRoot":"","sources":["../../../src/components/utils/syntax-highlight.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,4DAAmC;AACnC,uEAAqD;AACrD,+DAAuF;AAEvF,MAAM,qBAAqB,GAAG,IAAA,wBAAG,EAAC;IAChC,UAAU,EAAE,MAAM;IAClB,gBAAgB,EAAE;QAChB,UAAU,EAAE,MAAM;KACnB;CACF,CAAC,CAAC;AAMH,MAAa,eAAgB,SAAQ,iBAA+B;IAKlE,MAAM;QACJ,OAAO,CACL,8BAAC,gCAAsB,IACrB,QAAQ,EAAC,YAAY,EACrB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,cAAc,EAAE,KAAK,EACrB,eAAe,EAAE,KAAK,EACtB,SAAS,EAAE,qBAAqB,GAChC,CACH,CAAC;IACJ,CAAC;;AAfH,0CAgBC;AAfQ,yBAAS,GAAG;IACjB,IAAI,EAAE,oBAAS,CAAC,MAAM,CAAC,UAAU;CAClC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongosh/browser-repl",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "description": "Browser presentation component for Mongo Shell",
5
5
  "engines": {
6
6
  "node": ">=14.15.1"
@@ -50,12 +50,12 @@
50
50
  ]
51
51
  },
52
52
  "dependencies": {
53
- "@mongosh/browser-runtime-core": "1.6.2",
54
- "@mongosh/errors": "1.6.2",
55
- "@mongosh/history": "1.6.2",
56
- "@mongosh/i18n": "1.6.2",
57
- "@mongosh/node-runtime-worker-thread": "1.6.2",
58
- "@mongosh/service-provider-core": "1.6.2",
53
+ "@mongosh/browser-runtime-core": "1.7.0",
54
+ "@mongosh/errors": "1.7.0",
55
+ "@mongosh/history": "1.7.0",
56
+ "@mongosh/i18n": "1.7.0",
57
+ "@mongosh/node-runtime-worker-thread": "1.7.0",
58
+ "@mongosh/service-provider-core": "1.7.0",
59
59
  "numeral": "^2.0.6",
60
60
  "text-table": "^0.2.0"
61
61
  },
@@ -67,25 +67,24 @@
67
67
  "@mongodb-js/compass-components": "*",
68
68
  "@mongodb-js/compass-editor": "*",
69
69
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.8",
70
- "@types/enzyme-adapter-react-16": "^1.0.5",
71
70
  "@types/numeral": "^2.0.2",
72
71
  "@types/react": "^16.9.17",
73
72
  "@types/react-dom": "^18.0.8",
74
73
  "@types/sinon": "^7.5.1",
75
74
  "@types/sinon-chai": "^3.2.3",
76
75
  "@types/text-table": "^0.2.1",
76
+ "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
77
77
  "babel-loader": "^8.3.0",
78
78
  "buffer": "^6.0.3",
79
79
  "enzyme": "^3.11.0",
80
- "enzyme-adapter-react-16": "^1.15.2",
81
80
  "html-webpack-plugin": "^5.5.0",
82
81
  "karma": "^6.3.9",
83
82
  "karma-webpack": "^5.0.0",
84
83
  "path-browserify": "^1.0.1",
85
84
  "prop-types": "^15.7.2",
86
85
  "puppeteer": "^2.0.0",
87
- "react": "^16.14.0",
88
- "react-dom": "^16.14.0",
86
+ "react": "^17.0.2",
87
+ "react-dom": "^17.0.2",
89
88
  "react-refresh": "^0.14.0",
90
89
  "rimraf": "^3.0.2",
91
90
  "stream-browserify": "^3.0.0",
@@ -98,8 +97,8 @@
98
97
  "@mongodb-js/compass-components": "*",
99
98
  "@mongodb-js/compass-editor": "*",
100
99
  "prop-types": "^15.7.2",
101
- "react": "^16.14.0",
102
- "react-dom": "^16.14.0"
100
+ "react": "^17.0.2",
101
+ "react-dom": "^17.0.2"
103
102
  },
104
- "gitHead": "a825d141aa5f25d90d915c9048e9c5277027ae9e"
103
+ "gitHead": "a2605fcf349a050c7a9081016a431b036b4c5ec3"
105
104
  }
package/testing/enzyme.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { configure } from 'enzyme';
2
- import Adapter from 'enzyme-adapter-react-16';
2
+ import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
3
3
  configure({ adapter: new Adapter() });
4
4
 
5
5
  export * from 'enzyme';