Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: remove old libraries #234

Closed
wants to merge 12 commits into from
6 changes: 3 additions & 3 deletions src/fixtures/customTarget.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type { Target } from '../targets/index.js';

import { request } from '../targets/node/request/client.js';
import { axios } from '../targets/node/axios/client.js';

export const customTarget = {
info: {
key: 'js-variant',
title: 'JavaScript Variant',
extname: '.js',
default: 'request',
default: 'axios',
},
clientsById: {
request,
axios,
},
} as unknown as Target;
34 changes: 2 additions & 32 deletions src/helpers/__snapshots__/utils.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ exports[`availableTargets > returns all available targets 1`] = `
},
{
"clients": [
{
"description": "W3C Standard API that provides scripted client functionality",
"extname": ".js",
"key": "xhr",
"link": "https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest",
"title": "XMLHttpRequest",
},
{
"description": "Promise based HTTP client for the browser and node.js",
"extname": ".js",
Expand All @@ -150,7 +143,7 @@ exports[`availableTargets > returns all available targets 1`] = `
"title": "jQuery",
},
],
"default": "xhr",
"default": "fetch",
"key": "javascript",
"title": "JavaScript",
},
Expand Down Expand Up @@ -185,21 +178,6 @@ exports[`availableTargets > returns all available targets 1`] = `
{
"cli": "node %s",
"clients": [
{
"description": "Node.js native HTTP interface",
"extname": ".cjs",
"key": "native",
"link": "http://nodejs.org/api/http.html#http_http_request_options_callback",
"title": "HTTP",
},
{
"description": "Simplified HTTP request client",
"extname": ".cjs",
"installation": "npm install request --save",
"key": "request",
"link": "https://github.com/request/request",
"title": "Request",
},
{
"description": "Lightweight HTTP Request Client Library",
"extname": ".cjs",
Expand All @@ -215,16 +193,8 @@ exports[`availableTargets > returns all available targets 1`] = `
"link": "https://github.com/axios/axios",
"title": "Axios",
},
{
"description": "Simplified HTTP node-fetch client",
"extname": ".cjs",
"installation": "npm install node-fetch@2 --save",
"key": "fetch",
"link": "https://github.com/bitinn/node-fetch",
"title": "Fetch",
},
],
"default": "native",
"default": "axios",
"key": "node",
"title": "Node.js",
},
Expand Down
6 changes: 3 additions & 3 deletions src/targets/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,18 +266,18 @@ describe('addTarget', () => {
});

it('should add a new custom target', async () => {
const { fetch: fetchClient } = await import('./node/fetch/client');
const { axios: axiosClient } = await import('./node/axios/client');

const deno: Target = {
info: {
// @ts-expect-error intentionally incorrect
key: 'deno',
title: 'Deno',
extname: '.js',
default: 'fetch',
default: 'axios',
},
clientsById: {
fetch: fetchClient,
axios: axiosClient,
},
};

Expand Down
4 changes: 1 addition & 3 deletions src/targets/javascript/target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ import type { Target } from '../index.js';
import { axios } from './axios/client.js';
import { fetch } from './fetch/client.js';
import { jquery } from './jquery/client.js';
import { xhr } from './xhr/client.js';

export const javascript: Target = {
info: {
key: 'javascript',
title: 'JavaScript',
default: 'xhr',
default: 'fetch',
},

clientsById: {
xhr,
axios,
fetch,
jquery,
Expand Down
19 changes: 0 additions & 19 deletions src/targets/javascript/xhr/client.test.ts

This file was deleted.

102 changes: 0 additions & 102 deletions src/targets/javascript/xhr/client.ts

This file was deleted.

15 changes: 0 additions & 15 deletions src/targets/javascript/xhr/fixtures/application-form-encoded.js

This file was deleted.

34 changes: 0 additions & 34 deletions src/targets/javascript/xhr/fixtures/application-json.js

This file was deleted.

15 changes: 0 additions & 15 deletions src/targets/javascript/xhr/fixtures/cookies.js

This file was deleted.

13 changes: 0 additions & 13 deletions src/targets/javascript/xhr/fixtures/cors.js

This file was deleted.

14 changes: 0 additions & 14 deletions src/targets/javascript/xhr/fixtures/custom-method.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/targets/javascript/xhr/fixtures/full.js

This file was deleted.

18 changes: 0 additions & 18 deletions src/targets/javascript/xhr/fixtures/headers.js

This file was deleted.

Loading