Skip to content

Commit

Permalink
fix(build): No longer export package version
Browse files Browse the repository at this point in the history
This fixes the TypeScript build.
  • Loading branch information
fb55 committed May 6, 2021
1 parent 649b6cf commit 52678df
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 1 addition & 5 deletions src/cheerio.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { parseDOM } from 'htmlparser2';
import cheerio, { version } from '.';
import cheerio from '.';
import * as utils from './utils';
import { fruits, food, noscript } from './__fixtures__/fixtures';
import { Cheerio } from './cheerio';
Expand All @@ -11,10 +11,6 @@ const script = '<script src="script.js" type="text/javascript"></script>';
const multiclass = '<p><a class="btn primary" href="#">Save</a></p>';

describe('cheerio', () => {
it('should get the version', () => {
expect(version).toMatch(/\d+\.\d+\.\d+/);
});

it('cheerio(null) should be empty', () => {
expect(cheerio(null as any)).toHaveLength(0);
});
Expand Down
3 changes: 0 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ export type {
*/
export type { Node, NodeWithChildren, Element, Document } from 'domhandler';

/** The current version of Cheerio. */
export { version } from '../package.json';

export * from './load';
import { load } from './load';
// We add this here, to avoid a cyclic depenency
Expand Down

0 comments on commit 52678df

Please sign in to comment.