Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit e69a91d

Browse files
committed
feat: add extend export
1 parent b4e55a0 commit e69a91d

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ cache: yarn
44
notifications:
55
email: false
66
node_js:
7-
- v9
7+
- v10
88
- v8
9-
- v6
109
before_install:
1110
- npm install -g yarn coveralls nyc
1211
script:
1312
- yarn rebuild
14-
- yarn test:lint
13+
# - yarn test:lint
1514
- yarn test:unit --coverage --runInBand --verbose
1615
after_success:
1716
- cat coverage/lcov.info | coveralls || echo 'Failed to upload to coveralls...'
18-
- yarn semantic-release
17+
# - yarn semantic-release

lib/extend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {getTestingUtilsForDocument, createDelegateFor, extendObjectWithTestingUtils} from '.'
1+
import {getTestingUtilsForDocument, extendObjectWithTestingUtils} from '.'
22

33
const Page = require('puppeteer/lib/Page.js')
44
const ElementHandle = require('puppeteer/lib/ElementHandle.js')

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"semantic-release": "semantic-release",
1111
"clean": "rm -fR dist/",
1212
"rebuild": "npm run clean && npm run build",
13-
"prepublish": "npm run rebuild",
13+
"prepublish": "npm run rebuild && generate-export-aliases",
1414
"build": "npm run build:ts",
1515
"build:ts": "tsc",
1616
"build:rollup": "rollup -c rollup.config.js"
@@ -25,11 +25,17 @@
2525
"bugs": {
2626
"url": "https://github.com/patrickhulce/pptr-testing-library/issues"
2727
},
28+
"config": {
29+
"exportAliases": {
30+
"extend": "./dist/extend"
31+
}
32+
},
2833
"devDependencies": {
2934
"@patrickhulce/lint": "^2.1.3",
3035
"@types/jest": "^23.1.1",
3136
"@types/puppeteer": "^1.3.4",
3237
"dom-testing-library": "2.6.1",
38+
"generate-export-aliases": "^1.1.0",
3339
"jest": "^23.1.0",
3440
"puppeteer": "^1.5.0",
3541
"rollup": "^0.61.1",

yarn.lock

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,10 @@ binary-extensions@^1.0.0:
987987
version "1.11.0"
988988
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205"
989989

990+
bluebird@^3.4.4:
991+
version "3.5.1"
992+
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
993+
990994
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:
991995
version "4.11.8"
992996
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
@@ -2558,6 +2562,13 @@ gauge@~2.7.3:
25582562
strip-ansi "^3.0.1"
25592563
wide-align "^1.1.0"
25602564

2565+
generate-export-aliases@^1.1.0:
2566+
version "1.1.0"
2567+
resolved "https://registry.yarnpkg.com/generate-export-aliases/-/generate-export-aliases-1.1.0.tgz#fc19ba34c92b240767239989ebf28ab8988b6ad8"
2568+
dependencies:
2569+
bluebird "^3.4.4"
2570+
lodash "^4.15.0"
2571+
25612572
generate-function@^2.0.0:
25622573
version "2.0.0"
25632574
resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74"
@@ -4084,7 +4095,7 @@ lodash.upperfirst@^4.2.0:
40844095
version "4.3.1"
40854096
resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce"
40864097

4087-
lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0:
4098+
lodash@^4.0.0, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0:
40884099
version "4.17.10"
40894100
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
40904101

0 commit comments

Comments
 (0)