From: Eduardo San Martin Morote Date: Wed, 22 Apr 2020 12:02:51 +0000 (+0200) Subject: refactor: rename files to camelCase X-Git-Tag: v4.0.0-alpha.8~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e25a31387a9a08845a61991af16909f989641e92;p=thirdparty%2Fvuejs%2Frouter.git refactor: rename files to camelCase --- diff --git a/__tests__/guards/global-after.spec.ts b/__tests__/guards/afterEach.spec.ts similarity index 100% rename from __tests__/guards/global-after.spec.ts rename to __tests__/guards/afterEach.spec.ts diff --git a/__tests__/guards/global-beforeEach.spec.ts b/__tests__/guards/beforeEach.spec.ts similarity index 100% rename from __tests__/guards/global-beforeEach.spec.ts rename to __tests__/guards/beforeEach.spec.ts diff --git a/__tests__/guards/route-beforeEnter.spec.ts b/__tests__/guards/beforeEnter.spec.ts similarity index 100% rename from __tests__/guards/route-beforeEnter.spec.ts rename to __tests__/guards/beforeEnter.spec.ts diff --git a/__tests__/guards/component-beforeRouteEnter.spec.ts b/__tests__/guards/beforeRouteEnter.spec.ts similarity index 100% rename from __tests__/guards/component-beforeRouteEnter.spec.ts rename to __tests__/guards/beforeRouteEnter.spec.ts diff --git a/__tests__/guards/component-beforeRouteLeave.spec.ts b/__tests__/guards/beforeRouteLeave.spec.ts similarity index 100% rename from __tests__/guards/component-beforeRouteLeave.spec.ts rename to __tests__/guards/beforeRouteLeave.spec.ts diff --git a/__tests__/guards/component-beforeRouteUpdate.spec.ts b/__tests__/guards/beforeRouteUpdate.spec.ts similarity index 100% rename from __tests__/guards/component-beforeRouteUpdate.spec.ts rename to __tests__/guards/beforeRouteUpdate.spec.ts diff --git a/__tests__/matcher/path-parser.spec.ts b/__tests__/matcher/pathParser.spec.ts similarity index 99% rename from __tests__/matcher/path-parser.spec.ts rename to __tests__/matcher/pathParser.spec.ts index 29459bcd..6225d6c1 100644 --- a/__tests__/matcher/path-parser.spec.ts +++ b/__tests__/matcher/pathParser.spec.ts @@ -1,5 +1,5 @@ -import { tokenizePath, TokenType } from '../../src/matcher/path-tokenizer' -import { tokensToParser } from '../../src/matcher/path-parser-ranker' +import { tokenizePath, TokenType } from '../../src/matcher/pathTokenizer' +import { tokensToParser } from '../../src/matcher/pathParserRanker' describe('Path parser', () => { describe('tokenizer', () => { diff --git a/__tests__/matcher/path-ranking.spec.ts b/__tests__/matcher/pathRanking.spec.ts similarity index 98% rename from __tests__/matcher/path-ranking.spec.ts rename to __tests__/matcher/pathRanking.spec.ts index 3006e39c..f437fed0 100644 --- a/__tests__/matcher/path-ranking.spec.ts +++ b/__tests__/matcher/pathRanking.spec.ts @@ -1,8 +1,8 @@ -import { tokenizePath } from '../../src/matcher/path-tokenizer' +import { tokenizePath } from '../../src/matcher/pathTokenizer' import { tokensToParser, comparePathParserScore, -} from '../../src/matcher/path-parser-ranker' +} from '../../src/matcher/pathParserRanker' type PathParserOptions = Parameters[1] diff --git a/__tests__/url-encoding.spec.ts b/__tests__/urlEncoding.spec.ts similarity index 100% rename from __tests__/url-encoding.spec.ts rename to __tests__/urlEncoding.spec.ts diff --git a/src/matcher/index.ts b/src/matcher/index.ts index 1d57d07f..fc50f584 100644 --- a/src/matcher/index.ts +++ b/src/matcher/index.ts @@ -6,13 +6,13 @@ import { RouteRecordName, } from '../types' import { createRouterError, ErrorTypes, MatcherError } from '../errors' -import { createRouteRecordMatcher, RouteRecordMatcher } from './path-matcher' +import { createRouteRecordMatcher, RouteRecordMatcher } from './pathMatcher' import { RouteRecordRedirect, RouteRecordNormalized } from './types' import { PathParams, comparePathParserScore, PathParserOptions, -} from './path-parser-ranker' +} from './pathParserRanker' let noop = () => {} diff --git a/src/matcher/path-matcher.ts b/src/matcher/pathMatcher.ts similarity index 93% rename from src/matcher/path-matcher.ts rename to src/matcher/pathMatcher.ts index c64b2a13..0132a111 100644 --- a/src/matcher/path-matcher.ts +++ b/src/matcher/pathMatcher.ts @@ -3,8 +3,8 @@ import { tokensToParser, PathParser, PathParserOptions, -} from './path-parser-ranker' -import { tokenizePath } from './path-tokenizer' +} from './pathParserRanker' +import { tokenizePath } from './pathTokenizer' export interface RouteRecordMatcher extends PathParser { record: RouteRecord diff --git a/src/matcher/path-parser-ranker.ts b/src/matcher/pathParserRanker.ts similarity index 99% rename from src/matcher/path-parser-ranker.ts rename to src/matcher/pathParserRanker.ts index 3d6deac2..31511de2 100644 --- a/src/matcher/path-parser-ranker.ts +++ b/src/matcher/pathParserRanker.ts @@ -1,4 +1,4 @@ -import { Token, TokenType } from './path-tokenizer' +import { Token, TokenType } from './pathTokenizer' export type PathParams = Record diff --git a/src/matcher/path-tokenizer.ts b/src/matcher/pathTokenizer.ts similarity index 100% rename from src/matcher/path-tokenizer.ts rename to src/matcher/pathTokenizer.ts diff --git a/src/types/index.ts b/src/types/index.ts index f2b7631c..a8eb7f7d 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,5 +1,5 @@ import { LocationQuery, LocationQueryRaw } from '../utils/query' -import { PathParserOptions } from '../matcher/path-parser-ranker' +import { PathParserOptions } from '../matcher/pathParserRanker' import { markRaw, Ref, ComputedRef, ComponentOptions } from 'vue' import { RouteRecord, RouteRecordNormalized } from '../matcher/types' import { HistoryState } from '../history/common' @@ -274,7 +274,7 @@ export interface PostNavigationGuard { ): any } -export * from './type-guards' +export * from './typeGuards' export type Mutable = { -readonly [P in keyof T]: T[P] diff --git a/src/types/type-guards.ts b/src/types/typeGuards.ts similarity index 100% rename from src/types/type-guards.ts rename to src/types/typeGuards.ts