Skip to content

Commit

Permalink
Merge pull request #720 from Workfront/master-hb-rollup-upgrades-and-…
Browse files Browse the repository at this point in the history
…more

fix: upgrade to latest Rollup, switch to Yarn
  • Loading branch information
bhovhannes authored May 7, 2020
2 parents ce6f2e0 + 8478eeb commit 3cd201c
Show file tree
Hide file tree
Showing 11 changed files with 198,326 additions and 10,144 deletions.
4 changes: 3 additions & 1 deletion .renovaterc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"extends": ["config:base"],
"schedule": ["before 3am every weekend"],
"stabilityDays": 3,
"prCreation": "not-pending",
"automerge": true,
"separateMinorPatch": true,
"major": {
"automerge": false
},
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ notifications:
on_failure: always
on_success: change
node_js:
- "8"
- "10"
- "lts/*"

env:
Expand Down
192,801 changes: 192,801 additions & 0 deletions .yarn/releases/yarn-1.22.4.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1

yarn-path ".yarn/releases/yarn-1.22.4.js"
39 changes: 23 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,34 @@ API documentation is available at [http://workfront.github.io/workfront-api/](ht
A number of examples can be found under [examples](examples) directory. It includes examples for both [node](examples/node) and [browser](examples/browser) environments.
In order to run these examples clone a copy of workfront-api repository:

git clone git://github.com/Workfront/workfront-api.git
```shell script
git clone git://github.com/Workfront/workfront-api.git
```

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

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


cd workfront-api
npm install
```
cd workfront-api
yarn
```

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

node examples/node/get-user-count.js
```
node examples/node/get-user-count.js
```

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

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

To start supplied webserver type:

npm start
```shell script
npm start
```

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

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

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:

1. **Use the GitHub issue search** — check if the issue has already been
reported.
2. **Isolate the problem** — ideally create a [reduced test
case](https://css-tricks.com/reduced-test-cases/).
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.
1. **Use the GitHub issue search** — check if the issue has already been
reported.
1. **Isolate the problem** — ideally create a [reduced test
case](https://css-tricks.com/reduced-test-cases/).
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.

### Feature requests

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

[license-image]: http://img.shields.io/badge/license-APv2-blue.svg?style=flat
[license-image]: http://img.shields.io/badge/license-APv2-blue.svg?style=flat-square
[license-url]: LICENSE
[npm-url]: https://www.npmjs.org/package/workfront-api
[npm-version-image]: https://img.shields.io/npm/v/workfront-api.svg?style=flat
[npm-downloads-image]: https://img.shields.io/npm/dm/workfront-api.svg?style=flat
[npm-version-image]: https://img.shields.io/npm/v/workfront-api.svg?style=flat-square
[npm-downloads-image]: https://img.shields.io/npm/dm/workfront-api.svg?style=flat-square
[travis-url]: https://travis-ci.com/Workfront/workfront-api
[travis-image]: https://img.shields.io/travis/Workfront/workfront-api.svg?style=flat
[travis-image]: https://img.shields.io/travis/Workfront/workfront-api.svg?style=flat-square
[codecov-url]: https://codecov.io/gh/Workfront/workfront-api
[codecov-image]: https://codecov.io/gh/Workfront/workfront-api/branch/master/graph/badge.svg
[code-climate-url]: https://codeclimate.com/github/Workfront/workfront-api
[code-climate-image]: https://img.shields.io/codeclimate/github/Workfront/workfront-api.svg?style=flat
[code-climate-image]: https://img.shields.io/codeclimate/maintainability/Workfront/workfront-api?style=flat-square
[saucelabs-badge]: https://saucelabs.com/buildstatus/citizensas
[saucelabs-url]: https://saucelabs.com/beta/builds/1b8be6f71455499c82f02afc881e6c14
[saucelabs-matrix]: https://saucelabs.com/browser-matrix/citizensas.svg
167 changes: 127 additions & 40 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const CI_MODE = process.env.CI_MODE

module.exports = function (config) {
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',

Expand All @@ -21,8 +20,8 @@ module.exports = function (config) {
'node_modules/should/should.js',
{
pattern: 'test/integration/*.spec.ts',
watched: false
}
watched: false,
},
],

proxies: {
Expand All @@ -33,11 +32,11 @@ module.exports = function (config) {
},

preprocessors: {
'test/integration/*.spec.ts': ['rollup', 'sourcemap']
'test/integration/*.spec.ts': ['rollup', 'sourcemap'],
},

mime: {
'text/x-typescript': ['ts']
'text/x-typescript': ['ts'],
},

rollupPreprocessor: {
Expand All @@ -48,19 +47,22 @@ module.exports = function (config) {
globals: {
'isomorphic-fetch': 'fetch',
'fetch-mock': 'fetchMock',
'should': 'should',
}
should: 'should',
},
},
plugins: [
require('rollup-plugin-node-resolve')(),
require('rollup-plugin-json')(),
require('rollup-plugin-typescript')(),
],
external: [
'fetch-mock',
'should',
'isomorphic-fetch'
require('@rollup/plugin-node-resolve')(),
require('@rollup/plugin-json')(),
require('@rollup/plugin-typescript')({
tsconfig: false,
allowSyntheticDefaultImports: true,
resolveJsonModule: true,
moduleResolution: 'node',
target: 'es5',
include: ['test/integration/*.spec.ts', 'src/*.ts'],
}),
],
external: ['fetch-mock', 'should', 'isomorphic-fetch'],
},

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

coverageReporter: {
type: 'in-memory'
type: 'in-memory',
},

remapOptions: {
Expand All @@ -80,51 +82,131 @@ module.exports = function (config) {
if (CI) {
return {
'text-summary': null,
lcovonly: './coverage/lcov.info'
lcovonly: './coverage/lcov.info',
}
}
return {
'text-summary': null,
// to show summary in console
html: './coverage'
html: './coverage',
}
})(),

port: 9876,
colors: true,
autoWatch: false,
browsers: ['PhantomJS'],
singleRun: true
singleRun: true,
})

if (CI_MODE === 'saucelabs' && process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY) {
const chrome = {
'SL_Chrome_Latest': {version: 'latest', platform: 'OS X 10.11', browserName: 'chrome', base: 'SauceLabs'},
'SL_Chrome_Latest-1': {version: 'latest-1', platform: 'OS X 10.11', browserName: 'chrome', base: 'SauceLabs'},
'SL_Chrome_Latest-2': {version: 'latest-2', platform: 'OS X 10.11', browserName: 'chrome', base: 'SauceLabs'}
SL_Chrome_Latest: {
version: 'latest',
platform: 'OS X 10.11',
browserName: 'chrome',
base: 'SauceLabs',
},
'SL_Chrome_Latest-1': {
version: 'latest-1',
platform: 'OS X 10.11',
browserName: 'chrome',
base: 'SauceLabs',
},
'SL_Chrome_Latest-2': {
version: 'latest-2',
platform: 'OS X 10.11',
browserName: 'chrome',
base: 'SauceLabs',
},
}
const firefox = {
'SL_Firefox_Latest': {version: 'latest', platform: 'OS X 10.11', browserName: 'firefox', base: 'SauceLabs'},
'SL_Firefox_Latest-1': {version: 'latest-1', platform: 'OS X 10.11', browserName: 'firefox', base: 'SauceLabs'},
'SL_Firefox_Latest-2': {version: 'latest-2', platform: 'OS X 10.11', browserName: 'firefox', base: 'SauceLabs'}
SL_Firefox_Latest: {
version: 'latest',
platform: 'OS X 10.11',
browserName: 'firefox',
base: 'SauceLabs',
},
'SL_Firefox_Latest-1': {
version: 'latest-1',
platform: 'OS X 10.11',
browserName: 'firefox',
base: 'SauceLabs',
},
'SL_Firefox_Latest-2': {
version: 'latest-2',
platform: 'OS X 10.11',
browserName: 'firefox',
base: 'SauceLabs',
},
}
const safari = {
'SL_Safari_Latest': {version: 'latest', platform: 'OS X 10.12', browserName: 'safari', base: 'SauceLabs'},
'SL_Safari_10': {version: '10.0', platform: 'OS X 10.11', browserName: 'safari', base: 'SauceLabs'},
'SL_Safari_9': {version: '9.0', platform: 'OS X 10.11', browserName: 'safari', base: 'SauceLabs'}
SL_Safari_Latest: {
version: 'latest',
platform: 'OS X 10.12',
browserName: 'safari',
base: 'SauceLabs',
},
SL_Safari_10: {
version: '10.0',
platform: 'OS X 10.11',
browserName: 'safari',
base: 'SauceLabs',
},
SL_Safari_9: {
version: '9.0',
platform: 'OS X 10.11',
browserName: 'safari',
base: 'SauceLabs',
},
}
const ie = {
'SL_InternetExplorer_11': {version: '11.0', platform: 'Windows 7', browserName: 'internet explorer', base: 'SauceLabs'},
'SL_InternetExplorer_10': {version: '10.0', platform: 'Windows 7', browserName: 'internet explorer', base: 'SauceLabs'},
SL_InternetExplorer_11: {
version: '11.0',
platform: 'Windows 7',
browserName: 'internet explorer',
base: 'SauceLabs',
},
SL_InternetExplorer_10: {
version: '10.0',
platform: 'Windows 7',
browserName: 'internet explorer',
base: 'SauceLabs',
},
}
const edge = {
'SL_Edge_Latest': {version: 'latest', platform: 'Windows 10', browserName: 'MicrosoftEdge', base: 'SauceLabs'},
'SL_Edge_14': {version: '14.14393', platform: 'Windows 10', browserName: 'MicrosoftEdge', base: 'SauceLabs'},
'SL_Edge_13': {version: '13.10586', platform: 'Windows 10', browserName: 'MicrosoftEdge', base: 'SauceLabs'}
SL_Edge_Latest: {
version: 'latest',
platform: 'Windows 10',
browserName: 'MicrosoftEdge',
base: 'SauceLabs',
},
SL_Edge_14: {
version: '14.14393',
platform: 'Windows 10',
browserName: 'MicrosoftEdge',
base: 'SauceLabs',
},
SL_Edge_13: {
version: '13.10586',
platform: 'Windows 10',
browserName: 'MicrosoftEdge',
base: 'SauceLabs',
},
}
const linux = {
'SL_Chrome_Linux': {version: 'latest', platform: 'Linux', browserName: 'chrome', base: 'SauceLabs'},
'SL_Firefox_Linux': {version: 'latest', platform: 'Linux', browserName: 'firefox', base: 'SauceLabs'},
SL_Chrome_Linux: {
version: 'latest',
platform: 'Linux',
browserName: 'chrome',
base: 'SauceLabs',
},
SL_Firefox_Linux: {
version: 'latest',
platform: 'Linux',
browserName: 'firefox',
base: 'SauceLabs',
},
}

// Browsers to run on Sauce Labs
Expand All @@ -134,11 +216,16 @@ module.exports = function (config) {
config.set({
reporters: ['progress', 'saucelabs'],
sauceLabs: {
build: 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')',
build:
'TRAVIS #' +
process.env.TRAVIS_BUILD_NUMBER +
' (' +
process.env.TRAVIS_BUILD_ID +
')',
connectOptions: {
connectRetries: 1,
doctor: true,
verbose: true
verbose: true,
},
commandTimeout: 300,
idleTimeout: 600,
Expand All @@ -148,14 +235,14 @@ module.exports = function (config) {
recordVideo: false,
startConnect: false,
testName: 'workfront-api',
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
},
captureTimeout: 0,
customLaunchers: customLaunchers,

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: Object.keys(customLaunchers)
browsers: Object.keys(customLaunchers),
})
}
}
}
Loading

0 comments on commit 3cd201c

Please sign in to comment.