Skip to content

Commit

Permalink
Update dependencies: vuex 3.0.0, vue 2.5.0, typescript 2.5.0+ (tests …
Browse files Browse the repository at this point in the history
…currently broken)
  • Loading branch information
Ben Crowl committed Oct 27, 2017
1 parent 01e9efd commit 7a74af8
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
{
"taskName": "build",
"isBuildCommand": true,
"isBackground": true,
"problemMatcher": "$tsc-watch"
"isBackground": false,
"problemMatcher": "$tsc"
},
// {
// "taskName": "clean"
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuex-typex",
"version": "1.0.9",
"version": "3.0.1",
"description": "A TypeScript pattern for strongly-typed access to Vuex Store modules",
"files": [
"dist/index.js",
Expand All @@ -9,7 +9,7 @@
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"dependencies": {
"vuex": "^2.3.1"
"vuex": "^3.0.0"
},
"devDependencies": {
"@types/chai": "^3.4.35",
Expand All @@ -20,8 +20,8 @@
"mocha": "^3.2.0",
"nyc": "^10.1.2",
"rimraf": "^2.6.1",
"typescript": "^2.2.1",
"vue": "^2.3.0"
"typescript": "^2.5.0",
"vue": "^2.5.0"
},
"repository": {
"type": "git",
Expand All @@ -40,7 +40,7 @@
"homepage": "https://github.com/mrcrowl/vuex-typex#readme",
"scripts": {
"clean": "rimraf dist && rimraf coverage",
"compile": "tsc --pretty --watch",
"compile": "tsc --pretty",
"build": "npm run clean && npm run compile",
"test": "npm run coverage",
"test-only": "mocha --recursive dist/**/*.spec.js",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ModuleBuilderImpl<S, R={}> implements ModuleBuilder<S, R> {
{
throw new Error(`There is already a module named '${qualifiedNamespace}'. If you meant to get the existing module, then provide no initialState argument.`)
}
const nestedBuilder = new ModuleBuilderImpl(qualifiedNamespace, initialState)
const nestedBuilder = new ModuleBuilderImpl<M, R>(qualifiedNamespace, initialState)
this._moduleBuilders[namespace] = nestedBuilder
return nestedBuilder
}
Expand Down Expand Up @@ -244,7 +244,7 @@ class StoreBuilderImpl<R> extends ModuleBuilderImpl<any, R> {
{
if (!this._store)
{
const options: StoreOptions<R> = {
const options: StoreOptions<R> & { namespaced?: boolean } = {
...this.vuexModule(),
...overrideOptions
}
Expand Down
2 changes: 1 addition & 1 deletion src/tests/anon-handler.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from "chai"
import * as Vue from "vue"
import * as Vuex from "vuex"
import Vuex from "vuex"
import { buildStore } from "./store"
import { RootState } from "./store/index"
import birthday, { birthdayModuleBuilder } from "./store/birthday/birthday"
Expand Down
6 changes: 3 additions & 3 deletions src/tests/complete.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { expect } from "chai"
import * as Vue from "vue"
import * as Vuex from "vuex"
import Vue from "vue"
import Vuex, { Store } from "vuex"
import { buildStore, RootState } from "./store/index"
import birthday from "./store/birthday/birthday"
import auth from "./store/auth/auth"

describe("Run an action", () =>
{
let store: Vuex.Store<RootState>
let store: Store<RootState>

beforeEach(() =>
{
Expand Down
6 changes: 3 additions & 3 deletions src/tests/main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { expect } from "chai"
import * as Vue from "vue"
import * as Vuex from "vuex"
import Vue from "vue"
import Vuex, { Store } from "vuex"
import { buildStore } from "./store"
import { RootState } from "./store/index"
import birthday from "./store/birthday/birthday"
import auth from "./store/auth/auth"

let store: Vuex.Store<RootState>
let store: Store<RootState>

async function test()
{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/nested.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from "chai"
import * as Vue from "vue"
import * as Vuex from "vuex"
import Vuex from "vuex"
import { buildStore } from "./store"
import { RootState } from "./store/index"
import { getStoreBuilder, StoreBuilder, ModuleBuilder } from "../index"
Expand Down
2 changes: 1 addition & 1 deletion src/tests/plugin.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from "chai"
import * as Vue from "vue"
import * as Vuex from "vuex"
import Vuex from "vuex"
import { buildStore } from "./store"
import { RootState } from "./store/index"
import birthday, { birthdayModuleBuilder } from "./store/birthday/birthday"
Expand Down
2 changes: 1 addition & 1 deletion src/tests/root.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from "chai"
import * as Vue from "vue"
import * as Vuex from "vuex"
import Vuex from "vuex"
import { buildStore } from "./store"
import { getStoreBuilder, StoreBuilder, ModuleBuilder } from "../index"
import { Store } from "vuex"
Expand Down
2 changes: 1 addition & 1 deletion src/tests/store/auth/auth.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import * as Vuex from "vuex"
import Vuex from "vuex"
import { ModuleBuilder } from "../../.."
import { AuthState } from "./state"
import { RootState } from "../index"
Expand Down
2 changes: 1 addition & 1 deletion src/tests/store/birthday/birthday.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import * as Vuex from "vuex"
import Vuex from "vuex"
import { getStoreBuilder } from "../../.."
import { BirthdayState, Birthday } from "./state"
import { Module } from "vuex"
Expand Down
6 changes: 3 additions & 3 deletions src/tests/wrong-order.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from "chai"
import * as Vue from "vue"
import * as Vuex from "vuex"
import Vue from "vue"
import Vuex, { Store } from "vuex"
import { buildStore } from "./store"
import { RootState } from "./store/index"
import birthday, { birthdayModuleBuilder } from "./store/birthday/birthday"
Expand All @@ -9,7 +9,7 @@ import { getStoreBuilder } from "../index"

describe("Output the store", () =>
{
let store: Vuex.Store<RootState>
let store: Store<RootState>

beforeEach(() =>
{
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"compileOnSave": true,
"compilerOptions": {
"module": "commonjs",
"module": "es6",
"moduleResolution": "node",
"lib": [
"es2015"
],
// "strict": true,
"allowSyntheticDefaultImports": false,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"strictNullChecks": true,
"target": "es2015",
"target": "es5",
"sourceMap": true,
"outDir": "./dist",
"declaration": true,
"removeComments": false,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"typeRoots": [
"./node_modules/@types"
Expand Down

0 comments on commit 7a74af8

Please sign in to comment.