Skip to content

Commit

Permalink
feat: rename to x-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Nov 9, 2023
1 parent acd70ae commit 027d629
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"changelog": [
"@changesets/changelog-github",
{
"repo": "un-ts/fetch-api"
"repo": "un-ts/x-fetch"
}
],
"commit": false,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
with:
publish: yarn release
version: yarn changeset version
commit: 'chore: release fetch-api'
title: 'chore: release fetch-api'
commit: 'chore: release x-fetch'
title: 'chore: release x-fetch'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# fetch-api
# x-fetch

[![GitHub Actions](https://github.com/un-ts/fetch-api/workflows/CI/badge.svg)](https://github.com/un-ts/fetch-api/actions/workflows/ci.yml)
[![Codecov](https://img.shields.io/codecov/c/github/un-ts/fetch-api.svg)](https://codecov.io/gh/un-ts/fetch-api)
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fun-ts%2Ffetch-api%2Fmain%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
[![npm](https://img.shields.io/npm/v/fetch-api.svg)](https://www.npmjs.com/package/fetch-api)
[![GitHub Release](https://img.shields.io/github/release/un-ts/fetch-api)](https://github.com/un-ts/fetch-api/releases)
[![GitHub Actions](https://github.com/un-ts/x-fetch/workflows/CI/badge.svg)](https://github.com/un-ts/x-fetch/actions/workflows/ci.yml)
[![Codecov](https://img.shields.io/codecov/c/github/un-ts/x-fetch.svg)](https://codecov.io/gh/un-ts/x-fetch)
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fun-ts%2Fx-fetch%2Fmain%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
[![npm](https://img.shields.io/npm/v/x-fetch.svg)](https://www.npmjs.com/package/x-fetch)
[![GitHub Release](https://img.shields.io/github/release/un-ts/x-fetch)](https://github.com/un-ts/x-fetch/releases)

[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)
Expand All @@ -30,19 +30,19 @@ A simple but elegant `fetch` API wrapper, use `fetch` like a charm

```sh
# pnpm
pnpm add fetch-api
pnpm add x-fetch

# yarn
yarn add fetch-api
yarn add x-fetch

# npm
npm i fetch-api
npm i x-fetch
```

### API

```ts
import { ApiMethod, createFetchApi, fetchApi, interceptors } from 'fetch-api'
import { ApiMethod, createFetchApi, fetchApi, interceptors } from 'x-fetch'

// plain url, GET method
await fetchApi('url')
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<title>fetch-api</title>
<title>x-fetch</title>
</head>
<body>
<div id="app"></div>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "fetch-api",
"name": "x-fetch",
"version": "0.1.0",
"type": "module",
"description": "A simple but elegant `fetch` API wrapper, use `fetch` like a charm",
"repository": "git+https://github.com/un-ts/fetch-api.git",
"repository": "git+https://github.com/un-ts/x-fetch.git",
"author": "JounQin (https://www.1stG.me) <[email protected]>",
"funding": "https://opencollective.com/unts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion test/basic.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type ApiInterceptor, fetchApi, interceptors } from 'fetch-api'
import { type ApiInterceptor, fetchApi, interceptors } from 'x-fetch'

test('it should just work', async () => {
expect(
Expand Down
3 changes: 2 additions & 1 deletion vercel.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"version": 2,
"alias": [
"ifetch.vercel.app"
"ifetch.vercel.app",
"xfetch.vercel.app"
],
"github": {
"silent": true
Expand Down
2 changes: 1 addition & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
],
resolve: {
alias: {
'fetch-api': './src/index.ts',
'x-fetch': './src/index.ts',
},
},
test: {
Expand Down
78 changes: 39 additions & 39 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9479,45 +9479,6 @@ __metadata:
languageName: node
linkType: hard

"fetch-api@workspace:.":
version: 0.0.0-use.local
resolution: "fetch-api@workspace:."
dependencies:
"@1stg/app-config": "npm:^9.0.0"
"@1stg/lib-config": "npm:^12.0.0"
"@changesets/changelog-github": "npm:^0.4.8"
"@changesets/cli": "npm:^2.26.2"
"@mdx-js/rollup": "npm:^3.0.0"
"@pkgr/rollup": "npm:^4.1.3"
"@size-limit/preset-small-lib": "npm:^10.0.2"
"@types/mdx": "npm:^2.0.9"
"@types/node": "npm:^20.8.10"
"@types/react": "npm:^18.2.36"
"@types/react-dom": "npm:^18.2.14"
"@vitejs/plugin-react-swc": "npm:^3.4.1"
"@vitest/coverage-istanbul": "npm:^0.34.6"
commitlint: "npm:^18.2.0"
eslint: "npm:^8.53.0"
github-markdown-css: "npm:^5.4.0"
lint-staged: "npm:^13.3.0"
npm-run-all: "npm:^4.1.5"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
react-router-dom: "npm:^6.18.0"
rehype-slug: "npm:^6.0.0"
remark-gfm: "npm:^4.0.0"
simple-git-hooks: "npm:^2.9.0"
size-limit: "npm:^10.0.2"
stylelint: "npm:^15.11.0"
tslib: "npm:^2.6.2"
type-coverage: "npm:^2.27.0"
typescript: "npm:^5.2.2"
unplugin-auto-import: "npm:^0.16.7"
vite: "npm:^4.5.0"
vitest: "npm:^0.34.6"
languageName: unknown
linkType: soft

"figures@npm:^1.3.5":
version: 1.7.0
resolution: "figures@npm:1.7.0"
Expand Down Expand Up @@ -21475,6 +21436,45 @@ __metadata:
languageName: node
linkType: hard

"x-fetch@workspace:.":
version: 0.0.0-use.local
resolution: "x-fetch@workspace:."
dependencies:
"@1stg/app-config": "npm:^9.0.0"
"@1stg/lib-config": "npm:^12.0.0"
"@changesets/changelog-github": "npm:^0.4.8"
"@changesets/cli": "npm:^2.26.2"
"@mdx-js/rollup": "npm:^3.0.0"
"@pkgr/rollup": "npm:^4.1.3"
"@size-limit/preset-small-lib": "npm:^10.0.2"
"@types/mdx": "npm:^2.0.9"
"@types/node": "npm:^20.8.10"
"@types/react": "npm:^18.2.36"
"@types/react-dom": "npm:^18.2.14"
"@vitejs/plugin-react-swc": "npm:^3.4.1"
"@vitest/coverage-istanbul": "npm:^0.34.6"
commitlint: "npm:^18.2.0"
eslint: "npm:^8.53.0"
github-markdown-css: "npm:^5.4.0"
lint-staged: "npm:^13.3.0"
npm-run-all: "npm:^4.1.5"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
react-router-dom: "npm:^6.18.0"
rehype-slug: "npm:^6.0.0"
remark-gfm: "npm:^4.0.0"
simple-git-hooks: "npm:^2.9.0"
size-limit: "npm:^10.0.2"
stylelint: "npm:^15.11.0"
tslib: "npm:^2.6.2"
type-coverage: "npm:^2.27.0"
typescript: "npm:^5.2.2"
unplugin-auto-import: "npm:^0.16.7"
vite: "npm:^4.5.0"
vitest: "npm:^0.34.6"
languageName: unknown
linkType: soft

"xml-name-validator@npm:^4.0.0":
version: 4.0.0
resolution: "xml-name-validator@npm:4.0.0"
Expand Down

0 comments on commit 027d629

Please sign in to comment.