Skip to content

Commit

Permalink
[patch] add file extensions to imports for ESM support
Browse files Browse the repository at this point in the history
  • Loading branch information
electrovir committed May 8, 2024
1 parent 0e1be7b commit c33bcfc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pdf-text-reader",
"version": "5.0.0",
"version": "5.0.1",
"description": "Dead simple pdf text reader",
"keywords": [
"pdf",
Expand Down Expand Up @@ -30,7 +30,7 @@
"docs": "virmator docs",
"format": "prettier --color --cache --cache-strategy content \"./**/*.+(cjs|css|graphql|html|js|json|jsx|less|md|mjs|scss|toml|ts|tsx|yaml|yml)\"",
"publish": "virmator publish \"npm run compile && npm run test:all\"",
"test": "test-as-package mocha --colors --config 'configs/mocha.config.cjs'",
"test": "npm run compile && test-as-package mocha --colors --config 'configs/mocha.config.cjs'",
"test:all": "concurrently --colors --kill-others-on-fail -c auto --names types,tests,spelling,format,docs,deps \"npm run test:types\" \"npm run test\" \"npm run test:spelling\" \"npm run test:format\" \"npm run test:docs\" \"npm run test:deps\"",
"test:deps": "virmator deps check",
"test:docs": "virmator docs check",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './read-pdf';
export * from './read-pdf.js';
4 changes: 2 additions & 2 deletions src/read-pdf.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import {assert} from 'chai';
import {existsSync} from 'node:fs';
import {join} from 'node:path';
import type {ReadonlyDeep} from 'type-fest';
import {PdfProgressData, readPdfPages, readPdfText} from './read-pdf';
import {nodeModulesDir, sampleFilesDir} from './repo-paths.test-helper';
import {PdfProgressData, readPdfPages, readPdfText} from './read-pdf.js';
import {nodeModulesDir, sampleFilesDir} from './repo-paths.test-helper.js';

type PdfTestFile = {
filePath: string;
Expand Down
4 changes: 2 additions & 2 deletions src/read-pdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import type {
DocumentInitParameters,
PDFPageProxy,
TextItem,
} from 'pdfjs-dist/types/src/display/api';
} from 'pdfjs-dist/types/src/display/api.js';
import type {RequireExactlyOne} from 'type-fest';

export type {DocumentInitParameters} from 'pdfjs-dist/types/src/display/api';
export type {DocumentInitParameters} from 'pdfjs-dist/types/src/display/api.js';

/** A single page within a PDF file. */
export type PdfPage = {
Expand Down

0 comments on commit c33bcfc

Please sign in to comment.