Skip to content

Commit

Permalink
chore: upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry committed Nov 29, 2024
1 parent af31e81 commit 9362ccd
Show file tree
Hide file tree
Showing 8 changed files with 1,578 additions and 1,064 deletions.
24 changes: 0 additions & 24 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Build esm
run: yarn build:esm
- name: Install puppeteer and static
run: yarn add puppeteer@9.1.1 [email protected]
run: yarn add puppeteer@23.9.0 [email protected]
- name: Launch static
run: yarn static &
- name: Browser Test
Expand Down
45 changes: 45 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
), {
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
parser: tsParser,
},

rules: {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-require-imports": "off",

"sort-imports": ["error", {
ignoreDeclarationSort: true,
ignoreMemberSort: true,
memberSyntaxSortOrder: ["none", "all", "single", "multiple"],
}],

"comma-dangle": ["error", "always-multiline"],
},
}];
27 changes: 13 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,24 @@
"types": "dist/index.d.ts",
"private": false,
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@magic-works/ttypescript-browser-like-import-transformer": "^3.0.0",
"@types/crypto-js": "3.1.43",
"@types/jsbn": "1.2.29",
"@types/node": "^15.0.3",
"@typescript-eslint/eslint-plugin": "^4.23.0",
"@typescript-eslint/parser": "^4.23.0",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@magic-works/ttypescript-browser-like-import-transformer": "^4.0.0",
"@types/crypto-js": "4.2.2",
"@types/jsbn": "1.2.33",
"@types/node": "^20.8.4",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"@zoltu/typescript-transformer-append-js-extension": "^1.0.1",
"eslint": "^7.26.0",
"nyc": "^15.1.0",
"eslint": "^9.15.0",
"nyc": "^17.1.0",
"prettier": "^2.3.0",
"source-map-support": "^0.5.19",
"tap-diff": "^0.1.1",
"tap-junit": "^4.2.0",
"tape": "^5.2.2",
"tape": "^5.9.0",
"tape-promise": "^4.0.0",
"ts-node": "^9.1.1",
"ttypescript": "^1.5.12",
"typescript": "^4.2.4"
"ts-node": "^10.9.2",
"ttypescript": "^1.5.15",
"typescript": "^4.9.5"
},
"scripts": {
"build": "yarn tsc --build tsconfig.json",
Expand Down
3 changes: 1 addition & 2 deletions src/cross-env-crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export let crossEnvCrypto: CompatibleCrypto;
try {
const webcrypto =
(typeof window !== "undefined" && window.crypto) ||
// eslint-disable-next-line @typescript-eslint/no-var-requires
require("crypto").webcrypto; // Node v15+ has webcrypto built in, lets use that if we can

if (webcrypto) {
Expand All @@ -33,7 +32,7 @@ try {
};
} else {
// otherwise lets use node's crypto
// eslint-disable-next-line @typescript-eslint/no-var-requires

const nodeCrypto = require("crypto");
const nodeCreateHashToHashFunction =
(algorithm: AlgorithmIdentifier) => (data: ArrayBuffer) =>
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"noImplicitThis": true,
"strict": true,
"noImplicitAny": false,
"typeRoots": ["node_modules/@types", "types"],
"typeRoots": ["node_modules/@types"],
"plugins": [{
"transform": "@magic-works/ttypescript-browser-like-import-transformer",
"after": true
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"noImplicitThis": true,
"strict": true,
"noImplicitAny": false,
"typeRoots": ["node_modules/@types", "types"]
"typeRoots": ["node_modules/@types"]
},
"include": ["src/**/*"]
}
Expand Down
Loading

0 comments on commit 9362ccd

Please sign in to comment.