File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/VersionEntry Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import CrossIcon from 'react-icons/lib/md/clear';
33import RefreshIcon from 'react-icons/lib/md/refresh' ;
44import ArrowDropDown from 'react-icons/lib/md/keyboard-arrow-down' ;
55import ArrowDropUp from 'react-icons/lib/md/keyboard-arrow-up' ;
6- import algoliasearch from 'algoliasearch' ;
6+ import algoliasearch from 'algoliasearch/lite ' ;
77import compareVersions from 'compare-versions' ;
88import Tooltip from '@codesandbox/common/lib/components/Tooltip' ;
99
@@ -77,8 +77,8 @@ export default class VersionEntry extends React.PureComponent {
7777 '00383ecd8441ead30b1b0ff981c426f5'
7878 ) ;
7979 const index = client . initIndex ( 'npm-search' ) ;
80- index . search ( { query : dependency , hitsPerPage : 1 } , ( err , { hits } ) => {
81- const versions = Object . keys ( hits [ 0 ] . versions ) . sort ( ( a , b ) => {
80+ index . getObject ( dependency , [ 'versions' ] ) . then ( ( { versions : results } ) => {
81+ const versions = Object . keys ( results ) . sort ( ( a , b ) => {
8282 try {
8383 return compareVersions ( b , a ) ;
8484 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments