Skip to content

Commit

Permalink
feat: Fix problematic type def.
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisdonovan committed Oct 27, 2024
1 parent 72ba800 commit 54b89ec
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 18 deletions.
6 changes: 2 additions & 4 deletions dist/cjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2703,8 +2703,6 @@ const cleanText = (text, filterWords) => {
.join('\n');
};

googleNewsScraper;

var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
Expand All @@ -2714,7 +2712,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const googleNewsScraper$1 = (userConfig) => __awaiter(void 0, void 0, void 0, function* () {
const googleNewsScraper = (userConfig) => __awaiter(void 0, void 0, void 0, function* () {
var _a, _b;
const config = Object.assign({
prettyURLs: true,
Expand Down Expand Up @@ -2820,4 +2818,4 @@ const googleNewsScraper$1 = (userConfig) => __awaiter(void 0, void 0, void 0, fu
return config.limit < results.length ? filtered.slice(0, config.limit) : filtered;
});

module.exports = googleNewsScraper$1;
module.exports = googleNewsScraper;
2 changes: 1 addition & 1 deletion dist/cjs/min/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cjs/min/index.min.js.map

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions dist/esm/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2682,8 +2682,6 @@ const cleanText = (text, filterWords) => {
.join('\n');
};

googleNewsScraper;

var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
Expand All @@ -2693,7 +2691,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const googleNewsScraper$1 = (userConfig) => __awaiter(void 0, void 0, void 0, function* () {
const googleNewsScraper = (userConfig) => __awaiter(void 0, void 0, void 0, function* () {
var _a, _b;
const config = Object.assign({
prettyURLs: true,
Expand Down Expand Up @@ -2799,5 +2797,5 @@ const googleNewsScraper$1 = (userConfig) => __awaiter(void 0, void 0, void 0, fu
return config.limit < results.length ? filtered.slice(0, config.limit) : filtered;
});

export { googleNewsScraper$1 as default };
export { googleNewsScraper as default };
//# sourceMappingURL=index.mjs.map
2 changes: 1 addition & 1 deletion dist/esm/index.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/min/index.min.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/min/index.min.mjs.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/tsc/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ export interface ExtractArticleContentAndFaviconProps {
filterWords: string[];
logger: winston.Logger;
}
declare const googleNewsScraper: (userConfig: GNSUserConfig) => Promise<Article[]>;
export default googleNewsScraper;
export {};
4 changes: 3 additions & 1 deletion dist/tsc/types.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export default googleNewsScraper;
export {};
// declare const googleNewsScraper: (userConfig: GNSUserConfig) => Promise<Article[]>;
// export default googleNewsScraper;
2 changes: 2 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ export default {
{
dir: './dist/esm',
format: 'esm',
interop: 'esModule',
sourcemap: true,
preserveModules: false,
entryFileNames: '[name].mjs',
},
{
dir: './dist/esm/min',
format: 'esm',
interop: 'esModule',
plugins: [terser()],
sourcemap: true,
entryFileNames: '[name].min.mjs',
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ export interface ExtractArticleContentAndFaviconProps {
logger: winston.Logger;
}

declare const googleNewsScraper: (userConfig: GNSUserConfig) => Promise<Article[]>;
// declare const googleNewsScraper: (userConfig: GNSUserConfig) => Promise<Article[]>;

export default googleNewsScraper;
// export default googleNewsScraper;

0 comments on commit 54b89ec

Please sign in to comment.