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
3 changes: 2 additions & 1 deletion types/mparticle__web-sdk/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ export interface SDKEventCustomFlags {
}

export interface SDKEventOptions {
shouldUploadEvent: boolean;
shouldUploadEvent?: boolean;
sourceMessageId?: string;
}

export interface DataPlanConfig {
Expand Down
2 changes: 1 addition & 1 deletion types/mparticle__web-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@types/mparticle__web-sdk",
"version": "2.54.9999",
"version": "2.58.9999",
"projects": [
"https://github.com/mParticle/mparticle-web-sdk"
],
Expand Down
14 changes: 14 additions & 0 deletions types/mparticle__web-sdk/test/mparticle__web-sdk-instance-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,19 @@ const customFlags: mParticle.SDKEventCustomFlags = {

const eventOptions: mParticle.SDKEventOptions = {
shouldUploadEvent: false,
sourceMessageId: "sourceMessageId",
};

const eventOptionsOnlyShouldUpload: mParticle.SDKEventOptions = {
shouldUploadEvent: true,
};

const eventOptionsOnlySourceMessageId: mParticle.SDKEventOptions = {
sourceMessageId: "test-message-id",
};

const eventOptionsEmpty: mParticle.SDKEventOptions = {};

const identifyRequest: mParticle.IdentifyRequest = {
userIdentities: {
customerid: "test",
Expand Down Expand Up @@ -178,6 +189,9 @@ instance.logEvent("eventName", instance.EventType.Location);
instance.logEvent("eventName", instance.EventType.Location, customAttrs);
instance.logEvent("eventName", instance.EventType.Location, customAttrs, customFlags);
instance.logEvent("eventName", mParticle.EventType.Location, customAttrs, customFlags, eventOptions);
instance.logEvent("eventName", mParticle.EventType.Location, customAttrs, customFlags, eventOptionsOnlyShouldUpload);
instance.logEvent("eventName", mParticle.EventType.Location, customAttrs, customFlags, eventOptionsOnlySourceMessageId);
instance.logEvent("eventName", mParticle.EventType.Location, customAttrs, customFlags, eventOptionsEmpty);

instance.logForm("click", "eventName");
instance.logForm("click", "eventName", instance.EventType.Location);
Expand Down
20 changes: 20 additions & 0 deletions types/mparticle__web-sdk/test/mparticle__web-sdk-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,19 @@ const customFlags: mParticle.SDKEventCustomFlags = {

const eventOptions: mParticle.SDKEventOptions = {
shouldUploadEvent: false,
sourceMessageId: "sourceMessageId",
};

const eventOptionsOnlyShouldUpload: mParticle.SDKEventOptions = {
shouldUploadEvent: true,
};

const eventOptionsOnlySourceMessageId: mParticle.SDKEventOptions = {
sourceMessageId: "test-message-id",
};

const eventOptionsEmpty: mParticle.SDKEventOptions = {};

const identifyRequest: mParticle.IdentifyRequest = {
userIdentities: {
customerid: "test",
Expand Down Expand Up @@ -200,6 +211,15 @@ mParticle.logEvent("eventName", mParticle.EventType.Location);
mParticle.logEvent("eventName", mParticle.EventType.Location, customAttrs);
mParticle.logEvent("eventName", mParticle.EventType.Location, customAttrs, customFlags);
mParticle.logEvent("eventName", mParticle.EventType.Location, customAttrs, customFlags, eventOptions);
mParticle.logEvent("eventName", mParticle.EventType.Location, customAttrs, customFlags, eventOptionsOnlyShouldUpload);
mParticle.logEvent(
"eventName",
mParticle.EventType.Location,
customAttrs,
customFlags,
eventOptionsOnlySourceMessageId,
);
mParticle.logEvent("eventName", mParticle.EventType.Location, customAttrs, customFlags, eventOptionsEmpty);

mParticle.logForm("click", "eventName");
mParticle.logForm("click", "eventName", mParticle.EventType.Location);
Expand Down
6 changes: 6 additions & 0 deletions types/multer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ declare namespace multer {
} | undefined;
/** Preserve the full path of the original filename rather than the basename. (Default: false) */
preservePath?: boolean | undefined;
/**
* For multipart forms, the default character set to use for values of
* part header parameters (e.g. filename) that are not extended
* parameters (that contain an explicit charset). (Default: latin1)
*/
defParamCharset?: string | undefined;
/**
* Optional function to control which files are uploaded. This is called
* for every file that is processed.
Expand Down
13 changes: 13 additions & 0 deletions types/multer/multer-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ const upload = multer({
upload; // $ExpectType Multer
assert.strictEqual(upload.constructor.name, "Multer");

const upload_with_defParamCharset = multer({
dest: "uploads/",
fileFilter: (req, file, cb) => {
cb(null, false);
cb(null, true);
cb(new Error(`I don't have a clue!`));
},
defParamCharset: "utf8",
});

upload_with_defParamCharset; // $ExpectType Multer
assert.strictEqual(upload_with_defParamCharset.constructor.name, "Multer");

const app = express();

app.post(
Expand Down
2 changes: 1 addition & 1 deletion types/multer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@types/multer",
"version": "2.0.9999",
"version": "2.1.9999",
"projects": [
"https://github.com/expressjs/multer"
],
Expand Down
4 changes: 2 additions & 2 deletions types/office-js-preview/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104378,12 +104378,12 @@ declare namespace Word {
/** Sets multiple properties on the object at the same time, based on an existing loaded object. */
set(properties: Word.CommentContentRange): void;
/**
* Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI.
* Inserts text at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI.
*
* @remarks
* [Api set: WordApi 1.4]
*
* @param text The text to be inserted in to the `CommentContentRange`.
* @param text The text to be inserted into the `CommentContentRange` object.
* @param insertLocation The value must be `replace`, `start`, `end`, `before`, or `after`.
*/
insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.CommentContentRange;
Expand Down
4 changes: 2 additions & 2 deletions types/office-js/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97983,12 +97983,12 @@ declare namespace Word {
/** Sets multiple properties on the object at the same time, based on an existing loaded object. */
set(properties: Word.CommentContentRange): void;
/**
* Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI.
* Inserts text at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI.
*
* @remarks
* [Api set: WordApi 1.4]
*
* @param text The text to be inserted in to the `CommentContentRange`.
* @param text The text to be inserted into the `CommentContentRange` object.
* @param insertLocation The value must be `replace`, `start`, `end`, `before`, or `after`.
*/
insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.CommentContentRange;
Expand Down
2 changes: 1 addition & 1 deletion types/sanitize-html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"https://github.com/punkave/sanitize-html"
],
"dependencies": {
"htmlparser2": "^8.0.0"
"htmlparser2": "^10.1"
},
"devDependencies": {
"@types/sanitize-html": "workspace:."
Expand Down