Skip to content

Commit

Permalink
docs: update docs to v0.8.8 (#139)
Browse files Browse the repository at this point in the history
* build: fixed `umd/es5` declaration file

* docs: updated download urls

* chore(deps-dev): bump @typescript-eslint/parser from 5.10.0 to 5.10.1 (#125)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.10.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump webpack-cli from 4.9.1 to 4.9.2 (#127)

Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.9.1 to 4.9.2.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/[email protected]@4.9.2)

---
updated-dependencies:
- dependency-name: webpack-cli
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/eslint-plugin (#126)

* docs: gitter badge

* chore(deps-dev): bump es-check from 6.1.1 to 6.2.1 (#130)

* chore(deps-dev): bump eslint from 8.7.0 to 8.8.0 (#131)

* chore(deps-dev): bump @typescript-eslint/eslint-plugin (#134)

* chore(deps-dev): bump webpack from 5.67.0 to 5.68.0 (#133)

* chore(deps-dev): bump @typescript-eslint/parser from 5.10.1 to 5.10.2 (#132)

* build: es2017 as default output

* docs: updated benchmark

* chore: added .npmignore

* docs: updated benchmark

* docs: more examples

* style: formatted code

* docs: fixed benchmark

* ci: fixed actions/checkout#237

* chore: codecov bug was not fixed :(

* chore(deps-dev): bump jest from 27.4.7 to 27.5.0 (#136)

* chore(deps-dev): bump @typescript-eslint/eslint-plugin (#138)

* deps: updated dependencies

* tag: v0.8.6

* no: way that I did that

* tag: v0.8.7

* fix: now npmignore is happy

* tag: v0.8.8

* docs: updated download urls

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
arthurfiorette and dependabot[bot] authored Feb 8, 2022
1 parent f09670d commit f50e6ee
Show file tree
Hide file tree
Showing 26 changed files with 2,630 additions and 3,434 deletions.
16 changes: 16 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# white list approach

*

!LICENSE
!README.md

!src/**

!umd/**
!cjs/**
!esm/**

!types/**

!examples/runkit.js
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ node_modules
.yarn

changelog.md
CHANGELOG.md
CHANGELOG.md

_comparison-benchmark.md
48 changes: 47 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,52 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

## [v0.8.5](https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.4...v0.8.5)
## [v0.8.8](https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.7...v0.8.8)

### Commits

- fix: now npmignore is happy [`79ab592`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/79ab5927a9eea49ca1b2950d09e4a5e0163ec1f5)

## [v0.8.7](https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.6...v0.8.7) - 2022-02-08

### Commits

- no: way that I did that [`ca033eb`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/ca033eb8d382bf69583597065a024b1efb3881b6)
- tag: v0.8.7 [`b39a54b`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/b39a54b84b8be3fe94f9add5f4c27dd5e1b67b84)

## [v0.8.6](https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.5...v0.8.6) - 2022-02-08

### Merged

- chore(deps-dev): bump @typescript-eslint/eslint-plugin [`#138`](https://github.com/arthurfiorette/axios-cache-interceptor/pull/138)
- chore(deps-dev): bump jest from 27.4.7 to 27.5.0 [`#136`](https://github.com/arthurfiorette/axios-cache-interceptor/pull/136)
- chore(deps-dev): bump @typescript-eslint/parser from 5.10.1 to 5.10.2 [`#132`](https://github.com/arthurfiorette/axios-cache-interceptor/pull/132)
- chore(deps-dev): bump webpack from 5.67.0 to 5.68.0 [`#133`](https://github.com/arthurfiorette/axios-cache-interceptor/pull/133)
- chore(deps-dev): bump @typescript-eslint/eslint-plugin [`#134`](https://github.com/arthurfiorette/axios-cache-interceptor/pull/134)
- chore(deps-dev): bump eslint from 8.7.0 to 8.8.0 [`#131`](https://github.com/arthurfiorette/axios-cache-interceptor/pull/131)
- chore(deps-dev): bump es-check from 6.1.1 to 6.2.1 [`#130`](https://github.com/arthurfiorette/axios-cache-interceptor/pull/130)
- chore(deps-dev): bump @typescript-eslint/eslint-plugin [`#126`](https://github.com/arthurfiorette/axios-cache-interceptor/pull/126)
- chore(deps-dev): bump webpack-cli from 4.9.1 to 4.9.2 [`#127`](https://github.com/arthurfiorette/axios-cache-interceptor/pull/127)
- chore(deps-dev): bump @typescript-eslint/parser from 5.10.0 to 5.10.1 [`#125`](https://github.com/arthurfiorette/axios-cache-interceptor/pull/125)

### Commits

- build: es2017 as default output [`f235fd4`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/f235fd4c60a867ef24a51c90e259fdb0cddbb0df)
- build: fixed `umd/es5` declaration file [`ed81ea7`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/ed81ea7b04c72332469996cd5c27f1972c0da19d)
- chore: added .npmignore [`ad1e965`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/ad1e965b41b5948ca8a590c9f12873736b652e2c)
- chore: codecov bug was not fixed :( [`1159840`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/1159840748fabf54909ff5d27fb459e21814faa6)
- ci: fixed actions/checkout#237 [`7f41583`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/7f4158331b404bc5318faafdf5ea951adc20e2e1)
- deps: updated dependencies [`e183bea`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/e183bea43a098565ac421807af4fef029fe64717)
- docs: fixed benchmark [`db4cecb`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/db4cecb475dcb43b2274b96914db7721117f41b5)
- docs: gitter badge [`0c27b9e`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/0c27b9ec38357067000fd69848953aec38a3d4de)
- docs: more examples [`ab68a9f`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/ab68a9f756700779f27f54e2066972f4facba3a8)
- docs: updated benchmark [`e6f2a12`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/e6f2a128985e7c0fa61f6bf0345ca98d9b8db9e0)
- docs: updated benchmark [`27b9a49`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/27b9a4972cb3bd56f1246db5b5e15136b7bd07e9)
- docs: updated download urls [`95dc96c`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/95dc96c83ef7258c0003fbb878d8e3dd52af3f4f)
- style: formatted code [`1f884e9`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/1f884e9de54aae06d64fa8359bbc0b562799ffb6)
- tag: v0.8.6 [`372f892`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/372f892b9c135e2e80faa077f51f8ecee96c89e4)

## [v0.8.5](https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.4...v0.8.5) - 2022-01-23

### Merged

Expand Down Expand Up @@ -39,6 +84,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- refactor: moved header file [`d14750e`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/d14750ee63593d275255033bad228aa0023eadf5)
- refactor: prefer the usage of `AxiosResponseHeaders` [`bd4bf26`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/bd4bf26e1846e3579eba7dba379c0f3560432c8a)
- style: format code [`31ef7e7`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/31ef7e7eb24ae70344d8e9463281615afa7a5171)
- tag: v0.8.5 [`f09670d`](https://github.com/arthurfiorette/axios-cache-interceptor/commit/f09670d7690767bf8ae16343395db4817fe33e68)

## [v0.8.4](https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.3...v0.8.4) - 2022-01-18

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![Bundlephobia](https://img.shields.io/bundlephobia/minzip/axios-cache-interceptor/latest?style=flat)](https://bundlephobia.com/package/axios-cache-interceptor@latest)
[![Packagephobia](https://packagephobia.com/badge?p=axios-cache-interceptor@latest)](https://packagephobia.com/result?p=axios-cache-interceptor@latest)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Farthurfiorette%2Faxios-cache-interceptor.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Farthurfiorette%2Faxios-cache-interceptor?ref=badge_shield)
[![Join the chat at https://gitter.im/axios-cache-interceptor/community](https://badges.gitter.im/axios-cache-interceptor/community.svg)](https://gitter.im/axios-cache-interceptor/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

<br />

Expand Down Expand Up @@ -54,10 +55,10 @@ res2.cached; // true

Licensed under the **MIT**. See [`LICENSE`](LICENSE) for more informations.

<br />

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Farthurfiorette%2Faxios-cache-interceptor.svg?type=small)](https://app.fossa.com/projects/git%2Bgithub.com%2Farthurfiorette%2Faxios-cache-interceptor?ref=badge_small)

<br />

## Contact

See my contact information on my [github profile](https://github.com/arthurfiorette) or
Expand Down
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tsc -p build/tsconfig.types.json &
echo "export * from '../types';" | tee \
esm/index.d.ts esm/dev.d.ts \
cjs/index.d.ts cjs/dev.d.ts \
umd/index.d.ts umd/dev.d.ts umd/es6.d.ts \
umd/index.d.ts umd/dev.d.ts umd/es5.d.ts \
> /dev/null &

wait
Expand Down
12 changes: 6 additions & 6 deletions build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ const config = ({
module.exports = [
// ESModule
config({
esTarget: 'es2015',
esTarget: 'es2017',
output: 'esm/index',
libraryType: 'module',
inlineDeps: true
}),
config({
esTarget: 'es2017',
esTarget: 'es2020',
output: 'esm/dev',
libraryType: 'module',
inlineDeps: true,
Expand All @@ -103,13 +103,13 @@ module.exports = [

// CommonJS
config({
esTarget: 'es2015',
esTarget: 'es2017',
output: 'cjs/index',
libraryType: 'commonjs2',
inlineDeps: true
}),
config({
esTarget: 'es2017',
esTarget: 'es2020',
output: 'cjs/dev',
libraryType: 'commonjs2',
inlineDeps: true,
Expand All @@ -118,13 +118,13 @@ module.exports = [

// UMD
config({
esTarget: 'es2015',
esTarget: 'es2017',
output: 'umd/index',
libraryType: 'umd',
libraryName: 'AxiosCacheInterceptor'
}),
config({
esTarget: 'es2017',
esTarget: 'es2020',
output: 'umd/dev',
libraryType: 'umd',
libraryName: 'AxiosCacheInterceptor',
Expand Down
83 changes: 83 additions & 0 deletions docs/benchmark.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/* eslint-disable */

const Benny = require('benny');
const { execSync } = require('child_process');
const { writeFileSync } = require('fs');

const Axios = require('axios').default;
const AxiosInstance = Axios.create();

const AxiosCacheInterceptor = require('../cjs');
const InterceptorInstance = AxiosCacheInterceptor.setupCache(Axios.create());

const AxiosCacheAdapter = require('axios-cache-adapter');
const AdapterInstance = AxiosCacheAdapter.setup({});

const config = {
port: 8734,
host: '0.0.0.0'
};

const data = {};
const runs = {};
const app = require('express')();

app.get('/:name', ({ params }, res) => {
data[params.name] ? data[params.name]++ : (data[params.name] = 1);

return res.json({
computation: Math.random(),
name: params.name
});
});

const server = app.listen(config.port, config.host);

Benny.suite(
'Benchmark Result',

Benny.add('axios', async () => {
const name = 'axios';
runs[name] ? runs[name]++ : (runs[name] = 1);

await AxiosInstance.get(`http://${config.host}:${config.port}/${name}`);
}),

Benny.add('cache-interceptor', async () => {
const name = 'cache-interceptor';
runs[name] ? runs[name]++ : (runs[name] = 1);

await InterceptorInstance.get(`http://${config.host}:${config.port}/${name}`);
}),

Benny.add('cache-adapter', async () => {
const name = 'cache-adapter';
runs[name] ? runs[name]++ : (runs[name] = 1);

await AdapterInstance.get(`http://${config.host}:${config.port}/${name}`);
}),

Benny.cycle(),
Benny.complete((summary) => {
server.close();

writeFileSync(
'pages/_comparison-benchmark.md',
`# Result
Run at ${new Date().toUTCString()}
Commit: ${execSync('git rev-parse HEAD').toString()}
${summary.results
.sort((a, b) => a.percentSlower - b.percentSlower)
.map(
(options) => `
${options.name.split('-').join(' ').toUpperCase()}
Operations: ${options.ops}/s
Network requests: ${data[options.name]} of ${runs[options.name]}
Performance: ${100 - Math.round(options.percentSlower)}%`
)
.join('\n')}
`
);
})
);
78 changes: 0 additions & 78 deletions docs/js/benchmark.js

This file was deleted.

5 changes: 3 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"private": true,
"scripts": {
"serve": "docsify serve",
"bench": "node js/benchmark.js > pages/_comparison-benchmark.log"
"bench": "node benchmark.js"
},
"devDependencies": {
"axios": "^0.25.0",
"axios-cache-adapter": "^2.7.3",
"docsify-cli": "^4.4.3",
"express": "^4.17.2"
"express": "^4.17.2",
"benny": "^3.7.1"
}
}
25 changes: 0 additions & 25 deletions docs/pages/_comparison-benchmark.log

This file was deleted.

20 changes: 20 additions & 0 deletions docs/pages/_comparison-benchmark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Result

Run at Fri, 04 Feb 2022 10:58:25 GMT
Commit: 1f884e9de54aae06d64fa8359bbc0b562799ffb6


CACHE INTERCEPTOR
Operations: 42334/s
Network requests: 1 of 206287
Performance: 100%

CACHE ADAPTER
Operations: 35034/s
Network requests: 2 of 170895
Performance: 83%

AXIOS
Operations: 1646/s
Network requests: 8409 of 8409
Performance: 4%
Loading

0 comments on commit f50e6ee

Please sign in to comment.