Skip to content

Commit b5bfe4d

Browse files
authored
Remove @pika/pack (#509)
😢
1 parent ccd3bbb commit b5bfe4d

19 files changed

+7787
-16321
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.DS_Store
33
**/generated/*.ts
44
coverage
5-
pkg
5+
dist
66
node_modules
77
yarn.lock
88
yarn-error.log

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ If you’ve added a feature or fixed a bug and need to update the generated sche
5151
# 1. re-build the package
5252
npm run build
5353
# 2. run the local CLI (not the npm one!)
54-
pkg/bin/cli.js tests/v3/specs/github.yaml -o tests/v3/expected/github.ts
54+
./bin/cli.js tests/v3/specs/github.yaml -o tests/v3/expected/github.ts
5555
```
5656
5757
This should update the expected TypeScript definiton.

bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const fs = require("fs");
44
const { bold, green, red } = require("kleur");
55
const path = require("path");
66
const meow = require("meow");
7-
const { default: swaggerToTS } = require("../dist-node");
7+
const { default: swaggerToTS } = require("../dist/cjs/index.js");
88
const { loadSpec } = require("./loaders");
99

1010
const cli = meow(

package-lock.json

Lines changed: 7725 additions & 16259 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
11
{
22
"name": "openapi-typescript",
33
"description": "Generate TypeScript types from Swagger OpenAPI specs",
4-
"main": "dist/cjs",
54
"version": "3.0.4",
65
"engines": {
76
"node": ">= 10.0.0"
87
},
8+
"author": "[email protected]",
9+
"license": "ISC",
910
"bin": {
1011
"openapi-typescript": "bin/cli.js"
1112
},
13+
"main": "./dist/cjs/index.js",
14+
"module": "./dist/esm/index.js",
15+
"exports": {
16+
"browser": "./dist/esm/index.js",
17+
"import": "./dist/esm/index.js",
18+
"require": "./dist/cjs/index.js"
19+
},
20+
"files": [
21+
"bin",
22+
"dist",
23+
"src",
24+
"types"
25+
],
26+
"types": "./types/index.d.ts",
1227
"repository": {
1328
"type": "git",
1429
"url": "https://github.com/drwpow/openapi-typescript"
@@ -24,33 +39,12 @@
2439
"openapi 3",
2540
"node"
2641
],
27-
"author": "[email protected]",
28-
"license": "ISC",
2942
"bugs": {
3043
"url": "https://github.com/drwpow/openapi-typescript/issues"
3144
},
3245
"homepage": "https://github.com/drwpow/openapi-typescript#readme",
33-
"@pika/pack": {
34-
"pipeline": [
35-
[
36-
"@pika/plugin-ts-standard-pkg"
37-
],
38-
[
39-
"@pika/plugin-build-node"
40-
],
41-
[
42-
"@pika/plugin-copy-assets",
43-
{
44-
"files": [
45-
"bin/"
46-
]
47-
}
48-
]
49-
]
50-
},
5146
"scripts": {
52-
"build": "pika-pack build",
53-
"deploy": "npm run build && pika publish",
47+
"build": "rm -rf dist && tsc --build tsconfig.json && tsc --build tsconfig.cjs.json",
5448
"format": "yarn prettier -w .",
5549
"lint": "eslint --ignore-path .gitignore --ext .js,.ts src",
5650
"pregenerate": "npm run build",
@@ -67,13 +61,8 @@
6761
"prettier": "^2.2.1"
6862
},
6963
"devDependencies": {
70-
"@pika/pack": "^0.5.0",
71-
"@pika/plugin-build-node": "^0.9.2",
72-
"@pika/plugin-copy-assets": "^0.9.2",
73-
"@pika/plugin-ts-standard-pkg": "^0.9.2",
7464
"@types/jest": "^26.0.14",
7565
"@types/js-yaml": "^4.0.0",
76-
"@types/prettier": "^2.1.5",
7766
"@typescript-eslint/eslint-plugin": "^4.4.1",
7867
"@typescript-eslint/parser": "^4.4.1",
7968
"codecov": "^3.8.1",

src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import path from "path";
22
import prettier from "prettier";
33
import { swaggerVersion } from "./utils";
44
import { transformAll } from "./transform/index";
5-
import { OpenAPI2, OpenAPI3, SchemaObject, SwaggerToTSOptions } from "./types/index";
6-
export * from "./types/index";
75

86
export const WARNING_MESSAGE = `/**
97
* This file was auto-generated by openapi-typescript.

src/transform/headers.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { comment } from "../utils";
2-
import { HeaderObject } from "../types";
32
import { transformSchemaObj } from "./schema";
43

54
export function transformHeaderObjMap(headerMap: Record<string, HeaderObject>): string {

src/transform/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { OperationObject } from "../types";
21
import { comment } from "../utils";
32
import { transformHeaderObjMap } from "./headers";
43
import { transformOperationObj } from "./operation";

src/transform/operation.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { OperationObject, ParameterObject, RequestBody } from "../types";
21
import { comment, isRef, transformRef } from "../utils";
32
import { transformParametersArray } from "./parameters";
43
import { transformResponsesObj } from "./responses";

src/transform/parameters.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { transformSchemaObj } from "./schema";
2-
import { ParameterObject, ReferenceObject } from "../types";
32
import { comment } from "../utils";
43

54
export function transformParametersArray(

0 commit comments

Comments
 (0)