Skip to content

Commit

Permalink
fix: unexpected incorrect entries
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Dec 14, 2023
1 parent 027d629 commit 2ed38eb
Show file tree
Hide file tree
Showing 13 changed files with 1,007 additions and 1,255 deletions.
2 changes: 1 addition & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"node": "16",
"node": "18",
"sandboxes": []
}
11 changes: 0 additions & 11 deletions .github/FUNDING.yml

This file was deleted.

14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,29 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn

- name: Enable Corepack
run: corepack enable
env:
# https://github.com/actions/setup-node/issues/531#issuecomment-1819151412
SKIP_YARN_COREPACK_CHECK: 1

- name: Install Dependencies
run: yarn --immutable
env:
SKIP_YARN_COREPACK_CHECK: 1

- name: Build, Lint and Test
run: yarn run-s build lint test
run: yarn run-s build lint
env:
EFF_NO_LINK_RULES: true
PARSER_NO_WATCH: true
SKIP_YARN_COREPACK_CHECK: 1

- name: Codecov
uses: codecov/codecov-action@v3
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 20
- name: Enable Corepack
run: corepack enable

- name: Setup Node.js LTS
uses: actions/setup-node@v4
with:
node-version: 20
node-version: lts/*
cache: yarn

- name: Enable Corepack
run: corepack enable

- name: Install Dependencies
run: yarn --immutable

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Node.js 20
- name: Enable Corepack
run: corepack enable

- name: Setup Node.js LTS
uses: actions/setup-node@v4
with:
node-version: 20
node-version: lts/*
cache: yarn

- name: Enable Corepack
run: corepack enable

- name: Install Dependencies
run: yarn --immutable

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ coverage
dist
lib
node_modules
/auto-imports.d.ts
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import { ApiMethod, createFetchApi, fetchApi, interceptors } from 'x-fetch'
// plain url, GET method
await fetchApi('url')

// with options, `body`, `query`, etc.
// with options, `method`, `body`, `query`, etc.
await fetchApi('url', {
method: ApiMethod.POST, // or 'POST'
// plain object or array, or BodyInit
Expand Down
21 changes: 0 additions & 21 deletions auto-imports.d.ts

This file was deleted.

11 changes: 4 additions & 7 deletions docs/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ import { defineConfig } from 'vite'

export default defineConfig({
plugins: [
{
enforce: 'pre',
...mdx({
remarkPlugins: [remarkGfm],
rehypePlugins: [rehypeSlug],
}),
},
mdx({
remarkPlugins: [remarkGfm],
rehypePlugins: [rehypeSlug],
}),
react(),
],
build: {
Expand Down
56 changes: 32 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
"author": "JounQin (https://www.1stG.me) <[email protected]>",
"funding": "https://opencollective.com/unts",
"license": "MIT",
"packageManager": "[email protected].1",
"packageManager": "[email protected].2",
"engines": {
"node": ">=18.0.0"
"node": ">=4.0.0"
},
"exports": "./src/index.ts",
"files": [
"lib",
"!**/*.tsbuildinfo"
],
"scripts": {
"build": "run-p 'build:*'",
"build": "yarn test && run-p 'build:*'",
"build:r": "r -f cjs",
"build:tsc": "tsc -p src",
"dev": "vitest",
Expand All @@ -38,37 +38,45 @@
"tslib": "^2.6.2"
},
"devDependencies": {
"@1stg/app-config": "^9.0.0",
"@1stg/lib-config": "^12.0.0",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@1stg/app-config": "^9.0.1",
"@1stg/lib-config": "^12.0.1",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@commitlint/cli": "^18.4.3",
"@mdx-js/rollup": "^3.0.0",
"@pkgr/rollup": "^4.1.3",
"@size-limit/preset-small-lib": "^10.0.2",
"@types/mdx": "^2.0.9",
"@types/node": "^20.8.10",
"@types/react": "^18.2.36",
"@types/react-dom": "^18.2.14",
"@vitejs/plugin-react-swc": "^3.4.1",
"@vitest/coverage-istanbul": "^0.34.6",
"commitlint": "^18.2.0",
"eslint": "^8.53.0",
"github-markdown-css": "^5.4.0",
"lint-staged": "^13.3.0",
"@size-limit/preset-small-lib": "^11.0.1",
"@types/mdx": "^2.0.10",
"@types/node": "^20.10.4",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.17",
"@types/web": "^0.0.127",
"@vitejs/plugin-react-swc": "^3.5.0",
"@vitest/coverage-istanbul": "^1.0.4",
"eslint": "^8.55.0",
"github-markdown-css": "^5.5.0",
"lint-staged": "^15.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.18.0",
"react-router-dom": "^6.21.0",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.0",
"simple-git-hooks": "^2.9.0",
"size-limit": "^10.0.2",
"size-limit": "^11.0.1",
"stylelint": "^15.11.0",
"type-coverage": "^2.27.0",
"typescript": "^5.2.2",
"unplugin-auto-import": "^0.16.7",
"vite": "^4.5.0",
"vitest": "^0.34.6"
"typescript": "^5.3.3",
"unplugin-auto-import": "^0.17.2",
"vite": "^5.0.8",
"vitest": "^1.0.4"
},
"resolutions": {
"@commitlint/cli": "^18.4.3",
"lint-staged": "^15.2.0",
"prettier": "^2.8.8",
"rollup": "^4.3.0"
},
"publishConfig": {
"main": "./lib/index.cjs",
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "@1stg/tsconfig/node16",
"compilerOptions": {
"lib": ["DOM", "ESNext"],
"module": "Node16",
"rootDir": "."
"paths": {
"x-fetch": ["./src/index.ts"]
}
}
}
3 changes: 2 additions & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ export default defineConfig({
],
resolve: {
alias: {
'x-fetch': './src/index.ts',
'x-fetch': new URL('src/index.ts', import.meta.url).pathname,
},
},
test: {
coverage: {
provider: 'istanbul',
reporter: ['lcov', 'json', 'text'],
include: ['src'],
},
},
})
Loading

0 comments on commit 2ed38eb

Please sign in to comment.