Skip to content

Commit 3cd201c

Browse files
authored
Merge pull request #720 from Workfront/master-hb-rollup-upgrades-and-more
fix: upgrade to latest Rollup, switch to Yarn
2 parents ce6f2e0 + 8478eeb commit 3cd201c

File tree

11 files changed

+198326
-10144
lines changed

11 files changed

+198326
-10144
lines changed

.renovaterc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"extends": ["config:base"],
3-
"schedule": ["before 3am every weekend"],
3+
"stabilityDays": 3,
4+
"prCreation": "not-pending",
45
"automerge": true,
6+
"separateMinorPatch": true,
57
"major": {
68
"automerge": false
79
},

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ notifications:
55
on_failure: always
66
on_success: change
77
node_js:
8-
- "8"
8+
- "10"
99
- "lts/*"
1010

1111
env:

.yarn/releases/yarn-1.22.4.js

Lines changed: 192801 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
yarn-path ".yarn/releases/yarn-1.22.4.js"

README.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,34 @@ API documentation is available at [http://workfront.github.io/workfront-api/](ht
3838
A number of examples can be found under [examples](examples) directory. It includes examples for both [node](examples/node) and [browser](examples/browser) environments.
3939
In order to run these examples clone a copy of workfront-api repository:
4040

41-
git clone git://github.com/Workfront/workfront-api.git
41+
```shell script
42+
git clone git://github.com/Workfront/workfront-api.git
43+
```
4244

4345
#### Running [node](examples/node) examples
4446

4547
First enter into `workfront-api` directory and install all the dependencies:
4648

47-
48-
cd workfront-api
49-
npm install
49+
```
50+
cd workfront-api
51+
yarn
52+
```
5053

5154
Use `node` to run the examples. For examples:
5255

53-
node examples/node/get-user-count.js
56+
```
57+
node examples/node/get-user-count.js
58+
```
5459

5560
Each example script outputs all its results into console and contains comments in the source code explaining what is happening in more details.
5661

5762
#### Running [browser](examples/browser) examples
5863

5964
To start supplied webserver type:
6065

61-
npm start
66+
```shell script
67+
npm start
68+
```
6269

6370
Visit [http://localhost:8000/examples/browser/](http://localhost:8000/examples/browser/) to see list of all examples available for browser.
6471

@@ -70,11 +77,11 @@ We welcome contributions of all kinds from anyone. It can be either new example
7077

7178
A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful - thank you! Please make sure to check these points to make a good bug report:
7279

73-
1. **Use the GitHub issue search** — check if the issue has already been
74-
reported.
75-
2. **Isolate the problem** — ideally create a [reduced test
76-
case](https://css-tricks.com/reduced-test-cases/).
77-
3. A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report.
80+
1. **Use the GitHub issue search** — check if the issue has already been
81+
reported.
82+
1. **Isolate the problem** — ideally create a [reduced test
83+
case](https://css-tricks.com/reduced-test-cases/).
84+
1. A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report.
7885

7986
### Feature requests
8087

@@ -91,17 +98,17 @@ Licensed under the Apache License, Version 2.0.
9198
See the top-level file `LICENSE` and
9299
(http://www.apache.org/licenses/LICENSE-2.0).
93100

94-
[license-image]: http://img.shields.io/badge/license-APv2-blue.svg?style=flat
101+
[license-image]: http://img.shields.io/badge/license-APv2-blue.svg?style=flat-square
95102
[license-url]: LICENSE
96103
[npm-url]: https://www.npmjs.org/package/workfront-api
97-
[npm-version-image]: https://img.shields.io/npm/v/workfront-api.svg?style=flat
98-
[npm-downloads-image]: https://img.shields.io/npm/dm/workfront-api.svg?style=flat
104+
[npm-version-image]: https://img.shields.io/npm/v/workfront-api.svg?style=flat-square
105+
[npm-downloads-image]: https://img.shields.io/npm/dm/workfront-api.svg?style=flat-square
99106
[travis-url]: https://travis-ci.com/Workfront/workfront-api
100-
[travis-image]: https://img.shields.io/travis/Workfront/workfront-api.svg?style=flat
107+
[travis-image]: https://img.shields.io/travis/Workfront/workfront-api.svg?style=flat-square
101108
[codecov-url]: https://codecov.io/gh/Workfront/workfront-api
102109
[codecov-image]: https://codecov.io/gh/Workfront/workfront-api/branch/master/graph/badge.svg
103110
[code-climate-url]: https://codeclimate.com/github/Workfront/workfront-api
104-
[code-climate-image]: https://img.shields.io/codeclimate/github/Workfront/workfront-api.svg?style=flat
111+
[code-climate-image]: https://img.shields.io/codeclimate/maintainability/Workfront/workfront-api?style=flat-square
105112
[saucelabs-badge]: https://saucelabs.com/buildstatus/citizensas
106113
[saucelabs-url]: https://saucelabs.com/beta/builds/1b8be6f71455499c82f02afc881e6c14
107114
[saucelabs-matrix]: https://saucelabs.com/browser-matrix/citizensas.svg

karma.conf.js

Lines changed: 127 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const CI_MODE = process.env.CI_MODE
55

66
module.exports = function (config) {
77
config.set({
8-
98
// base path that will be used to resolve all patterns (eg. files, exclude)
109
basePath: '',
1110

@@ -21,8 +20,8 @@ module.exports = function (config) {
2120
'node_modules/should/should.js',
2221
{
2322
pattern: 'test/integration/*.spec.ts',
24-
watched: false
25-
}
23+
watched: false,
24+
},
2625
],
2726

2827
proxies: {
@@ -33,11 +32,11 @@ module.exports = function (config) {
3332
},
3433

3534
preprocessors: {
36-
'test/integration/*.spec.ts': ['rollup', 'sourcemap']
35+
'test/integration/*.spec.ts': ['rollup', 'sourcemap'],
3736
},
3837

3938
mime: {
40-
'text/x-typescript': ['ts']
39+
'text/x-typescript': ['ts'],
4140
},
4241

4342
rollupPreprocessor: {
@@ -48,19 +47,22 @@ module.exports = function (config) {
4847
globals: {
4948
'isomorphic-fetch': 'fetch',
5049
'fetch-mock': 'fetchMock',
51-
'should': 'should',
52-
}
50+
should: 'should',
51+
},
5352
},
5453
plugins: [
55-
require('rollup-plugin-node-resolve')(),
56-
require('rollup-plugin-json')(),
57-
require('rollup-plugin-typescript')(),
58-
],
59-
external: [
60-
'fetch-mock',
61-
'should',
62-
'isomorphic-fetch'
54+
require('@rollup/plugin-node-resolve')(),
55+
require('@rollup/plugin-json')(),
56+
require('@rollup/plugin-typescript')({
57+
tsconfig: false,
58+
allowSyntheticDefaultImports: true,
59+
resolveJsonModule: true,
60+
moduleResolution: 'node',
61+
target: 'es5',
62+
include: ['test/integration/*.spec.ts', 'src/*.ts'],
63+
}),
6364
],
65+
external: ['fetch-mock', 'should', 'isomorphic-fetch'],
6466
},
6567

6668
// level of logging
@@ -70,7 +72,7 @@ module.exports = function (config) {
7072
reporters: ['progress', 'coverage', 'remap-coverage'],
7173

7274
coverageReporter: {
73-
type: 'in-memory'
75+
type: 'in-memory',
7476
},
7577

7678
remapOptions: {
@@ -80,51 +82,131 @@ module.exports = function (config) {
8082
if (CI) {
8183
return {
8284
'text-summary': null,
83-
lcovonly: './coverage/lcov.info'
85+
lcovonly: './coverage/lcov.info',
8486
}
8587
}
8688
return {
8789
'text-summary': null,
8890
// to show summary in console
89-
html: './coverage'
91+
html: './coverage',
9092
}
9193
})(),
9294

9395
port: 9876,
9496
colors: true,
9597
autoWatch: false,
9698
browsers: ['PhantomJS'],
97-
singleRun: true
99+
singleRun: true,
98100
})
99101

100102
if (CI_MODE === 'saucelabs' && process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY) {
101103
const chrome = {
102-
'SL_Chrome_Latest': {version: 'latest', platform: 'OS X 10.11', browserName: 'chrome', base: 'SauceLabs'},
103-
'SL_Chrome_Latest-1': {version: 'latest-1', platform: 'OS X 10.11', browserName: 'chrome', base: 'SauceLabs'},
104-
'SL_Chrome_Latest-2': {version: 'latest-2', platform: 'OS X 10.11', browserName: 'chrome', base: 'SauceLabs'}
104+
SL_Chrome_Latest: {
105+
version: 'latest',
106+
platform: 'OS X 10.11',
107+
browserName: 'chrome',
108+
base: 'SauceLabs',
109+
},
110+
'SL_Chrome_Latest-1': {
111+
version: 'latest-1',
112+
platform: 'OS X 10.11',
113+
browserName: 'chrome',
114+
base: 'SauceLabs',
115+
},
116+
'SL_Chrome_Latest-2': {
117+
version: 'latest-2',
118+
platform: 'OS X 10.11',
119+
browserName: 'chrome',
120+
base: 'SauceLabs',
121+
},
105122
}
106123
const firefox = {
107-
'SL_Firefox_Latest': {version: 'latest', platform: 'OS X 10.11', browserName: 'firefox', base: 'SauceLabs'},
108-
'SL_Firefox_Latest-1': {version: 'latest-1', platform: 'OS X 10.11', browserName: 'firefox', base: 'SauceLabs'},
109-
'SL_Firefox_Latest-2': {version: 'latest-2', platform: 'OS X 10.11', browserName: 'firefox', base: 'SauceLabs'}
124+
SL_Firefox_Latest: {
125+
version: 'latest',
126+
platform: 'OS X 10.11',
127+
browserName: 'firefox',
128+
base: 'SauceLabs',
129+
},
130+
'SL_Firefox_Latest-1': {
131+
version: 'latest-1',
132+
platform: 'OS X 10.11',
133+
browserName: 'firefox',
134+
base: 'SauceLabs',
135+
},
136+
'SL_Firefox_Latest-2': {
137+
version: 'latest-2',
138+
platform: 'OS X 10.11',
139+
browserName: 'firefox',
140+
base: 'SauceLabs',
141+
},
110142
}
111143
const safari = {
112-
'SL_Safari_Latest': {version: 'latest', platform: 'OS X 10.12', browserName: 'safari', base: 'SauceLabs'},
113-
'SL_Safari_10': {version: '10.0', platform: 'OS X 10.11', browserName: 'safari', base: 'SauceLabs'},
114-
'SL_Safari_9': {version: '9.0', platform: 'OS X 10.11', browserName: 'safari', base: 'SauceLabs'}
144+
SL_Safari_Latest: {
145+
version: 'latest',
146+
platform: 'OS X 10.12',
147+
browserName: 'safari',
148+
base: 'SauceLabs',
149+
},
150+
SL_Safari_10: {
151+
version: '10.0',
152+
platform: 'OS X 10.11',
153+
browserName: 'safari',
154+
base: 'SauceLabs',
155+
},
156+
SL_Safari_9: {
157+
version: '9.0',
158+
platform: 'OS X 10.11',
159+
browserName: 'safari',
160+
base: 'SauceLabs',
161+
},
115162
}
116163
const ie = {
117-
'SL_InternetExplorer_11': {version: '11.0', platform: 'Windows 7', browserName: 'internet explorer', base: 'SauceLabs'},
118-
'SL_InternetExplorer_10': {version: '10.0', platform: 'Windows 7', browserName: 'internet explorer', base: 'SauceLabs'},
164+
SL_InternetExplorer_11: {
165+
version: '11.0',
166+
platform: 'Windows 7',
167+
browserName: 'internet explorer',
168+
base: 'SauceLabs',
169+
},
170+
SL_InternetExplorer_10: {
171+
version: '10.0',
172+
platform: 'Windows 7',
173+
browserName: 'internet explorer',
174+
base: 'SauceLabs',
175+
},
119176
}
120177
const edge = {
121-
'SL_Edge_Latest': {version: 'latest', platform: 'Windows 10', browserName: 'MicrosoftEdge', base: 'SauceLabs'},
122-
'SL_Edge_14': {version: '14.14393', platform: 'Windows 10', browserName: 'MicrosoftEdge', base: 'SauceLabs'},
123-
'SL_Edge_13': {version: '13.10586', platform: 'Windows 10', browserName: 'MicrosoftEdge', base: 'SauceLabs'}
178+
SL_Edge_Latest: {
179+
version: 'latest',
180+
platform: 'Windows 10',
181+
browserName: 'MicrosoftEdge',
182+
base: 'SauceLabs',
183+
},
184+
SL_Edge_14: {
185+
version: '14.14393',
186+
platform: 'Windows 10',
187+
browserName: 'MicrosoftEdge',
188+
base: 'SauceLabs',
189+
},
190+
SL_Edge_13: {
191+
version: '13.10586',
192+
platform: 'Windows 10',
193+
browserName: 'MicrosoftEdge',
194+
base: 'SauceLabs',
195+
},
124196
}
125197
const linux = {
126-
'SL_Chrome_Linux': {version: 'latest', platform: 'Linux', browserName: 'chrome', base: 'SauceLabs'},
127-
'SL_Firefox_Linux': {version: 'latest', platform: 'Linux', browserName: 'firefox', base: 'SauceLabs'},
198+
SL_Chrome_Linux: {
199+
version: 'latest',
200+
platform: 'Linux',
201+
browserName: 'chrome',
202+
base: 'SauceLabs',
203+
},
204+
SL_Firefox_Linux: {
205+
version: 'latest',
206+
platform: 'Linux',
207+
browserName: 'firefox',
208+
base: 'SauceLabs',
209+
},
128210
}
129211

130212
// Browsers to run on Sauce Labs
@@ -134,11 +216,16 @@ module.exports = function (config) {
134216
config.set({
135217
reporters: ['progress', 'saucelabs'],
136218
sauceLabs: {
137-
build: 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')',
219+
build:
220+
'TRAVIS #' +
221+
process.env.TRAVIS_BUILD_NUMBER +
222+
' (' +
223+
process.env.TRAVIS_BUILD_ID +
224+
')',
138225
connectOptions: {
139226
connectRetries: 1,
140227
doctor: true,
141-
verbose: true
228+
verbose: true,
142229
},
143230
commandTimeout: 300,
144231
idleTimeout: 600,
@@ -148,14 +235,14 @@ module.exports = function (config) {
148235
recordVideo: false,
149236
startConnect: false,
150237
testName: 'workfront-api',
151-
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER
238+
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
152239
},
153240
captureTimeout: 0,
154241
customLaunchers: customLaunchers,
155242

156243
// start these browsers
157244
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
158-
browsers: Object.keys(customLaunchers)
245+
browsers: Object.keys(customLaunchers),
159246
})
160247
}
161-
}
248+
}

0 commit comments

Comments
 (0)