This repository was archived by the owner on Sep 21, 2022. It is now read-only.
Open
Conversation
5bc4e17 to
a44c3d4
Compare
Contributor
Author
|
Запушил вариант с переименование файлов, теперь если смотреть ПР по коммитам, то можно смотреть на изменения, а не проверять файл целиком. |
added 22 commits
February 14, 2022 13:22
a44c3d4 to
96bc669
Compare
Contributor
Author
|
Запушил для запуска проверок |
miripiruni
reviewed
Feb 16, 2022
| "proxyquire": "^1.7.3", | ||
| "sinon": "^2.2.0" | ||
| "sinon": "^2.2.0", | ||
| "typescript": "^4.5.5" |
Member
There was a problem hiding this comment.
It would be better to pin exact versions (even in devDeps).
| "prepare-calibrate-script": "uglifyjs ./lib/browser/client-scripts/calibrate.js -m > ./lib/browser/client-scripts/calibrate.min.js --support-ie8", | ||
| "build": "tsc -p tsconfig.json", | ||
| "postbuild": "npm run prepare-calibrate-script", | ||
| "prepare-calibrate-script": "uglifyjs ./build/lib/browser/client-scripts/calibrate.js -m > ./build/lib/browser/client-scripts/calibrate.min.js --support-ie8", |
Member
There was a problem hiding this comment.
Can we get rid of prepare-calibrate-script and place it's script to postbuild?
| "prepare-calibrate-script": "uglifyjs ./build/lib/browser/client-scripts/calibrate.js -m > ./build/lib/browser/client-scripts/calibrate.min.js --support-ie8", | ||
| "test-unit": "mocha test", | ||
| "test": "npm run lint && npm run test-unit", | ||
| "pretest": "npm run build", |
Member
There was a problem hiding this comment.
Why we must always build project before run tests?
| "test-unit": "mocha test", | ||
| "test": "npm run lint && npm run test-unit", | ||
| "pretest": "npm run build", | ||
| "test": "run-s lint test-unit", |
Member
There was a problem hiding this comment.
Suggestion: add command for run unit tests only.
OldSkyTree
commented
Feb 19, 2022
Comment on lines
+4
to
+5
| import options from "./lib/config/options"; | ||
| export const config = { options }; |
Contributor
Author
There was a problem hiding this comment.
Такая махинация нужна, чтобы сохранить API, но понял, что можно сделать лучше так:
- добавить файл
./lib/config/index.tsс содержимымexport * as options from "./options"; - здесь оставить лишь
export * as config from "./lib/config";
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что сделано
Переписал пакет на
typescript. Из нюансов:tsconfig.json. Первый в корень, второй – вlib/browser/client-scripts. Это нужно, так как клиентские скрипты нужно собирать дляES3.lib/browser/client-scripts/polyfills.transformпакетаbrowserify(ссылка на текущий код, ссылка на новый). Пакет поддерживает оба варианта передачи аргументов, но тайпинги из пакета@types/browserifyпозволяют использовать лишь один вариант. Предпочел сменить порядок аргументов, чем делать пулл-реквест в тайпинги.jest.