Skip to content

Commit

Permalink
npm update
Browse files Browse the repository at this point in the history
  • Loading branch information
ml054 committed Jul 17, 2024
1 parent 0c960f2 commit 2dc5f4b
Show file tree
Hide file tree
Showing 7 changed files with 367 additions and 290 deletions.
637 changes: 357 additions & 280 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@
"@typescript-eslint/parser": "^7.4.0",
"cross-os": "^1.5.0",
"eslint": "^8.57.0",
"eslint-plugin-unicorn": "^52.0.0",
"glob": "^10.3.12",
"eslint-plugin-unicorn": "^54.0.0",
"glob": "^11.0.0",
"http-proxy-agent": "^7.0.2",
"lodash.orderby": "^4.6.0",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"open": "^10.1.0",
"rimraf": "^5.0.5",
"rimraf": "^6.0.1",
"sinon": "^17.0.0",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Documents/Indexes/IndexDefinitionHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { StringUtil } from "../../Utility/StringUtil";
import * as XRegExp from "xregexp";
import { IndexSourceType } from "./IndexSourceType";

const COMMENT_REGEX = XRegExp("(?:/\\*(?:[^*]|(?:\\*+[^*/]))*\\*+/)|(?://.*)", "gm");
const COMMENT_REGEX = XRegExp(String.raw`(?:/\*(?:[^*]|(?:\*+[^*/]))*\*+/)|(?://.*)`, "gm");

export class IndexDefinitionHelper {
public static detectStaticIndexType(map: string, reduce: string): IndexType {
Expand Down
2 changes: 1 addition & 1 deletion src/Documents/Operations/Sorters/PutSortersOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class PutSortersCommand extends RavenCommand<void> implements IRaftCommand {
throwError("InvalidArgumentException", "SortersToAdd cannot be null");
}

if (sortersToAdd.findIndex(x => !x) > -1) {
if (sortersToAdd.some(x => !x) ) {
throwError("InvalidArgumentException", "Sorter cannot be null");
}

Expand Down
2 changes: 1 addition & 1 deletion src/Documents/Session/IncludesUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class IncludesUtil {
for (let i = 0; i < include.length; i++) {
const ch = include.charAt(i);
if (!(StringUtil.isLetter(ch) || StringUtil.isDigit(ch)) && ch !== "_" && ch !== ".") {
escapedIncludeSetter(include.replace(/'/g, "\\'"));
escapedIncludeSetter(include.replace(/'/g, String.raw`\'`));
return true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Utility/ObjectUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ export class ObjectUtil {
* @param o Object to clone
*/
public static clone(o) {
return JSON.parse(JSON.stringify(o));
return structuredClone(o);
}

public static deepJsonClone(o) {
return JSON.parse(JSON.stringify(o));
return structuredClone(o);
}

public static deepLiteralClone(item) {
Expand Down
4 changes: 2 additions & 2 deletions src/Utility/StringUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { CasingConvention } from "./ObjectUtil";
import { StringBuilder } from "./StringBuilder";

export class StringUtil {
private static readonly letterRe: RegExp = XRegExp("^\\p{L}$") as RegExp;
private static readonly letterRe: RegExp = XRegExp(String.raw`^\p{L}$`) as RegExp;
private static readonly digitRe: RegExp = /\d/;

public static leftPad(s: string, length: number, char: string) {
Expand Down Expand Up @@ -149,7 +149,7 @@ export class StringUtil {
private static _escapeStringInternal(builder: StringBuilder, value: string) {
let escaped = JSON.stringify(value);

escaped = escaped.replace(/'/g, "\\'");
escaped = escaped.replace(/'/g, String.raw`\'`);

builder.append(escaped.substring(1, escaped.length - 1));
}
Expand Down

0 comments on commit 2dc5f4b

Please sign in to comment.