File tree Expand file tree Collapse file tree 5 files changed +23
-5
lines changed
Expand file tree Collapse file tree 5 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ karma.conf.js
99.editorconfig
1010browserslist
1111.cache
12+ travis
1213.travis.yml
1314tests
1415tsconfig.json
Original file line number Diff line number Diff line change 99 firefox : latest
1010script :
1111 - yarn test
12+ before_deploy :
13+ - export DIST_TAG=$(node travis/getNpmDistTag.js)
14+ - " echo NPM DIST TAG: $DIST_TAG"
1215deploy :
1316 provider : npm
1417@@ -19,3 +22,4 @@ deploy:
1922 repo : ZeeCoder/use-resize-observer
2023 branch : master
2124 skip_cleanup : true
25+ tag : ${DIST_TAG}
Original file line number Diff line number Diff line change 11# CHANGELOG
22
3- ## 6.2.0-alpha1
3+ ## 6.2.0-alpha.1
44
55- Only instantiating a ResizeObserver instance if there's actually something to
66 observe. This for example means that if you pass in ` null ` or undefined as the
2626
2727- No changes, only publishing the next minor.
2828
29- ## 6.1.0-alpha3
29+ ## 6.1.0-alpha.3
3030
3131- Fixed SSR rendering, and added a test to cover it.
3232
33- ## 6.1.0-alpha2
33+ ## 6.1.0-alpha.2
3434
3535- ResizeObserver instances are no longer created unnecessarily when the onResize
3636 callback changes. (Fixes #32 )
3737- Written new tests in [ react testing library] ( https://github.com/testing-library/react-testing-library ) .
3838
39- ## 6.1.0-alpha1
39+ ## 6.1.0-alpha.1
4040
4141- Rewrote the source in TypeScript. (Feedback is welcome.)
4242- Rewrote tests in TypeScript as well. (Ensures the types make sense.)
Original file line number Diff line number Diff line change 11{
22 "name" : " use-resize-observer" ,
3- "version" : " 6.2.0-alpha1 " ,
3+ "version" : " 6.2.0-alpha.1 " ,
44 "main" : " dist/bundle.cjs.js" ,
55 "module" : " dist/bundle.esm.js" ,
66 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+
3+ const version = require ( "../package.json" ) . version ;
4+
5+ // Extracting the dist tag, assuming that it would look something like this:
6+ // `1.2.3-alpha.1`
7+ const matches = version . match ( / ^ [ ^ - ] * - ( [ ^ . ] + ) .* $ / ) ;
8+
9+ // "latest" is default.
10+ // See: https://docs.npmjs.com/adding-dist-tags-to-packages
11+ const distTag = matches ? matches [ 1 ] : "latest" ;
12+
13+ process . stdout . write ( distTag ) ;
You can’t perform that action at this time.
0 commit comments