Skip to content
Myr

refactor: fix typos (#3583)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by mattn · committed by GitHub · parent 3af317f · Browse files · 9 files+16 added−16 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

9 files+16 added−16 removed

  • tests:+8 added−8 removed
  • other:+8 added−8 removed

9 files+16 added−16 removed

modified:runtime-tests/deno/stream.test.ts+4 added-4 removed
modified:src/helper/cookie/index.test.ts+1 added-1 removed
104 unmodified lines
105 const res = await app.request(req)106 expect(res.headers.get('Fortune-Cookie')).toBe('lots-of-money')107 })108109 it('Get signed cookie witn invalid signature', async () => {109 it('Get signed cookie with invalid signature', async () => {110 const req = new Request('http://localhost/cookie-signed-get-one')111 // fortune_cookie has invalid signature112 const cookieString =113 'fortune_cookie=lots-of-money.LAa7RX43t2vCrLNcKmNG65H41OkyV02sraRPuY5RuVg=; fruit_cookie=mango.lRwgtW9ooM9%2Fd9ZZA%2FInNRG64CbQsfWGXQyFLPM9520%3D'
321 unmodified lines
modified:src/helper/ssg/ssg.ts+2 added-2 removed
379 unmodified lines
380 const errorObj = error instanceof Error ? error : new Error(String(error))381 result = { success: false, files: [], error: errorObj }382 }383 if (options?.afterGenerateHook) {384 const conbinedAfterGenerateHooks = combineAfterGenerateHooks(options?.afterGenerateHook)385 await conbinedAfterGenerateHooks(result)384 const combinedAfterGenerateHooks = combineAfterGenerateHooks(options?.afterGenerateHook)385 await combinedAfterGenerateHooks(result)386 }387 return result388}
modified:src/helper/ssg/utils.ts+2 added-2 removed
modified:src/jsx/index.test.tsx+1 added-1 removed
157 unmodified lines
158 )159 expect(template.toString()).toBe('<p><span>a</span><span>b</span></p>')160 })161162 it('Empty elements are rended withtout closing tag', () => {162 it('Empty elements are rended without closing tag', () => {163 const template = <input />164 expect(template.toString()).toBe('<input/>')165 })166
899 unmodified lines
modified:src/middleware/ip-restriction/index.ts+3 added-3 removed
46 unmodified lines
47 } else if (typeof rule === 'function') {48 functionRules.push(rule)49 } else {50 if (IS_CIDR_NOTATION_REGEX.test(rule)) {51 const splittedRule = rule.split('/')51 const separatedRule = rule.split('/')5253 const addrStr = splittedRule[0]53 const addrStr = separatedRule[0]54 const type = distinctRemoteAddr(addrStr)55 if (type === undefined) {56 throw new TypeError(`Invalid rule: ${rule}`)57 }5859 const isIPv4 = type === 'IPv4'60 const prefix = parseInt(splittedRule[1])60 const prefix = parseInt(separatedRule[1])6162 if (isIPv4 ? prefix === 32 : prefix === 128) {63 // this rule is a static rule64 rule = addrStr
114 unmodified lines
modified:src/router/trie-router/node.test.ts+1 added-1 removed
26 unmodified lines
27 expect(node.search('get', '/hello')[0].length).toBe(1)28 })29})3031describe('Get with * inclusing JS reserved words', () => {31describe('Get with * including JS reserved words', () => {32 const node = new Node()33 node.insert('get', '*', 'get all')34 it('get /', () => {35 expect(node.search('get', '/hello/constructor')[0].length).toBe(1)
760 unmodified lines
modified:src/utils/ipaddr.test.ts+1 added-1 removed
14 unmodified lines
15 expect(expandIPv6('2001:0:0:db8::1')).toBe('2001:0000:0000:0db8:0000:0000:0000:0001')16 })17})18describe('distinctRemoteAddr', () => {19 it('Should result be valud', () => {19 it('Should result be valid', () => {20 expect(distinctRemoteAddr('1::1')).toBe('IPv6')21 expect(distinctRemoteAddr('::1')).toBe('IPv6')2223 expect(distinctRemoteAddr('192.168.2.0')).toBe('IPv4')
38 unmodified lines
modified:src/hono-base.ts+1 added-1 removed
55 unmodified lines
56 * @default true57 */58 strict?: boolean59 /**60 * `router` option specifices which router to use.60 * `router` option specifies which router to use.61 *62 * @see {@link https://hono.dev/docs/api/hono#router-option}63 *64 * @example
459 unmodified lines