Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: esm in version 0.0.7 #45

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions jest.config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
isolatedModules: true,
},
],
},
moduleNameMapper: {
'@li0ard/tsemrtd': '<rootDir>/src/esm/bundle.js',
},
}

Check failure on line 16 in jest.config.base.ts

View workflow job for this annotation

GitHub Actions / Validate

Insert `,`
}

export default config
4 changes: 3 additions & 1 deletion packages/mrtd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
},
"scripts": {
"deps": "rm -f src/esm/bundle.js && esbuild --platform=node src/esm/index.ts --bundle --outfile=src/esm/bundle.js",
"build": "yarn run clean && yarn run compile && yarn run deps",
"prebuild": "yarn run deps",
"copy-esm": "cp src/esm/bundle.js build/esm/",
"build": "yarn run clean && yarn run compile && yarn run copy-esm",
"clean": "rimraf -rf ./build",
"compile": "tsc -p tsconfig.build.json",
"prepublishOnly": "yarn run build",
Expand Down
3 changes: 2 additions & 1 deletion packages/mrtd/src/models/EMrtdData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
DecodedSecurtyObjectOfDocument,
} from '@li0ard/tsemrtd/dist/consts/interfaces'
import type { SubjectPublicKeyInfo } from '@peculiar/asn1-x509'
import type tsemrtd from '@li0ard/tsemrtd'

Check failure on line 13 in packages/mrtd/src/models/EMrtdData.ts

View workflow job for this annotation

GitHub Actions / Validate

`@li0ard/tsemrtd` type import should occur before type import of `@li0ard/tsemrtd/dist/asn1/eac`

import { COM, DG1, DG2, DG3, DG4, DG5, DG7, DG11, DG12, DG14, DG15, SOD, PKD } from '../esm'
const { COM, DG1, DG2, DG3, DG4, DG5, DG7, DG11, DG12, DG14, DG15, SOD, PKD } = require('../esm/bundle.js') as typeof tsemrtd

Check failure on line 15 in packages/mrtd/src/models/EMrtdData.ts

View workflow job for this annotation

GitHub Actions / Validate

Insert `⏎·`

Check failure on line 15 in packages/mrtd/src/models/EMrtdData.ts

View workflow job for this annotation

GitHub Actions / Validate

Require statement not part of import statement

import { EMrtdDataGroup } from './EMrtdDataGroup'

Expand Down
Loading