From: Eduardo San Martin Morote Date: Sat, 12 Oct 2019 15:06:22 +0000 (+0200) Subject: refactor: rename histories X-Git-Tag: v4.0.0-alpha.0~195 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ade2af54d82e410856af25cfb67401be2c509348;p=thirdparty%2Fvuejs%2Frouter.git refactor: rename histories --- diff --git a/__tests__/history/html5.spec.ts b/__tests__/history/html5.spec.ts index 8cabc0b4..7e1e1ca3 100644 --- a/__tests__/history/html5.spec.ts +++ b/__tests__/history/html5.spec.ts @@ -1,4 +1,4 @@ -import createHistory from '../../src/history/html5.2' +import createHistory from '../../src/history/html5' import { createDom } from '../utils' // TODO: is it really worth testing this implementation on jest or is it diff --git a/__tests__/history/abstract.spec.ts b/__tests__/history/memory.spec.ts similarity index 98% rename from __tests__/history/abstract.spec.ts rename to __tests__/history/memory.spec.ts index 83dcdf2a..c6ecaf29 100644 --- a/__tests__/history/abstract.spec.ts +++ b/__tests__/history/memory.spec.ts @@ -1,4 +1,4 @@ -import createMemoryHistory from '../../src/history/abstract.2' +import createMemoryHistory from '../../src/history/memory' import { START, HistoryLocationNormalized, diff --git a/__tests__/query.spec.ts b/__tests__/query.spec.ts index c1d505be..8c50da28 100644 --- a/__tests__/query.spec.ts +++ b/__tests__/query.spec.ts @@ -1,4 +1,4 @@ -import { parseQuery } from '../src/history/utils' +import { parseQuery } from '../src/history/common' describe('parseQuery', () => { it('works with leading ?', () => { diff --git a/__tests__/url.spec.ts b/__tests__/url.spec.ts index 560b755f..3a923cbb 100644 --- a/__tests__/url.spec.ts +++ b/__tests__/url.spec.ts @@ -2,7 +2,7 @@ import { parseURL, stringifyURL, normalizeLocation, -} from '../src/history/utils' +} from '../src/history/common' describe('parseURL', () => { it('works with no query no hash', () => { diff --git a/src/history/hash.2.ts b/src/history/hash.ts similarity index 87% rename from src/history/hash.2.ts rename to src/history/hash.ts index 583a305e..706f5fbe 100644 --- a/src/history/hash.2.ts +++ b/src/history/hash.ts @@ -1,5 +1,5 @@ import { RouterHistory } from './common' -import createHistory from './html5.2' +import createHistory from './html5' export default function createHashHistory(): RouterHistory { // Make sure this implementation is fine in terms of encoding, specially for IE11 diff --git a/src/history/html5.2.ts b/src/history/html5.ts similarity index 100% rename from src/history/html5.2.ts rename to src/history/html5.ts diff --git a/src/history/abstract.2.ts b/src/history/memory.ts similarity index 100% rename from src/history/abstract.2.ts rename to src/history/memory.ts diff --git a/src/index.ts b/src/index.ts index ed0526ab..a46e17b2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import { Router, RouterOptions } from './router' import { PluginFunction, VueConstructor } from 'vue' -import createHistory from './history/html5.2' -import createMemoryHistory from './history/abstract.2' +import createHistory from './history/html5' +import createMemoryHistory from './history/memory' import View from './components/View' import Link from './components/Link'