-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: meet type module, deps revision
- Loading branch information
1 parent
65dcc4e
commit aa7cb97
Showing
11 changed files
with
2,355 additions
and
5,144 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,70 @@ | ||
language: node_js | ||
node_js: | ||
- '12' | ||
cache: yarn | ||
node_js: 14 | ||
install: skip | ||
os: linux | ||
dist: focal | ||
|
||
before_script: | ||
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
- chmod +x ./cc-test-reporter | ||
- ./cc-test-reporter before-build | ||
jobs: | ||
fast_finish: true | ||
include: | ||
- stage: verify | ||
if: branch != master AND type != pull_request | ||
install: yarn | ||
script: | ||
- yarn build | ||
- if [ "$CI_TEST" != "false" ]; then | ||
yarn test; | ||
fi | ||
- stage: build | ||
if: branch = master | ||
install: yarn | ||
script: | ||
- yarn build | ||
- chmod -R 777 target | ||
# https://docs.travis-ci.com/user/using-workspaces/ | ||
workspaces: | ||
create: | ||
name: linux-shared | ||
paths: | ||
- target | ||
- flow-typed | ||
- typings | ||
- docs | ||
- node_modules | ||
|
||
after_script: | ||
- ./cc-test-reporter format-coverage -t lcov ./coverage/lcov.info | ||
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT | ||
- &test | ||
if: branch = master AND type = pull_request AND env(CI_TEST) != false | ||
stage: test | ||
install: skip | ||
script: yarn test | ||
workspaces: | ||
use: linux-shared | ||
- <<: *test | ||
node_js: 12 | ||
- <<: *test | ||
if: branch = master AND type != pull_request AND env(CI_TEST) != false | ||
before_script: | ||
- if [ "$CC_TEST_REPORTER_ID" != "" ]; then | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter; | ||
chmod +x ./cc-test-reporter; | ||
./cc-test-reporter before-build; | ||
fi | ||
script: | ||
- if [ "$CC_TEST_REPORTER_ID" != "" ]; then | ||
yarn test:report; | ||
else | ||
yarn test; | ||
fi | ||
after_script: | ||
- if [ "$CC_TEST_REPORTER_ID" != "" ]; then | ||
./cc-test-reporter format-coverage -t lcov ./coverage/lcov.info; | ||
./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; | ||
fi | ||
|
||
install: | ||
- yarn cache clean | ||
- yarn | ||
|
||
script: | ||
- yarn run build | ||
- chmod -R 777 target | ||
- yarn test:report | ||
|
||
deploy: | ||
provider: script | ||
skip_cleanup: true | ||
script: | ||
- npx semantic-release | ||
- stage: release | ||
if: branch = master AND type != pull_request AND env(CI_RELEASE) = true | ||
workspaces: | ||
use: linux-shared | ||
install: skip | ||
script: npx -p @qiwi/semrel-toolkit semrel -e @qiwi/semrel-config |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
"bin": { | ||
"qiwilicense": "target/es5/cli.js" | ||
}, | ||
"type": "module", | ||
"main": "target/bundle/license.js", | ||
"module": "target/bundle/license.mjs", | ||
"unpkg": "target/bundle/license.umd.js", | ||
|
@@ -21,22 +22,25 @@ | |
"flow-typed" | ||
], | ||
"scripts": { | ||
"jest": "jest -w 1 --config=jest.config.json", | ||
"lint": "tslint -p tsconfig.test.json src/**/*.ts", | ||
"lint:fix": "yarn lint --fix", | ||
"test": "yarn lint && yarn jest", | ||
"test": "yarn lint && yarn test:unit", | ||
"test:unit": "jest", | ||
"clean": "rimraf target typings", | ||
"build": "yarn clean && yarn build:tpl && yarn build:es5 && yarn build:es6 && yarn build:ts && yarn build:libdef && yarn docs && yarn uglify && yarn build:bundle", | ||
"build:fix-import-ext": "find target/es5 target/es6 -type f -name '*.js' -print0 | xargs -0 sed -i '' -E \"s/from '(\\.\\/[^']+)';$/from '\\1.js';/g\"", | ||
"build:fix-module-dirname": "find target/es5 target/es6 -type f -name '*.js' -print0 | xargs -0 sed -i '' -E \"s/__dirname/\\/file:\\\\\\\\\\\\/\\\\\\\\\\\\/(.+)\\\\\\\\\\\\/\\[^\\/\\]\\/.exec(import.meta.url)[1]/g\"", | ||
"build:fix": "yarn build:fix-import-ext && yarn build:fix-module-dirname", | ||
"build": "yarn clean && yarn build:tpl && yarn build:es5 && yarn build:es6 && yarn build:fix && yarn build:ts && yarn build:libdef && yarn docs && yarn uglify && yarn build:bundle", | ||
"build:tpl": "mkdir -p target/tpl && cp src/main/tpl/* target/tpl", | ||
"build:es5": "mkdir -p target/es5 && tsc -p tsconfig.es5.json", | ||
"build:es6": "mkdir -p target/es6 && tsc -p tsconfig.es6.json", | ||
"build:ts": "cp -r src/main/ts/ target/ts/", | ||
"build:bundle": "microbundle build src/main/ts/index.ts -o target/bundle", | ||
"build:libdef": "dts-generator --project ./ --out typings/index.d.ts --prefix @qiwi/license/target/es5 --name @qiwi/license --main @qiwi/license/target/es5/index --moduleResolution node && libdeffix --dts=./typings/index.d.ts --prefix=@qiwi/license/target/es5 && flowgen typings/index.d.ts --output-file flow-typed/index.flow.js", | ||
"build:libdef": "libdefkit --tsconfig=tsconfig.es5.json --tsconfig=tsconfig.es6.json", | ||
"test:report": "yarn test && yarn push:report", | ||
"push:report": "yarn coveralls:push", | ||
"coveralls:push": "cat ./coverage/lcov.info | coveralls", | ||
"docs": "typedoc --readme README.md --tsconfig tsconfig.json src/main --ignoreCompilerErrors || exit 0", | ||
"docs": "typedoc", | ||
"uglify": "for f in $(find target -name '*.js'); do short=${f%.js}; terser -c -m -o $short.js -- $f; done", | ||
"postupdate": "yarn && yarn build && yarn test" | ||
}, | ||
|
@@ -54,61 +58,33 @@ | |
}, | ||
"homepage": "https://github.com/qiwi/license#readme", | ||
"dependencies": { | ||
"@antongolub/git-root": "^1.5.4", | ||
"@qiwi/substrate": "^1.20.7", | ||
"@types/lodash": "^4.14.168", | ||
"@types/lodash-es": "^4.17.4", | ||
"@types/meow": "^6.0.0", | ||
"@types/read-pkg": "^5.1.0", | ||
"find-git-root": "^1.0.4", | ||
"lodash": "^4.17.21", | ||
"lodash-es": "^4.17.21", | ||
"meow": "^9.0.0", | ||
"read-pkg": "^6.0.0", | ||
"tslib": "^2.2.0" | ||
}, | ||
"devDependencies": { | ||
"@swissquote/crafty-preset-jest": "^1.14.0", | ||
"@qiwi/libdefkit": "^2.1.8", | ||
"@qiwi/semantic-release-gh-pages-plugin": "^5.0.7", | ||
"@semantic-release/changelog": "^5.0.1", | ||
"@semantic-release/git": "^9.0.0", | ||
"@semantic-release/github": "^7.2.1", | ||
"@semantic-release/npm": "^7.1.1", | ||
"@types/jest": "^26.0.23", | ||
"@types/jest-json-schema": "^2.1.3", | ||
"coveralls": "^3.1.0", | ||
"eslint-plugin-typescript": "^0.14.0", | ||
"esm": "^3.2.25", | ||
"execa": "^5.0.0", | ||
"jest": "^26.6.3", | ||
"lodash": "^4.17.15", | ||
"microbundle": "^0.13.0", | ||
"rimraf": "^3.0.2", | ||
"semantic-release": "^17.4.2", | ||
"terser": "^5.7.0", | ||
"ts-jest": "^26.5.5", | ||
"tslint": "^6.1.3", | ||
"tslint-config-qiwi": "^1.7.0", | ||
"typedoc": "^0.20.36", | ||
"typedoc-plugin-external-module-name": "^4.0.6", | ||
"typescript": "^4.2.4", | ||
"typescript-eslint-parser": "^22.0.0" | ||
}, | ||
"release": { | ||
"branch": "master", | ||
"verifyConditions": [ | ||
"@semantic-release/changelog", | ||
"@semantic-release/npm", | ||
"@semantic-release/git", | ||
"@qiwi/semantic-release-gh-pages-plugin" | ||
], | ||
"prepare": [ | ||
"@semantic-release/changelog", | ||
"@semantic-release/npm", | ||
"@semantic-release/git" | ||
], | ||
"publish": [ | ||
"@semantic-release/npm", | ||
"@semantic-release/github", | ||
"@qiwi/semantic-release-gh-pages-plugin" | ||
] | ||
"typescript": "^4.2.4" | ||
}, | ||
"author": "QIWI <[email protected]>", | ||
"contributors": [ | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es6", | ||
"outDir": "target/es6" | ||
"target": "es5", | ||
"outDir": "target/es5" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es5", | ||
"outDir": "target/es5" | ||
"target": "es6", | ||
"outDir": "target/es6" | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,8 @@ | |
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
], | ||
"compilerOptions": { | ||
"module": "es2020" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
{ | ||
"name": "protopipe", | ||
"mode": "modules", | ||
"out": "./docs", | ||
"target": "ES6", | ||
"exclude": ["test", "node_modules"], | ||
"externalPattern": "**/node_modules/**", | ||
"excludePrivate": true, | ||
"excludeNotExported": true, | ||
"moduleResolution": "node", | ||
"module": "commonjs", | ||
"entryPoints": ["src/main"], | ||
"exclude": ["src/test", "**/node_modules/**"], | ||
"externalPattern": ["**/node_modules/**"], | ||
"excludePrivate": false, | ||
"hideGenerator": true, | ||
"readme": "none", | ||
"ignoreCompilerErrors": true | ||
"readme": "README.md", | ||
"theme": "minimal", | ||
"tsconfig": "./tsconfig.es5.json" | ||
} |
Oops, something went wrong.