Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade v1 #66

Merged
merged 39 commits into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4be45cb
Update development environment (#55)
jaebradley Jun 4, 2018
0958d62
refactor(coordinate): remove Coordinate data class
jaebradley Jun 4, 2018
c4d43b4
Remove Coordinate and Distance classes (#56)
jaebradley Jun 4, 2018
2858bfe
Merge branch 'upgrade-v1' of github.com:jaebradley/uber-cli into upgr…
jaebradley Jun 4, 2018
74dfd29
refactor(location): remove Location class (#57)
jaebradley Jun 4, 2018
469e84d
refactor(price-range): remove PriceRange data class (#58)
jaebradley Jun 4, 2018
ed3ccad
refactor(duration): remove Duration class (#59)
jaebradley Jun 4, 2018
bbee7d7
refactor(price-estimate-query): remove PriceEstimateQuery class (#60)
jaebradley Jun 4, 2018
6890a1f
Remove time, pickup time, and price estimates classes (#61)
jaebradley Jun 4, 2018
af79e63
refactor(time-estimates): remove TimeEstimates class (#62)
jaebradley Jun 4, 2018
80077ee
Remove time and price estimates classes (#63)
jaebradley Jun 4, 2018
fe15cf3
refactor(immutable): remove immutable js (#64)
jaebradley Jun 4, 2018
9fd88f6
refactor(location-translators): remove Location Translators (#65)
jaebradley Jun 4, 2018
47a9bf2
refactor(trip-price-estimate-translators): refactor translators
jaebradley Jun 4, 2018
8f92d06
refactor(pickup-time-estimate): refactor Pickup Time Estimate
jaebradley Jun 4, 2018
d2d81dd
build(enumify): remove enumify dependency
jaebradley Jun 4, 2018
fc7f428
refactor(uber-service): convert UberService methods to async/await
jaebradley Jun 4, 2018
ce35cd7
refactor(cli): refactor services
jaebradley Jun 6, 2018
2db12ef
refactor(table-builders): simplify table building logic
jaebradley Jun 9, 2018
7e409f0
refactor(format-duration): move duration formatting to formatters
jaebradley Jun 9, 2018
f2e3eff
refactor(table-builders): remove old table builders
jaebradley Jun 9, 2018
be5dddf
refactor(translators): remove translators
jaebradley Jun 10, 2018
e9ad0ad
style(eslint): fix eslint errors
jaebradley Jun 11, 2018
c0ef592
test(symbols): add symbols tests
jaebradley Jun 11, 2018
b7807c0
refactor(format-seconds): rename formatDuration to formatSeconds
jaebradley Jun 11, 2018
ed8260a
test(formatters): add tests for formatters
jaebradley Jun 12, 2018
c21a73d
test(converters): add tests for distance and duration converters
jaebradley Jun 12, 2018
edf516f
refactor(test): remove unnecessary tests
jaebradley Jun 12, 2018
a08de8c
build(commitlint): add commitlint.config.js
jaebradley Jun 12, 2018
c741817
refactor(google-maps): upgrade google-maps and consolidate logic
jaebradley Jun 12, 2018
45b53b4
test(address-locator): add tests for address locator
jaebradley Jun 12, 2018
3c28ac3
refactor(uber-client): replace Uber estimates client
jaebradley Jun 12, 2018
b8cc1ba
refactor(uber-service): rename uber client class variable
jaebradley Jun 12, 2018
44f37ab
test(uber-service): add basic tests for UberService
jaebradley Jun 12, 2018
77f0473
test(time-table): add tests for time estimates table
jaebradley Jun 12, 2018
f7ba7d5
test(price-table): add tests for price estimates table
jaebradley Jun 12, 2018
c6c2ff8
refactor(package): fix package generation scripts and version
jaebradley Jun 12, 2018
dac893d
test(tables): fix failing table tests
jaebradley Jun 12, 2018
22f4f41
test(tables): fix failing table tests
jaebradley Jun 12, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
{
"presets": ["es2015", "stage-0"]
"presets": [
"@babel/preset-env"
],
"env": {
"production": {
"presets": [
"minify"
]
}
},
"plugins": [
"@babel/plugin-transform-runtime"
],
"ignore": [
"node_modules",
"*.test.js"
]
}
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage/*
build
node_modules
7 changes: 7 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "airbnb-base",
"env": {
"jest": true
}
}

10 changes: 0 additions & 10 deletions .eslintrc.json

This file was deleted.

65 changes: 61 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
node_modules/*
npm-debug.log
coverage/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

build/
package-lock.json

.DS_Store
18 changes: 17 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
src/
node_modules/**

src/**
test/**
coverage/**

npm-debug.log
commitlint.config.js
*.test.js
**/__mocks__/**

.DS_Store
.eslintcache
.travis.yml
.babelrc
.eslintignore
.eslintrc
27 changes: 23 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
language: node_js
cache:
directories:
- ~/.npm
notifications:
email: true
node_js:
- 4.2.2
sudo: false
script:
- npm run build
- '8'
install: npm install
before_install:
- npm install -g npm@5
- npm install -g greenkeeper-lockfile@1
jobs:
include:
- stage: test
script:
- npm run build
- npm run lint
- npm run test
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload
after_success: npm run codecov
- stage: deploy
if: branch = master
script: npm run travis-deploy-once "npm run semantic-release"
26 changes: 26 additions & 0 deletions __mocks__/@google/maps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const geocode = jest.fn(({ address }) => ({
asPromise: () => {
if (address === 'jaebaebae') {
return Promise.resolve({
json: {
results: [{
formatted_address: 'formatted address',
geometry: {
location: {
lat: 'latitude',
lng: 'longitude',
},
},
}],
},
});
}

return Promise.resolve({ json: { results: [] } });
},
}));

const createClient = jest.fn(() => ({ geocode }));

export default { createClient };
export { geocode };
14 changes: 14 additions & 0 deletions __mocks__/convert-units.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const to = jest.fn(() => 1234);

const from = jest.fn(() => ({ to }));

const constructor = jest.fn(() => ({ from }));

const convert = constructor;

export default convert;

export {
to,
from,
};
48 changes: 48 additions & 0 deletions __mocks__/uber-estimates-client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
const getExpectedTimeOfArrival = jest.fn(() => ({
times: [
{
localized_display_name: 'first localized display name',
estimate: 'first estimate',
},
{
localized_display_name: 'second localized display name',
estimate: 'second estimate',
},
],
}));

const getPrices = jest.fn(() => ({
prices: [
{
localized_display_name: 'first localized display name',
distance: 'first distance',
duration: 'first duration',
high_estimate: 'first high estimate',
low_estimate: 'first low estimate',
currency_code: 'first currency code',
surgeMultiplier: undefined,
},
{
localized_display_name: 'second localized display name',
distance: 'second distance',
duration: 'second duration',
high_estimate: 'second high estimate',
low_estimate: 'second low estimate',
currency_code: 'second currency code',
surgeMultiplier: 'surgeMultiplier',
},
],
}));

const constructor = jest.fn(() => ({
getExpectedTimeOfArrival,
getPrices,
}));

const UberEstimatesClient = constructor;

export default UberEstimatesClient;
export {
getExpectedTimeOfArrival,
getPrices,
};
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-angular'] };
Loading