File tree Expand file tree Collapse file tree 7 files changed +26
-0
lines changed Expand file tree Collapse file tree 7 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 4545 - run :
4646 name : Build
4747 command : yarn build
48+ - run :
49+ name : Test exports
50+ command : yarn test:exports
4851 - run :
4952 name : Test size
5053 command : yarn test:build-size
Original file line number Diff line number Diff line change 1717 "test:browser-locally" : " yarn setup:browser && ./scripts/prepare-test-browser.sh && wdio ./wdio.local.conf.js" ,
1818 "test:build-declarations" : " node --max-old-space-size=4096 scripts/test-build-declarations.js" ,
1919 "test:build-size" : " bundlesize" ,
20+ "test:exports" : " lerna run test:exports" ,
2021 "test:lint" : " eslint . --ext .js,.ts" ,
2122 "test:locally" : " lerna clean --yes && yarn lint && yarn test:types && yarn test:unit" ,
2223 "test:types" : " yarn tsc" ,
Original file line number Diff line number Diff line change 2424 " lite.js" ,
2525 " lite.d.ts"
2626 ],
27+ "scripts" : {
28+ "test:exports" : " node --experimental-modules test/module/is-es-module.mjs && node test/module/is-cjs-module.cjs"
29+ },
2730 "dependencies" : {
2831 "@algolia/cache-browser-local-storage" : " 4.23.0" ,
2932 "@algolia/cache-common" : " 4.23.0" ,
Original file line number Diff line number Diff line change 1+ /* eslint-disable import/no-commonjs */
2+ /* eslint-disable no-console */
3+ const algoliasearch = require ( 'algoliasearch' ) ;
4+ const assert = require ( 'assert' ) ;
5+
6+ assert . ok ( algoliasearch ) ;
7+ assert . doesNotThrow ( ( ) => algoliasearch ( '..' , '..' ) ) ;
8+
9+ console . log ( 'algoliasearch is valid CJS' ) ;
Original file line number Diff line number Diff line change 1+ /* eslint-disable no-console */
2+ import algoliasearch from 'algoliasearch' ;
3+ import assert from 'assert' ;
4+
5+ assert . ok ( algoliasearch ) ;
6+ assert . doesNotThrow ( ( ) => algoliasearch ( '..' , '..' ) ) ;
7+
8+ console . log ( 'algoliasearch is valid ESM' ) ;
Original file line number Diff line number Diff line change @@ -68,4 +68,5 @@ recommend.version = version;
6868
6969export type RecommendClient = WithRecommendMethods < BaseRecommendClient > ;
7070
71+ export * from '../methods' ;
7172export * from '../types' ;
Original file line number Diff line number Diff line change @@ -62,4 +62,5 @@ recommend.version = version;
6262
6363export type RecommendClient = WithRecommendMethods < BaseRecommendClient > & Destroyable ;
6464
65+ export * from '../methods' ;
6566export * from '../types' ;
You can’t perform that action at this time.
0 commit comments