Skip to content

Commit

Permalink
feat: merge packages and build and test for composition-api plugin an…
Browse files Browse the repository at this point in the history
…d v3 (#239)

* feat: Vue3 support - 1.0.0-beta.x (#75)

* updated to vue-next

* vue3 examples and alpha version

* update readme with v3 support

* v1.0.0-alpha.2

* v1.0.0-alpha.3

* v1.0.0-alpha.5

* build(deps): update all dependencies to latest

* v1.0.0-alpha.7

* build(deps): update all dependencies to latest

* chore: update example and readme

* v1.0.0-alpha.8

* feat(validation): Add validation

* improve validation

* improvement on validate and add example

* fix validate example

* devops(deps): upgrade all dependencies to the latest

* feat add validation

* build(deps-dev): bump packages

* build(deps-dev): bump packages

* fix build

* bump(deps): vue@3.0.0-beta.2

* fix tests for core

* adding test to web

* add more tests and fix validation tests

* fix tests 🎉

* merge @vue-composable/core and @vue-composable/web into vue-composable package

* fix tests for vue-composable package

* update package homepage

* fix axios tests

* add vue2 tests to circleci

* build: fix build

* update config

* add build2

* few changes

* fix building for 2 and 3

* kinda working

* fix tests

* add build-v2 job

* more config

* config

* config

* config..

* publish script

* stuff

* tests

* fix build
  • Loading branch information
pikax committed Apr 19, 2020
1 parent 83de6bb commit 36c8b57
Show file tree
Hide file tree
Showing 167 changed files with 9,723 additions and 1,295 deletions.
11 changes: 10 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,19 @@ jobs:
- ~/.cache/yarn
key: v1-dependencies-{{ checksum "yarn.lock" }}

- run:
name: Run build v2
command: yarn build --version=2

- run:
name: "Vue2 tests"
command: yarn test --ci --runInBand
environment:
- VUE: 2

- run:
name: Run build
command: yarn build

- run:
name: "Run Jest and Collect Coverage Reports"
command: yarn test --coverage --ci --runInBand --reporters=default --reporters=jest-junit
Expand Down
12 changes: 7 additions & 5 deletions __tests__/setupTest.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const Vue = require('vue/dist/vue.common');
if (__VUE_2__) {
const Vue = require("vue/dist/vue.common");

const plugin = require('@vue/composition-api').default;
const plugin = require("@vue/composition-api").default;

Vue.config.productionTip = false;
Vue.config.devtools = false;
Vue.use(plugin);
Vue.config.productionTip = false;
Vue.config.devtools = false;
Vue.use(plugin);
}
10 changes: 7 additions & 3 deletions docs/.vuepress/components/CssVariablesExample.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@
<input type="text" id="foreground-value" v-model="foreground" />
</div>

<div ref="textDiv" class="text" style="color: var(--color-foreground)">
<div ref="textDiv" class="text" style="color: var(--color-foreground)">
<span v-if="observing">I am a text with the following color:</span>
<span v-else>My color will be updated but not my label:</span>
{{ foreground }}
</div>

<div>
<button type="button" @click="stop" :disabled="!observing">Stop observing</button>
<button type="button" @click="resume" :disabled="observing">Resume observing</button>
<button type="button" @click="stop" :disabled="!observing">
Stop observing
</button>
<button type="button" @click="resume" :disabled="observing">
Resume observing
</button>
</div>
</div>
</template>
Expand Down
34 changes: 22 additions & 12 deletions docs/api/axios.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,38 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts

import { AxiosInstance } from 'axios';
import { AxiosRequestConfig } from 'axios';
import { AxiosResponse } from 'axios';
import { PromiseResultFactory } from '@vue-composable/core';
import { Ref } from '@vue/composition-api';
import { AxiosInstance } from "axios";
import { AxiosRequestConfig } from "axios";
import { AxiosResponse } from "axios";
import { ComputedRef } from "@vue/runtime-core";
import { PromiseResultFactory } from "vue-composable";
import { Ref } from "@vue/runtime-core";

// Warning: (ae-forgotten-export) The symbol "AxiosReturn" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export function useAxios<TData = any>(throwException?: boolean): AxiosReturn<TData>;
export function useAxios<TData = any>(
throwException?: boolean
): AxiosReturn<TData>;

// @public (undocumented)
export function useAxios<TData = any>(url: string, config?: AxiosRequestConfig, throwException?: boolean): AxiosReturn<TData>;
export function useAxios<TData = any>(
url: string,
config?: AxiosRequestConfig,
throwException?: boolean
): AxiosReturn<TData>;

// @public (undocumented)
export function useAxios<TData = any>(url: string, throwException?: boolean): AxiosReturn<TData>;
export function useAxios<TData = any>(
url: string,
throwException?: boolean
): AxiosReturn<TData>;

// @public (undocumented)
export function useAxios<TData = any>(config?: AxiosRequestConfig, throwException?: boolean): AxiosReturn<TData>;

export function useAxios<TData = any>(
config?: AxiosRequestConfig,
throwException?: boolean
): AxiosReturn<TData>;

// (No @packageDocumentation comment for this package)

```
15 changes: 7 additions & 8 deletions docs/api/core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { Ref } from "@vue/composition-api";
import { ComputedRef } from "@vue/runtime-core";
import { Ref } from "@vue/runtime-core";
import { UnwrapRef } from "@vue/runtime-core";

// @public (undocumented)
export interface ArrayPaginationResult<T extends Array<any>>
extends PaginationResult {
// (undocumented)
result: Readonly<Ref<T>>;
result: ComputedRef<T>;
}

// Warning: (ae-forgotten-export) The symbol "I18nExtractLocale" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -257,9 +259,6 @@ export function setI18n<
// @public (undocumented)
export function unwrap<T>(o: RefTyped<T>): T;

// @public (undocumented)
export type UnwrapRef<T> = T extends Ref<infer R> ? R : T;

// @public (undocumented)
export function useArrayPagination<T extends Array<TR>, TR>(
array: RefTyped<T>,
Expand Down Expand Up @@ -355,7 +354,7 @@ export function useCancellablePromise<T extends Promise<TR>, TR>(
export function useDateNow(
options?: NowOptions
): {
now: import("@vue/composition-api").Ref<number>;
now: import("@vue/reactivity").Ref<number>;
remove: () => void;
};

Expand Down Expand Up @@ -409,7 +408,7 @@ export function useI18n<T = i18n>(): i18nResult<string[], T>;
export function useNow(
options?: NowOptions & UseNowOptions
): {
now: import("@vue/composition-api").Ref<number>;
now: import("@vue/reactivity").Ref<number>;
remove: () => void;
};

Expand Down Expand Up @@ -441,7 +440,7 @@ export type UsePathNotFoundReturn<TSource> = (
export function usePerformanceNow(
options?: NowOptions
): {
now: import("@vue/composition-api").Ref<number>;
now: import("@vue/reactivity").Ref<number>;
remove: () => void;
};

Expand Down

0 comments on commit 36c8b57

Please sign in to comment.