From 111af34a5c1c84b8ca398b0a049304c4b4331303 Mon Sep 17 00:00:00 2001 From: Viachaslau Tyshkavets Date: Mon, 13 Sep 2021 18:30:06 +0300 Subject: [PATCH 1/7] fix(build): cross-platform fixes - utilizing cross-env - rollup workaround (rollup/rollup-plugin-commonjs/issues/361#issuecomment-445214136) --- packages/capture/package.json | 2 +- packages/oas/package.json | 2 +- packages/openapi-sampler/package.json | 2 +- packages/validator/package.json | 2 +- rollup.config.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/capture/package.json b/packages/capture/package.json index 26ab4f65..87880021 100644 --- a/packages/capture/package.json +++ b/packages/capture/package.json @@ -32,7 +32,7 @@ "compile": "tsc -b tsconfig.build.json", "lint": "eslint --ignore-path ../../.eslintignore .", "format": "prettier --ignore-path ../../.prettierignore --check .", - "test": "NODE_ENV=test mocha tests/**/*.spec.ts", + "test": "cross-env NODE_ENV=test mocha tests/**/*.spec.ts", "coverage": "nyc npm t -- --reporter xunit --reporter-options output=.mocha/testspec.xunit.xml" }, "keywords": [ diff --git a/packages/oas/package.json b/packages/oas/package.json index 67a752fe..4b7abfbf 100644 --- a/packages/oas/package.json +++ b/packages/oas/package.json @@ -32,7 +32,7 @@ "compile": "tsc -b tsconfig.build.json", "lint": "eslint --ignore-path ../../.eslintignore .", "format": "prettier --ignore-path ../../.prettierignore --check .", - "test": "NODE_ENV=test mocha tests/**/*.spec.ts", + "test": "cross-env NODE_ENV=test mocha tests/**/*.spec.ts", "coverage": "nyc npm t -- --reporter xunit --reporter-options output=.mocha/testspec.xunit.xml" }, "keywords": [ diff --git a/packages/openapi-sampler/package.json b/packages/openapi-sampler/package.json index 76a63eb1..2d5b23b3 100644 --- a/packages/openapi-sampler/package.json +++ b/packages/openapi-sampler/package.json @@ -32,7 +32,7 @@ "compile": "tsc -b tsconfig.build.json", "lint": "eslint --ignore-path ../../.eslintignore .", "format": "prettier --ignore-path ../../.prettierignore --check .", - "test": "NODE_ENV=test mocha tests/**/*.spec.ts", + "test": "cross-env NODE_ENV=test mocha tests/**/*.spec.ts", "coverage": "nyc npm t -- --reporter xunit --reporter-options output=.mocha/testspec.xunit.xml" }, "keywords": [ diff --git a/packages/validator/package.json b/packages/validator/package.json index d6215524..c01fec2c 100644 --- a/packages/validator/package.json +++ b/packages/validator/package.json @@ -32,7 +32,7 @@ "compile": "tsc -b tsconfig.build.json", "lint": "eslint --ignore-path ../../.eslintignore .", "format": "prettier --ignore-path ../../.prettierignore --check .", - "test": "NODE_ENV=test mocha tests/**/*.spec.ts", + "test": "cross-env NODE_ENV=test mocha tests/**/*.spec.ts", "coverage": "nyc npm t -- --reporter xunit --reporter-options output=.mocha/testspec.xunit.xml" }, "keywords": [ diff --git a/rollup.config.js b/rollup.config.js index b408673b..357336c7 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -15,7 +15,7 @@ export default { plugins: [ json(), resolve({ preferBuiltins: false }), - commonjs({ include: 'node_modules/**' }), + commonjs({ include: /node_modules/ }), typescript({ clean: true, tsconfig: 'tsconfig.build.json' From fa32dfa902dee856411f5033ff6d200bf9dbc0e0 Mon Sep 17 00:00:00 2001 From: Viachaslau Tyshkavets Date: Wed, 15 Sep 2021 10:36:51 +0300 Subject: [PATCH 2/7] fix(build): proper version of types package in validator package --- packages/validator/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/validator/package.json b/packages/validator/package.json index c01fec2c..a3cc92ce 100644 --- a/packages/validator/package.json +++ b/packages/validator/package.json @@ -44,7 +44,7 @@ "json" ], "dependencies": { - "@har-sdk/types": "*", + "@har-sdk/types": "^1.0.0", "ajv": "^8.6.0", "ajv-formats": "^2.1.0", "semver": "^7.3.5", From 36cad70bccc44de93a3c3bbab0805c46151dc2a9 Mon Sep 17 00:00:00 2001 From: Viachaslau Tyshkavets Date: Wed, 15 Sep 2021 10:43:15 +0300 Subject: [PATCH 3/7] fix(build): codeclimate eslint fix --- .codeclimate.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.codeclimate.yml b/.codeclimate.yml index 608dc290..94cc9521 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -26,6 +26,7 @@ checks: plugins: eslint: enabled: true + channel: "eslint-7" config: config: .eslintrc.js exclude_patterns: From 9210048dcd25affdd598c19c638da9249921ed1e Mon Sep 17 00:00:00 2001 From: Viachaslau Tyshkavets Date: Wed, 15 Sep 2021 10:53:57 +0300 Subject: [PATCH 4/7] fix(build): codeclimate - temp try with commented no-restricted-imports rule --- .eslintrc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index fdeb50fe..bd5fb171 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -172,7 +172,7 @@ module.exports = { peerDependencies: false } ], - 'no-restricted-imports': [ + /*'no-restricted-imports': [ 'error', { paths: [ @@ -187,7 +187,7 @@ module.exports = { } ] } - ], + ],*/ 'import/order': [ 'error', { From 9fc814b617593659b94fd42107f2cee94c9b8f25 Mon Sep 17 00:00:00 2001 From: Viachaslau Tyshkavets Date: Wed, 15 Sep 2021 17:55:09 +0300 Subject: [PATCH 5/7] fix(build): codeclimate - enable debug --- .github/workflows/auto-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auto-build.yml b/.github/workflows/auto-build.yml index 0497b910..a90a7585 100644 --- a/.github/workflows/auto-build.yml +++ b/.github/workflows/auto-build.yml @@ -70,6 +70,7 @@ jobs: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} with: coverageLocations: .coverage/lcov.info:lcov + debug: true release: if: ${{ github.ref == 'refs/heads/master' }} From 0fea8e49b04d5d41b6f004a9fcd254d404fb1b6a Mon Sep 17 00:00:00 2001 From: Viachaslau Tyshkavets Date: Wed, 15 Sep 2021 19:43:53 +0300 Subject: [PATCH 6/7] fix(build): codeclimate - experiments with config --- .codeclimate.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index 94cc9521..6fd16653 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -28,7 +28,9 @@ plugins: enabled: true channel: "eslint-7" config: - config: .eslintrc.js + config: ./.eslintrc.js + extensions: + - .ts exclude_patterns: - "**/dist/" - "**/node_modules/" From 00ea7078112e950b3560aed5d85f6a870fd59018 Mon Sep 17 00:00:00 2001 From: Viachaslau Tyshkavets Date: Wed, 15 Sep 2021 20:01:08 +0300 Subject: [PATCH 7/7] fix(build): revert no-restricted-imports rule changes --- .eslintrc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index bd5fb171..fdeb50fe 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -172,7 +172,7 @@ module.exports = { peerDependencies: false } ], - /*'no-restricted-imports': [ + 'no-restricted-imports': [ 'error', { paths: [ @@ -187,7 +187,7 @@ module.exports = { } ] } - ],*/ + ], 'import/order': [ 'error', {