Skip to content

Commit fda328d

Browse files
committed
chore: update isows
1 parent 70d3c79 commit fda328d

File tree

11 files changed

+159
-7
lines changed

11 files changed

+159
-7
lines changed

.changeset/swift-avocados-jog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"viem": patch
3+
---
4+
5+
Updated `isows`.

.github/workflows/verify.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
runs-on: ubuntu-latest
117117
strategy:
118118
matrix:
119-
type: ['bun', 'node-18', 'node-20', 'node-latest', 'next', 'sveltekit', 'vite']
119+
type: ['bun', 'node-18', 'node-20', 'node-latest', 'next', 'sveltekit', 'tsc', 'vite']
120120
include:
121121
- type: bun
122122
runtime: bun
@@ -132,7 +132,11 @@ jobs:
132132
- type: next
133133
runtime: next
134134
- type: sveltekit
135+
node-version: 18
135136
runtime: sveltekit
137+
- type: tsc
138+
node-version: 20
139+
runtime: tsc
136140
- type: vite
137141
runtime: vite
138142

@@ -145,7 +149,7 @@ jobs:
145149
uses: oven-sh/setup-bun@v1
146150

147151
- name: Set up Node
148-
if: ${{ matrix.runtime == 'node' }}
152+
if: ${{ matrix.node-version }}
149153
uses: actions/setup-node@v3
150154
with:
151155
node-version: ${{ matrix.node-version }}

biome.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"_types",
88
".next",
99
".svelte-kit",
10+
".vercel",
1011
"**/node_modules",
1112
"CHANGELOG.md",
1213
"cache",

bun.lockb

520 Bytes
Binary file not shown.

environments/sveltekit/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,15 @@
66
"dev": "vite dev",
77
"build": "vite build",
88
"preview": "vite preview",
9-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
10-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
119
"test": "playwright test"
1210
},
1311
"dependencies": {
14-
"viem": "latest"
12+
"viem": "file:../../src/"
1513
},
1614
"devDependencies": {
1715
"@playwright/test": "^1.38.1",
1816
"@sveltejs/adapter-vercel": "^3.0.3",
1917
"@sveltejs/kit": "^1.20.4",
20-
"isows": "^1.0.2",
2118
"svelte": "^4.0.5",
2219
"svelte-check": "^3.4.3",
2320
"tslib": "^2.4.1",

environments/tsc/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
node_modules

environments/tsc/index.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { http, createPublicClient, webSocket } from 'viem'
2+
import { mainnet } from 'viem/chains'
3+
;(async () => {
4+
const client = createPublicClient({
5+
chain: mainnet,
6+
transport: http(),
7+
})
8+
9+
const webSocketClient = createPublicClient({
10+
chain: mainnet,
11+
transport: webSocket(
12+
'wss://eth-mainnet.g.alchemy.com/v2/4iIl6mDHqX3GFrpzmfj2Soirf3MPoAcH',
13+
),
14+
})
15+
16+
await client.getBlockNumber()
17+
await webSocketClient.getBlockNumber()
18+
19+
process.exit(0)
20+
})()

environments/tsc/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "test-tsc",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"test": "tsc --module commonjs --verbatimModuleSyntax false && tsc --module es2015 && tsc --module es2020 && tsc --module esnext && tsc --module node16 --moduleResolution nodenext && tsc --module nodenext --moduleResolution nodenext"
7+
},
8+
"dependencies": {
9+
"viem": "file:../../src/",
10+
"typescript": "latest"
11+
}
12+
}

environments/tsc/tsconfig.json

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"include": ["index.ts"],
3+
"compilerOptions": {
4+
/* Visit https://aka.ms/tsconfig to read more about this file */
5+
6+
/* Projects */
7+
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
8+
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
9+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
10+
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
11+
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
12+
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
13+
14+
/* Language and Environment */
15+
"target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
16+
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
17+
// "jsx": "preserve", /* Specify what JSX code is generated. */
18+
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
19+
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
20+
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
21+
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
22+
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
23+
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
24+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
25+
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
26+
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
27+
28+
/* Modules */
29+
"module": "ESNext" /* Specify what module code is generated. */,
30+
// "rootDir": "./", /* Specify the root folder within your source files. */
31+
"moduleResolution": "Node" /* Specify how TypeScript looks up a file from a given module specifier. */,
32+
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
33+
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
34+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
35+
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
36+
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
37+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
38+
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
39+
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
40+
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
41+
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
42+
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
43+
// "resolveJsonModule": true, /* Enable importing .json files. */
44+
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
45+
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
46+
47+
/* JavaScript Support */
48+
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
49+
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
50+
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
51+
52+
/* Emit */
53+
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
54+
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
55+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
56+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
57+
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
58+
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
59+
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
60+
// "removeComments": true, /* Disable emitting comments. */
61+
// "noEmit": true, /* Disable emitting files from a compilation. */
62+
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
63+
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
64+
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
65+
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
66+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
67+
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
68+
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
69+
// "newLine": "crlf", /* Set the newline character for emitting files. */
70+
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
71+
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
72+
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
73+
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
74+
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
75+
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
76+
77+
/* Interop Constraints */
78+
"isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */,
79+
"verbatimModuleSyntax": true /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */,
80+
"allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
81+
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
82+
"preserveSymlinks": true /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */,
83+
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
84+
85+
/* Type Checking */
86+
"strict": true /* Enable all strict type-checking options. */,
87+
"noImplicitAny": true /* Enable error reporting for expressions and declarations with an implied 'any' type. */,
88+
"strictNullChecks": true /* When type checking, take into account 'null' and 'undefined'. */,
89+
"strictFunctionTypes": true /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */,
90+
"strictBindCallApply": true /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */,
91+
"strictPropertyInitialization": true /* Check for class properties that are declared but not set in the constructor. */,
92+
"noImplicitThis": true /* Enable error reporting when 'this' is given the type 'any'. */,
93+
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
94+
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
95+
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
96+
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
97+
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
98+
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
99+
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
100+
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
101+
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
102+
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
103+
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
104+
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
105+
106+
/* Completeness */
107+
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
108+
"skipLibCheck": true /* Skip type checking all .d.ts files. */
109+
}
110+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"test:env:next": "cd environments/next && bun run test",
3232
"test:env:node": "cd environments/node && bun run test",
3333
"test:env:sveltekit": "cd environments/sveltekit && bun run test",
34+
"test:env:tsc": "cd environments/tsc && bun run test",
3435
"test:env:vite": "cd environments/vite && bun run test",
3536
"test:typecheck": "SKIP_GLOBAL_SETUP=true vitest typecheck -c ./test/vitest.config.ts",
3637
"test:ui": "vitest dev -c ./test/vitest.config.ts --ui",

0 commit comments

Comments
 (0)