Skip to content

Commit

Permalink
Upgrade dependencies (#323)
Browse files Browse the repository at this point in the history
* Upgrade dependencies

* cjs

* add exports to package.json

* peer dep bump
  • Loading branch information
macalinao authored Jun 10, 2022
1 parent 59126af commit ddab4c3
Show file tree
Hide file tree
Showing 14 changed files with 1,421 additions and 1,207 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// @ts-check

"use strict";

require("@rushstack/eslint-patch/modern-module-resolution");

/** @type import('eslint').Linter.Config */
module.exports = {
extends: ["@saberhq"],
parserOptions: {
Expand Down
File renamed without changes.
785 changes: 0 additions & 785 deletions .yarn/releases/yarn-3.2.0.cjs

This file was deleted.

786 changes: 786 additions & 0 deletions .yarn/releases/yarn-3.2.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "8.13.0-sdk",
"version": "8.17.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
}
35 changes: 25 additions & 10 deletions .yarn/sdks/typescript/lib/tsserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ const moduleWrapper = tsserver => {
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// Update 2021-10-08: VSCode changed their format in 1.61.
// 2021-10-08: VSCode changed the format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
// Update 2022-04-06: VSCode changed the format in 1.66.
// 2022-04-06: VSCode changed the format in 1.66.
// Before | ^/zip//c:/foo/bar.zip/package.json
// After | ^/zip/c:/foo/bar.zip/package.json
//
// 2022-05-06: VSCode changed the format in 1.68
// Before | ^/zip/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;
Expand All @@ -77,10 +81,14 @@ const moduleWrapper = tsserver => {
str = `^/zip/${str}`;
} break;

case `vscode`: {
case `vscode <1.68`: {
str = `^/zip${str}`;
} break;

case `vscode`: {
str = `^/zip/${str}`;
} break;

// To make "go to definition" work,
// We have to resolve the actual file system path from virtual path
// and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
Expand Down Expand Up @@ -127,9 +135,7 @@ const moduleWrapper = tsserver => {

case `vscode`:
default: {
return process.platform === `win32`
? str.replace(/^\^?(zip:|\/zip)\/+/, ``)
: str.replace(/^\^?(zip:|\/zip)\/+/, `/`);
return str.replace(/^\^?(zip:|\/zip(\/ts-nul-authority)?)\/+/, process.platform === `win32` ? `` : `/`)
} break;
}
}
Expand Down Expand Up @@ -169,10 +175,19 @@ const moduleWrapper = tsserver => {
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
if (/(\/|-)1\.([1-5][0-9]|60)\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.61`;
} else if (/(\/|-)1\.(6[1-5])\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.66`;
const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(
// The RegExp from https://semver.org/ but without the caret at the start
/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
) ?? []).map(Number)

if (major === 1) {
if (minor < 61) {
hostInfo += ` <1.61`;
} else if (minor < 66) {
hostInfo += ` <1.66`;
} else if (minor < 68) {
hostInfo += ` <1.68`;
}
}
}
}
Expand Down
35 changes: 25 additions & 10 deletions .yarn/sdks/typescript/lib/tsserverlibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ const moduleWrapper = tsserver => {
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// Update 2021-10-08: VSCode changed their format in 1.61.
// 2021-10-08: VSCode changed the format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
// Update 2022-04-06: VSCode changed the format in 1.66.
// 2022-04-06: VSCode changed the format in 1.66.
// Before | ^/zip//c:/foo/bar.zip/package.json
// After | ^/zip/c:/foo/bar.zip/package.json
//
// 2022-05-06: VSCode changed the format in 1.68
// Before | ^/zip/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;
Expand All @@ -77,10 +81,14 @@ const moduleWrapper = tsserver => {
str = `^/zip/${str}`;
} break;

case `vscode`: {
case `vscode <1.68`: {
str = `^/zip${str}`;
} break;

case `vscode`: {
str = `^/zip/${str}`;
} break;

// To make "go to definition" work,
// We have to resolve the actual file system path from virtual path
// and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
Expand Down Expand Up @@ -127,9 +135,7 @@ const moduleWrapper = tsserver => {

case `vscode`:
default: {
return process.platform === `win32`
? str.replace(/^\^?(zip:|\/zip)\/+/, ``)
: str.replace(/^\^?(zip:|\/zip)\/+/, `/`);
return str.replace(/^\^?(zip:|\/zip(\/ts-nul-authority)?)\/+/, process.platform === `win32` ? `` : `/`)
} break;
}
}
Expand Down Expand Up @@ -169,10 +175,19 @@ const moduleWrapper = tsserver => {
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
if (/(\/|-)1\.([1-5][0-9]|60)\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.61`;
} else if (/(\/|-)1\.(6[1-5])\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.66`;
const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(
// The RegExp from https://semver.org/ but without the caret at the start
/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
) ?? []).map(Number)

if (major === 1) {
if (minor < 61) {
hostInfo += ` <1.61`;
} else if (minor < 66) {
hostInfo += ` <1.66`;
} else if (minor < 68) {
hostInfo += ` <1.68`;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript",
"version": "4.6.3-sdk",
"version": "4.7.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.2.0.cjs
yarnPath: .yarn/releases/yarn-3.2.1.cjs
53 changes: 30 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"name": "@saberhq/merkle-distributor",
"version": "0.3.3",
"description": "TypeScript SDK for a Solana program for distributing tokens according to a Merkle root.",
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
}
},
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"keywords": [
Expand All @@ -27,29 +33,30 @@
"devDependencies": {
"@project-serum/anchor": "^0.24.2",
"@rushstack/eslint-patch": "^1.1.3",
"@saberhq/anchor-contrib": "^1.12.62",
"@saberhq/chai-solana": "^1.12.62",
"@saberhq/eslint-config": "^1.12.62",
"@saberhq/solana-contrib": "^1.12.62",
"@saberhq/token-utils": "^1.12.62",
"@saberhq/tsconfig": "^1.12.62",
"@solana/web3.js": "^1.39.1",
"@saberhq/anchor-contrib": "^1.13.28",
"@saberhq/chai-solana": "^1.13.28",
"@saberhq/eslint-config": "^1.13.28",
"@saberhq/solana-contrib": "^1.13.28",
"@saberhq/token-utils": "^1.13.28",
"@saberhq/tsconfig": "^1.13.28",
"@solana/web3.js": "^1.44.0",
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.1",
"@types/mocha": "^9.1.0",
"@types/node": "^17.0.25",
"bn.js": "^5.2.0",
"@types/eslint": "^8.4.3",
"@types/mocha": "^9.1.1",
"@types/node": "^17.0.41",
"bn.js": "^5.2.1",
"chai": "^4.3.4",
"eslint": "^8.13.0",
"eslint": "^8.17.0",
"eslint-import-resolver-node": "^0.3.6",
"eslint-plugin-import": "^2.26.0",
"husky": "^7.0.4",
"husky": "^8.0.1",
"jsbi": "^4.3.0",
"lint-staged": "^12.3.8",
"mocha": "^9.2.2",
"lint-staged": "^13.0.1",
"mocha": "^10.0.0",
"prettier": "^2.6.2",
"ts-node": "^10.7.0",
"typescript": "^4.6.3"
"ts-node": "^10.8.1",
"typescript": "^4.7.3"
},
"lint-staged": {
"*.{ts,tsx}": "eslint --cache --fix",
Expand All @@ -67,23 +74,23 @@
},
"dependencies": {
"js-sha3": "^0.8.0",
"superstruct": "^0.15.4",
"superstruct": "^0.16.0",
"tiny-invariant": "^1.2.0",
"tslib": "^2.3.1"
"tslib": "^2.4.0"
},
"peerDependencies": {
"@project-serum/anchor": ">=0.22",
"@saberhq/anchor-contrib": "^1.12",
"@saberhq/solana-contrib": "^1.12",
"@saberhq/token-utils": "^1.12",
"@solana/web3.js": "^1.37",
"@saberhq/anchor-contrib": "^1.13",
"@saberhq/solana-contrib": "^1.13",
"@saberhq/token-utils": "^1.13",
"@solana/web3.js": "^1.44",
"bn.js": "^5.2.0",
"jsbi": "*"
},
"resolutions": {
"chai": "=4.3.4"
},
"packageManager": "yarn@3.2.0",
"packageManager": "yarn@3.2.1",
"files": [
"dist/",
"src/"
Expand Down
4 changes: 1 addition & 3 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"extends": "./tsconfig.json",
"extends": "@saberhq/tsconfig/tsconfig.module.json",
"compilerOptions": {
"module": "ESNext",
"noEmit": false,
"outDir": "dist/esm/"
},
"include": ["src/"]
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "./tsconfig.build.json",
"extends": "@saberhq/tsconfig/tsconfig.cjs.json",
"compilerOptions": {
"module": "CommonJS",
"outDir": "dist/cjs/"
},
"include": ["src/"]
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"extends": "@saberhq/tsconfig/tsconfig.lib.json",
"compilerOptions": {
"module": "CommonJS",
"noEmit": true,
"types": ["mocha"],
"resolveJsonModule": true
},
"include": ["./src", "./tests", "scripts/"]
"include": ["./src", "./tests", "scripts/", ".eslintrc.cjs", ".mocharc.cjs"]
}
Loading

0 comments on commit ddab4c3

Please sign in to comment.