diff --git a/cli.ts b/cli.ts index a6f696d..18451e1 100644 --- a/cli.ts +++ b/cli.ts @@ -33,6 +33,7 @@ import { YamlWriter } from './src/io/writer/YamlWriter'; import { Command } from 'commander'; import * as fs from 'fs'; +import { version } from './package.json'; const appName = 'Spec Transformer'; const optionNames = { @@ -49,7 +50,7 @@ const optionNames = { function buildCommand(): Command { const program = new Command(); - program.version('1.0.0') + program.version(version) .description(`${appName} CLI`) .option(`-i, --${optionNames.input} [value]`, 'Input file path') .option(`-if, --${optionNames.inputFormat} [value]`, 'Input file format. Supported formats: json, yaml. Default: yaml') diff --git a/dist/CHANGELOG.md b/dist/CHANGELOG.md deleted file mode 100644 index e64beb9..0000000 --- a/dist/CHANGELOG.md +++ /dev/null @@ -1,6 +0,0 @@ -## [1.7.26](https://github.com/ExpediaGroup/spec-transformer/compare/v1.7.25...v1.7.26) (2024-01-14) - - -### Bug Fixes - -* update package settings ([29c34fd](https://github.com/ExpediaGroup/spec-transformer/commit/29c34fd3fa92d8bc72b524b74eada13732f32146)) diff --git a/dist/package.json b/dist/package.json deleted file mode 100644 index 6301e7d..0000000 --- a/dist/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "name": "@expediagroup/spec-transformer", - "version": "1.7.26", - "description": "API Spec Transformer", - "repository": { - "type": "git", - "url": "https://github.com/ExpediaGroup/spec-transformer.git" - }, - "main": "index.js", - "types": "index.d.ts", - "bin": { - "lib": "index.js", - "cli": "cli.js" - }, - "scripts": { - "add-headers": "scripts/add-headers.sh", - "build": "rm -rf dist && npx tsc --pretty && rm -rf dist/test && cp package.json dist/package.json && cp README.md dist/README.md && cp LICENSE dist/LICENSE && cp CONTRIBUTING.md dist/CONTRIBUTING.md", - "start": "ts-node index.ts", - "test": "jest", - "semantic-release": "semantic-release" - }, - "keywords": [ - "openapi", - "api", - "specifications", - "transformer", - "specs", - "mapping" - ], - "author": "Expedia Group ", - "contributors": [ - "'Mohammad Noor' AbuKhleif (https://github.com/mohnoor94)", - "Osama Salman (https://github.com/osama-salman99)" - ], - "publishConfig": { - "access": "public" - }, - "license": "Apache-2.0", - "dependencies": { - "commander": "11.1.0", - "js-yaml": "4.1.0", - "openapi-to-postmanv2": "4.18.0", - "openapi3-ts": "4.2.1" - }, - "devDependencies": { - "@semantic-release/changelog": "6.0.3", - "@semantic-release/commit-analyzer": "11.1.0", - "@semantic-release/exec": "6.0.3", - "@semantic-release/git": "10.0.1", - "@semantic-release/github": "9.2.6", - "@semantic-release/npm": "11.0.2", - "@semantic-release/release-notes-generator": "12.1.0", - "@types/jest": "29.5.11", - "@types/js-yaml": "4.0.9", - "@types/node": "20.11.0", - "@types/openapi-to-postmanv2": "3.2.4", - "conventional-changelog-conventionalcommits": "7.0.2", - "jest": "29.7.0", - "prettier": "3.1.1", - "semantic-release": "22.0.12", - "ts-jest": "29.1.1", - "ts-node": "10.9.2", - "typescript": "5.3.3" - }, - "prettier": { - "singleQuote": true, - "printWidth": 120 - }, - "jest": { - "preset": "ts-jest", - "testEnvironment": "node", - "collectCoverage": true, - "coverageReporters": [ - "json", - "text", - "lcov", - "clover", - "json-summary" - ], - "testMatch": [ - "**/test/**/*.test.ts" - ], - "coverageThreshold": { - "global": { - "statements": 90, - "branches": 90, - "functions": 90, - "lines": 90 - } - } - }, - "bugs": { - "url": "https://github.com/ExpediaGroup/spec-transformer/issues" - }, - "homepage": "https://github.com/ExpediaGroup/spec-transformer#readme" -} diff --git a/release.config.js b/release.config.js index 7d19e43..e259269 100644 --- a/release.config.js +++ b/release.config.js @@ -39,7 +39,7 @@ module.exports = { [ '@semantic-release/exec', { - successCmd: 'mv CHANGELOG.md ../CHANGELOG.md && mv package.json ../package.json', + successCmd: 'mv CHANGELOG.md ../CHANGELOG.md && mv package.json ../package.json && echo "DONEEE"', } ] ] diff --git a/tsconfig.json b/tsconfig.json index 05888dd..5eb3ea8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -42,7 +42,7 @@ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ + "resolveJsonModule": true, /* Enable importing .json files. */ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */