Skip to content

Commit

Permalink
fix: comments to outputs and removed # path alias
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed Sep 1, 2021
1 parent cc6332f commit 4592d18
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 32 deletions.
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/dist
/ignore
/node_modules
8 changes: 4 additions & 4 deletions src/axios/cache.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { applyRequestInterceptor } from '#/interceptors/request';
import { applyResponseInterceptor } from '#/interceptors/response';
import { MemoryStorage } from '#/storage/memory';
import { defaultKeyGenerator } from '#/utils/key-generator';
import { applyRequestInterceptor } from '../interceptors/request';
import { applyResponseInterceptor } from '../interceptors/response';
import { MemoryStorage } from '../storage/memory';
import { defaultKeyGenerator } from '../utils/key-generator';
import { AxiosInstance } from 'axios';
import { AxiosCacheInstance, CacheInstance, CacheRequestConfig } from './types';

Expand Down
2 changes: 1 addition & 1 deletion src/axios/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CacheStorage } from '#/storage/types';
import { CacheStorage } from '../storage/types';
import type {
AxiosInstance,
AxiosInterceptorManager,
Expand Down
6 changes: 3 additions & 3 deletions src/interceptors/request.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { AxiosCacheInstance } from '#/axios/types';
import { AxiosCacheInstance } from '../axios/types';
import {
CACHED_RESPONSE_STATUS,
CACHED_RESPONSE_STATUS_TEXT
} from '#/constants';
import { Deferred } from '#/utils/deferred';
} from '../constants';
import { Deferred } from '../utils/deferred';

export function applyRequestInterceptor(axios: AxiosCacheInstance) {
axios.interceptors.request.use(async (config) => {
Expand Down
2 changes: 1 addition & 1 deletion src/interceptors/response.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AxiosCacheInstance } from '#/axios/types';
import { AxiosCacheInstance } from '../axios/types';
import { parse } from '@tusbar/cache-control';

export function applyResponseInterceptor(axios: AxiosCacheInstance) {
Expand Down
2 changes: 1 addition & 1 deletion src/storage/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Deferred } from '#/utils/deferred';
import { Deferred } from '../utils/deferred';

export interface CacheStorage {
/**
Expand Down
16 changes: 0 additions & 16 deletions src/test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/utils/key-generator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CacheRequestConfig } from '#/axios/types';
import { CacheRequestConfig } from '../axios/types';

export function defaultKeyGenerator({
baseURL,
Expand Down
6 changes: 2 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
"removeComments": true /* Do not emit comments to output. */,
// "removeComments": true /* Do not emit comments to output. */,
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
"downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */,
Expand All @@ -45,9 +45,7 @@
/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"baseUrl": "./" /* Base directory to resolve non-absolute module names. */,
"paths": {
"#/*": ["./src/*"]
} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
// "paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down

0 comments on commit 4592d18

Please sign in to comment.