Skip to content

Commit

Permalink
drop require node: prefix; drop import type syntax; publish
Browse files Browse the repository at this point in the history
  • Loading branch information
dmosites committed Dec 16, 2024
1 parent 41c9253 commit 435a99a
Show file tree
Hide file tree
Showing 25 changed files with 62 additions and 47 deletions.
4 changes: 2 additions & 2 deletions source/batch-call/scripts/deploy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
const fs = require('node:fs')
const fs = require('fs')
const prettier = require('prettier')
const { ethers, run } = require('hardhat')
const { ChainIds, chainLabels, getReceiptUrl } = require('@airswap/utils')
Expand Down Expand Up @@ -58,7 +58,7 @@ async function main() {
)
)

batchCallCommits[chainId] = require('node:child_process')
batchCallCommits[chainId] = require('child_process')
.execSync('git rev-parse HEAD')
.toString()
.trim()
Expand Down
4 changes: 2 additions & 2 deletions source/delegate/scripts/deploy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
const fs = require('node:fs')
const fs = require('fs')
const prettier = require('prettier')

const { ethers, run } = require('hardhat')
Expand Down Expand Up @@ -53,7 +53,7 @@ async function main() {
{ ...prettierConfig, parser: 'babel' }
)
)
delegateCommits[chainId] = require('node:child_process')
delegateCommits[chainId] = require('child_process')
.execSync('git rev-parse HEAD')
.toString()
.trim()
Expand Down
4 changes: 2 additions & 2 deletions source/pool/scripts/deploy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
const fs = require('node:fs')
const fs = require('fs')
const prettier = require('prettier')
const { ethers, run } = require('hardhat')
const { chainLabels, ChainIds, getReceiptUrl } = require('@airswap/utils')
Expand Down Expand Up @@ -53,7 +53,7 @@ async function main() {
{ ...prettierConfig, parser: 'babel' }
)
)
poolCommits[chainId] = require('node:child_process')
poolCommits[chainId] = require('child_process')
.execSync('git rev-parse HEAD')
.toString()
.trim()
Expand Down
4 changes: 2 additions & 2 deletions source/registry/scripts/deploy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
const fs = require('node:fs')
const fs = require('fs')
const prettier = require('prettier')
const { ethers, run } = require('hardhat')
const { ChainIds, chainLabels, getReceiptUrl } = require('@airswap/utils')
Expand Down Expand Up @@ -66,7 +66,7 @@ async function main() {
{ ...prettierConfig, parser: 'babel' }
)
)
registryCommits[chainId] = require('node:child_process')
registryCommits[chainId] = require('child_process')
.execSync('git rev-parse HEAD')
.toString()
.trim()
Expand Down
4 changes: 2 additions & 2 deletions source/staking/scripts/deploy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
const fs = require('node:fs')
const fs = require('fs')
const prettier = require('prettier')
const { ethers, run } = require('hardhat')
const { chainLabels, ChainIds, getReceiptUrl } = require('@airswap/utils')
Expand Down Expand Up @@ -68,7 +68,7 @@ async function main() {
{ ...prettierConfig, parser: 'babel' }
)
)
stakingCommits[chainId] = require('node:child_process')
stakingCommits[chainId] = require('child_process')
.execSync('git rev-parse HEAD')
.toString()
.trim()
Expand Down
4 changes: 2 additions & 2 deletions source/swap-erc20/scripts/deploy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
const fs = require('node:fs')
const fs = require('fs')
const prettier = require('prettier')
const { ethers, run } = require('hardhat')
const poolDeploys = require('@airswap/pool/deploys.js')
Expand Down Expand Up @@ -81,7 +81,7 @@ async function main() {
{ ...prettierConfig, parser: 'babel' }
)
)
swapERC20Commits[chainId] = require('node:child_process')
swapERC20Commits[chainId] = require('child_process')
.execSync('git rev-parse HEAD')
.toString()
.trim()
Expand Down
4 changes: 2 additions & 2 deletions source/swap/scripts/deploy-adapters.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
const fs = require('node:fs')
const fs = require('fs')
const prettier = require('prettier')
const { ethers, run } = require('hardhat')
const { chainLabels, ChainIds, getReceiptUrl } = require('@airswap/utils')
Expand Down Expand Up @@ -55,7 +55,7 @@ async function main() {
{ ...prettierConfig, parser: 'babel' }
)
)
adapterCommits[chainId] = require('node:child_process')
adapterCommits[chainId] = require('child_process')
.execSync('git rev-parse HEAD')
.toString()
.trim()
Expand Down
4 changes: 2 additions & 2 deletions source/swap/scripts/deploy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
const fs = require('node:fs')
const fs = require('fs')
const prettier = require('prettier')
const { ethers, run } = require('hardhat')
const {
Expand Down Expand Up @@ -79,7 +79,7 @@ async function main() {
{ ...prettierConfig, parser: 'babel' }
)
)
swapCommits[chainId] = require('node:child_process')
swapCommits[chainId] = require('child_process')
.execSync('git rev-parse HEAD')
.toString()
.trim()
Expand Down
4 changes: 2 additions & 2 deletions source/wrapper/scripts/deploy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
const fs = require('node:fs')
const fs = require('fs')
const prettier = require('prettier')
const { ethers, run } = require('hardhat')
const { chainLabels, ChainIds, getReceiptUrl } = require('@airswap/utils')
Expand Down Expand Up @@ -68,7 +68,7 @@ async function main() {
{ ...prettierConfig, parser: 'babel' }
)
)
wrapperCommits[chainId] = require('node:child_process')
wrapperCommits[chainId] = require('child_process')
.execSync('git rev-parse HEAD')
.toString()
.trim()
Expand Down
2 changes: 1 addition & 1 deletion tools/libraries/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airswap/libraries",
"version": "5.0.7",
"version": "5.0.8",
"description": "AirSwap: Libraries for Developers",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion tools/libraries/src/Registry.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import registryBlocks from '@airswap/registry/deploys-blocks.js'
import registryDeploys from '@airswap/registry/deploys.js'
import { Registry__factory } from '@airswap/registry/typechain/factories/contracts'
import type { ethers } from 'ethers'
import { ethers } from 'ethers'

import { Contract, SwapERC20 } from './Contracts'
import { Server } from './Server'
Expand Down
2 changes: 1 addition & 1 deletion tools/libraries/src/RegistryV3.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ethers } from 'ethers'
import { ethers } from 'ethers'
import { Registry__factory } from 'registry-v3/typechain/factories/contracts'

import { Contract, SwapERC20 } from './Contracts'
Expand Down
22 changes: 11 additions & 11 deletions tools/libraries/src/Server.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as url from 'node:url'
import { isBrowser } from 'browser-or-node'
import type { ethers } from 'ethers'
import type { Client as HttpClient } from 'jayson'
import { ethers } from 'ethers'
import { Client as HttpClient } from 'jayson'
import { TypedEmitter } from 'tiny-typed-emitter'

import {
type JsonRpcError,
JsonRpcError,
JsonRpcErrorCodes,
JsonRpcWebsocket,
WebsocketReadyStates,
Expand All @@ -14,16 +14,16 @@ import {
import {
ChainIds,
Direction,
type FullOrder,
type FullOrderERC20,
FullOrder,
FullOrderERC20,
Indexes,
type OrderERC20,
type OrderFilter,
type OrderResponse,
type Pricing,
OrderERC20,
OrderFilter,
OrderResponse,
Pricing,
ProtocolIds,
type ServerOptions,
type SupportedProtocolInfo,
ServerOptions,
SupportedProtocolInfo,
isValidOrderERC20,
isValidPricingERC20,
orderERC20PropsToStrings,
Expand Down
4 changes: 2 additions & 2 deletions tools/libraries/test/Server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import sinonChai from 'sinon-chai'
import {
ADDRESS_ZERO,
ChainIds,
type Levels,
type OrderERC20,
Levels,
OrderERC20,
ProtocolIds,
createOrder,
createOrderERC20,
Expand Down
4 changes: 2 additions & 2 deletions tools/libraries/test/test-utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { EventEmitter } from 'node:events'
import type {
import { EventEmitter } from 'node:events'
import {
JsonRpcRequest,
JsonRpcResponse,
} from '@airswap/jsonrpc-client-websocket'
Expand Down
2 changes: 1 addition & 1 deletion tools/stores/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airswap/stores",
"version": "5.0.2",
"version": "5.0.3",
"description": "AirSwap: Storage for Indexing",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions tools/stores/redis/redis.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
Direction,
type FullOrder,
FullOrder,
Indexes,
type OrderFilter,
OrderFilter,
THIRTY_DAYS,
} from '@airswap/utils'
import { SchemaFieldTypes, createClient } from 'redis'
Expand Down
2 changes: 1 addition & 1 deletion tools/stores/test/redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Redis, createIndex } from '../redis/redis'

import {
ADDRESS_ZERO,
type FullOrder,
FullOrder,
createOrder,
createOrderSignature,
} from '@airswap/utils'
Expand Down
2 changes: 1 addition & 1 deletion tools/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airswap/utils",
"version": "5.0.3",
"version": "5.0.4",
"description": "AirSwap: Utilities for Developers",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion tools/utils/src/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from './constants'
import TOKEN_DEFAULTS from './tokendefaults'
import TOKEN_LISTS from './tokenlists'
import type {
import {
CollectionTokenAttribute,
CollectionTokenInfo,
CollectionTokenMetadata,
Expand Down
2 changes: 1 addition & 1 deletion tools/utils/src/swap-erc20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
SECONDS_IN_DAY,
} from './constants'

import type { Signature, Settlement, Transfer } from './types'
import { Signature, Settlement, Transfer } from './types'

export const EIP712SwapERC20 = {
EIP712Domain: [
Expand Down
2 changes: 1 addition & 1 deletion tools/utils/src/swap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
SECONDS_IN_DAY,
} from './constants'

import type { Settlement, Signature } from './types'
import { Settlement, Signature } from './types'

export const EIP712Swap = {
EIP712Domain: [
Expand Down
2 changes: 1 addition & 1 deletion tools/utils/src/tokendefaults.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChainIds } from './constants'
import type { TokenInfo } from './types'
import { TokenInfo } from './types'
const TEST_TOKEN_DECIMALS = 6

export default [
Expand Down
2 changes: 1 addition & 1 deletion tools/utils/test/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assert, expect } from 'chai'
import { ethers } from 'ethers'
import type { FullOrderERC20, Levels, UnsignedOrderERC20 } from '../index'
import { FullOrderERC20, Levels, UnsignedOrderERC20 } from '../index'

import {
ADDRESS_ZERO,
Expand Down
17 changes: 16 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,22 @@ __metadata:
languageName: unknown
linkType: soft

"@airswap/utils@npm:5.0.3, @airswap/utils@workspace:tools/utils":
"@airswap/utils@npm:5.0.3":
version: 5.0.3
resolution: "@airswap/utils@npm:5.0.3"
dependencies:
"@metamask/eth-sig-util": "npm:^5.0.2"
"@uniswap/token-lists": "npm:^1.0.0-beta.24"
bignumber.js: "npm:^9.0.1"
ethereumjs-util: "npm:^7.1.5"
ethers: "npm:^5.7.2"
lz-string: "npm:^1.5.0"
valid-url: "npm:^1.0.9"
checksum: 10c0/2bbe84a5efa32ba98dd34a54246c980a8ec0155b5fbf36e511fc1123302e19175f7a4bf0f2642fb9dee9d3c8c7c3bba98fac5f4394ef3f700a5edc9c91b3223d
languageName: node
linkType: hard

"@airswap/utils@workspace:tools/utils":
version: 0.0.0-use.local
resolution: "@airswap/utils@workspace:tools/utils"
dependencies:
Expand Down

0 comments on commit 435a99a

Please sign in to comment.