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

npm update #438

Merged
merged 1 commit into from
Jul 17, 2024
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
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
2 changes: 2 additions & 0 deletions src/Utility/ObjectUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ export class ObjectUtil {
* @param o Object to clone
*/
public static clone(o) {
// eslint-disable-next-line unicorn/prefer-structured-clone
return JSON.parse(JSON.stringify(o));
}

public static deepJsonClone(o) {
// eslint-disable-next-line unicorn/prefer-structured-clone
return JSON.parse(JSON.stringify(o));
}

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
Loading