Skip to content

Commit

Permalink
fixed type import issues (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
muratgozel committed Feb 11, 2024
1 parent 5c42ad9 commit 04e9ea0
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 53 deletions.
48 changes: 28 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
{
"name": "mimetext",
"version": "v3.0.17",
"version": "v3.0.18",
"description": "RFC 2822 compliant raw email message generator written in node.js",
"type": "module",
"exports": {
".": {
"node": {
"import": "./dist/node/mimetext.es.js",
"require": "./dist/node/mimetext.cjs",
"default": "./dist/node/mimetext.cjs",
"types": "./types/entrypoints/node.d.ts"
"import": {
"types": "./types/entrypoints/node.d.ts",
"default": "./dist/node/mimetext.es.js"
},
"import": "./dist/browser/mimetext.es.js",
"require": "./dist/browser/mimetext.cjs",
"default": "./dist/browser/mimetext.cjs",
"types": "./types/entrypoints/browser.d.ts"
"require": {
"types": "./types/entrypoints/node.d.ts",
"default": "./dist/node/mimetext.cjs"
}
},
"./browser": {
"import": "./dist/browser/mimetext.es.js",
"require": "./dist/browser/mimetext.cjs",
"default": "./dist/browser/mimetext.cjs",
"types": "./types/entrypoints/browser.d.ts"
"import": {
"types": "./types/entrypoints/browser.d.ts",
"default": "./dist/browser/mimetext.es.js"
},
"require": {
"types": "./types/entrypoints/browser.d.ts",
"default": "./dist/browser/mimetext.cjs"
}
},
"./node": {
"import": "./dist/node/mimetext.es.js",
"require": "./dist/node/mimetext.cjs",
"default": "./dist/node/mimetext.cjs",
"types": "./types/entrypoints/node.d.ts"
"import": {
"types": "./types/entrypoints/node.d.ts",
"default": "./dist/node/mimetext.es.js"
},
"require": {
"types": "./types/entrypoints/node.d.ts",
"default": "./dist/node/mimetext.cjs"
}
},
"./gas": {
"default": "./dist/gas/mimetext.js",
Expand All @@ -35,11 +41,13 @@
},
"main": "dist/node/mimetext.cjs",
"module": "./dist/node/mimetext.es.js",
"types": "types",
"scripts": {
"setup": "exit 0",
"precompile": "rm -rf build/*",
"compile": "tsc -p tsconfig.json",
"compile": "tsc -p tsconfig.json && npm run mingle && npm run gingle && npm run dingle",
"mingle": "echo \"declare module 'mimetext' {\\n\" | cat - ./types/entrypoints/node.d.ts > ./types/entrypoints/node2.d.ts && echo \"\\n}\" >> ./types/entrypoints/node2.d.ts && mv ./types/entrypoints/node2.d.ts ./types/entrypoints/node.d.ts",
"gingle": "echo \"declare module 'mimetext' {\\n\" | cat - ./types/entrypoints/browser.d.ts > ./types/entrypoints/browser2.d.ts && echo \"\\n}\" >> ./types/entrypoints/browser2.d.ts && mv ./types/entrypoints/browser2.d.ts ./types/entrypoints/browser.d.ts",
"dingle": "echo \"declare module 'mimetext' {\\n\" | cat - ./types/entrypoints/gas.d.ts > ./types/entrypoints/gas2.d.ts && echo \"\\n}\" >> ./types/entrypoints/gas2.d.ts && mv ./types/entrypoints/gas2.d.ts ./types/entrypoints/gas.d.ts",
"build": "rollup --config rollup.config.js",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"docs": "typedoc --entryPointStrategy expand --includeVersion --excludePrivate ./src/entrypoints/node.ts ./src/entrypoints/gas.ts ./src/entrypoints/browser.ts ./types/entrypoints/node.d.ts ./types/entrypoints/gas.d.ts ./types/entrypoints/browser.d.ts ./types/*.d.ts"
Expand Down
6 changes: 0 additions & 6 deletions src/entrypoints/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,3 @@ export { Mailbox } from '../Mailbox.js'
export { MIMETextError } from '../MIMETextError.js'
export { MIMEMessageHeader } from '../MIMEMessageHeader.js'
export { MIMEMessageContent } from '../MIMEMessageContent.js'

export type * from '../MIMEMessage.js'
export type * from '../Mailbox.js'
export type * from '../MIMETextError.js'
export type * from '../MIMEMessageHeader.js'
export type * from '../MIMEMessageContent.js'
6 changes: 0 additions & 6 deletions src/entrypoints/gas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,3 @@ export { Mailbox } from '../Mailbox.js'
export { MIMETextError } from '../MIMETextError.js'
export { MIMEMessageHeader } from '../MIMEMessageHeader.js'
export { MIMEMessageContent } from '../MIMEMessageContent.js'

export type * from '../MIMEMessage.js'
export type * from '../Mailbox.js'
export type * from '../MIMETextError.js'
export type * from '../MIMEMessageHeader.js'
export type * from '../MIMEMessageContent.js'
6 changes: 0 additions & 6 deletions src/entrypoints/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,3 @@ export { Mailbox } from '../Mailbox.js'
export { MIMETextError } from '../MIMETextError.js'
export { MIMEMessageHeader } from '../MIMEMessageHeader.js'
export { MIMEMessageContent } from '../MIMEMessageContent.js'

export type * from '../MIMEMessage.js'
export type * from '../Mailbox.js'
export type * from '../MIMETextError.js'
export type * from '../MIMEMessageHeader.js'
export type * from '../MIMEMessageContent.js'
9 changes: 4 additions & 5 deletions types/entrypoints/browser.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
declare module 'mimetext' {

import { MIMEMessage } from '../MIMEMessage.js';
export declare function createMimeMessage(): MIMEMessage;
export { MIMEMessage } from '../MIMEMessage.js';
export { Mailbox } from '../Mailbox.js';
export { MIMETextError } from '../MIMETextError.js';
export { MIMEMessageHeader } from '../MIMEMessageHeader.js';
export { MIMEMessageContent } from '../MIMEMessageContent.js';
export type * from '../MIMEMessage.js';
export type * from '../Mailbox.js';
export type * from '../MIMETextError.js';
export type * from '../MIMEMessageHeader.js';
export type * from '../MIMEMessageContent.js';

}
9 changes: 4 additions & 5 deletions types/entrypoints/gas.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
declare module 'mimetext' {

import { MIMEMessage } from '../MIMEMessage.js';
export declare function createMimeMessage(): MIMEMessage;
export { MIMEMessage } from '../MIMEMessage.js';
export { Mailbox } from '../Mailbox.js';
export { MIMETextError } from '../MIMETextError.js';
export { MIMEMessageHeader } from '../MIMEMessageHeader.js';
export { MIMEMessageContent } from '../MIMEMessageContent.js';
export type * from '../MIMEMessage.js';
export type * from '../Mailbox.js';
export type * from '../MIMETextError.js';
export type * from '../MIMEMessageHeader.js';
export type * from '../MIMEMessageContent.js';

}
9 changes: 4 additions & 5 deletions types/entrypoints/node.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
declare module 'mimetext' {

import { MIMEMessage } from '../MIMEMessage.js';
export declare function createMimeMessage(): MIMEMessage;
export { MIMEMessage } from '../MIMEMessage.js';
export { Mailbox } from '../Mailbox.js';
export { MIMETextError } from '../MIMETextError.js';
export { MIMEMessageHeader } from '../MIMEMessageHeader.js';
export { MIMEMessageContent } from '../MIMEMessageContent.js';
export type * from '../MIMEMessage.js';
export type * from '../Mailbox.js';
export type * from '../MIMETextError.js';
export type * from '../MIMEMessageHeader.js';
export type * from '../MIMEMessageContent.js';

}

0 comments on commit 04e9ea0

Please sign in to comment.