Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion types/blue-tape/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"dependencies": {
"@types/node": "*",
"@types/tape": "*"
"@types/tape": ">=2.0.0 <5.0.0"
},
"devDependencies": {
"@types/blue-tape": "workspace:.",
Expand Down
2 changes: 1 addition & 1 deletion types/cwise-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"devDependencies": {
"@types/cwise-parser": "workspace:.",
"@types/tape": "*"
"@types/tape": "^4.0.0"
},
"owners": [
{
Expand Down
2 changes: 1 addition & 1 deletion types/cwise/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@types/browserify": "*",
"@types/cwise": "workspace:.",
"@types/node": "*",
"@types/tape": "*"
"@types/tape": "^4.0.0"
},
"owners": [
{
Expand Down
1 change: 1 addition & 0 deletions types/node/http2.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ declare module "node:http2" {
":method"?: string | undefined;
":authority"?: string | undefined;
":scheme"?: string | undefined;
":protocol"?: string | undefined;
}
// Http2Stream
interface StreamState {
Expand Down
1 change: 1 addition & 0 deletions types/node/v20/http2.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ declare module "http2" {
":method"?: string | undefined;
":authority"?: string | undefined;
":scheme"?: string | undefined;
":protocol"?: string | undefined;
}
// Http2Stream
export interface StreamPriorityOptions {
Expand Down
1 change: 1 addition & 0 deletions types/node/v22/http2.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ declare module "http2" {
":method"?: string | undefined;
":authority"?: string | undefined;
":scheme"?: string | undefined;
":protocol"?: string | undefined;
}
// Http2Stream
export interface StreamPriorityOptions {
Expand Down
1 change: 1 addition & 0 deletions types/node/v24/http2.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ declare module "http2" {
":method"?: string | undefined;
":authority"?: string | undefined;
":scheme"?: string | undefined;
":protocol"?: string | undefined;
}
// Http2Stream
export interface StreamState {
Expand Down
5 changes: 4 additions & 1 deletion types/nodemailer/lib/mailer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ declare namespace Mail {

type TextEncoding = "quoted-printable" | "base64";

/** Most reliable way to represent an email address with optional name. Nodemailer handles all the escaping and formatting automatically, forming `Name <email>` strings. */
interface Address {
name: string;
/** Name part of `Name <email>` address; if falsey, only the email address will be used */
name?: string | undefined;
/** Email part of `Name <email>` address; technically optional, but Nodemailer ignores address-less objects, so we require it to help prevent bugs. */
address: string;
}

Expand Down
14 changes: 14 additions & 0 deletions types/nodemailer/nodemailer-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,20 @@ function message_common_fields_array_test() {
};
}

function message_common_fields_optional_address_object_test() {
const message: Mail.Options = {
from: { address: "sender@server.com" },
to: [{ name: "Receiver", address: "receiver@sender.com" }, { address: "receiver2@sender.com" }],
cc: { name: "Carbon Copy", address: "cc@sender.com" },
bcc: { address: "bcc@sender.com" },
};

const missingAddress: Mail.Options = {
// @ts-expect-error - Nodemailer ignores address-less objects, so the type requires address.
to: { name: "Receiver" },
};
}

// More advanced fields

function message_more_advanced_fields_test() {
Expand Down
5 changes: 4 additions & 1 deletion types/nodemailer/v6/lib/mailer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ declare namespace Mail {

type TextEncoding = "quoted-printable" | "base64";

/** Most reliable way to represent an email address with optional name. Nodemailer handles all the escaping and formatting automatically, forming `Name <email>` strings. */
interface Address {
name: string;
/** Name part of `Name <email>` address; if falsey, only the email address will be used */
name?: string | undefined;
/** Email part of `Name <email>` address; technically optional, but Nodemailer ignores address-less objects, so we require it to help prevent bugs. */
address: string;
}

Expand Down
14 changes: 14 additions & 0 deletions types/nodemailer/v6/nodemailer-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,20 @@ function message_common_fields_test() {
};
}

function message_common_fields_optional_address_object_test() {
const message: Mail.Options = {
from: { address: "sender@server.com" },
to: [{ name: "Receiver", address: "receiver@sender.com" }, { address: "receiver2@sender.com" }],
cc: { name: "Carbon Copy", address: "cc@sender.com" },
bcc: { address: "bcc@sender.com" },
};

const missingAddress: Mail.Options = {
// @ts-expect-error - Nodemailer ignores address-less objects, so the type requires address.
to: { name: "Receiver" },
};
}

// More advanced fields

function message_more_advanced_fields_test() {
Expand Down
5 changes: 4 additions & 1 deletion types/nodemailer/v7/lib/mailer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ declare namespace Mail {

type TextEncoding = "quoted-printable" | "base64";

/** Most reliable way to represent an email address with optional name. Nodemailer handles all the escaping and formatting automatically, forming `Name <email>` strings. */
interface Address {
name: string;
/** Name part of `Name <email>` address; if falsey, only the email address will be used */
name?: string | undefined;
/** Email part of `Name <email>` address; technically optional, but Nodemailer ignores address-less objects, so we require it to help prevent bugs. */
address: string;
}

Expand Down
14 changes: 14 additions & 0 deletions types/nodemailer/v7/nodemailer-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,20 @@ function message_common_fields_array_test() {
};
}

function message_common_fields_optional_address_object_test() {
const message: Mail.Options = {
from: { address: "sender@server.com" },
to: [{ name: "Receiver", address: "receiver@sender.com" }, { address: "receiver2@sender.com" }],
cc: { name: "Carbon Copy", address: "cc@sender.com" },
bcc: { address: "bcc@sender.com" },
};

const missingAddress: Mail.Options = {
// @ts-expect-error - Nodemailer ignores address-less objects, so the type requires address.
to: { name: "Receiver" },
};
}

// More advanced fields

function message_more_advanced_fields_test() {
Expand Down
2 changes: 1 addition & 1 deletion types/tape-async/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"dependencies": {
"@types/node": "*",
"@types/tape": "*"
"@types/tape": "^4.5.0"
},
"devDependencies": {
"@types/tape-async": "workspace:."
Expand Down
2 changes: 1 addition & 1 deletion types/tape-catch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"https://github.com/michaelrhodes/tape-catch"
],
"dependencies": {
"@types/tape": "*"
"@types/tape": "~4.13.0"
},
"devDependencies": {
"@types/node": "*",
Expand Down
2 changes: 1 addition & 1 deletion types/tape-promise/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"https://github.com/jprichardson/tape-promise#readme"
],
"dependencies": {
"@types/tape": "*"
"@types/tape": "^4.2.2"
},
"devDependencies": {
"@types/tape-promise": "workspace:."
Expand Down
7 changes: 0 additions & 7 deletions types/tape/.eslintrc.json

This file was deleted.

5 changes: 0 additions & 5 deletions types/tape/.npmignore

This file was deleted.

Loading