thibmaek / bpost Goto Github PK
View Code? Open in Web Editor NEWπ¦ Modern JavaScript API wrapper for bpost track & trace
License: MIT License
π¦ Modern JavaScript API wrapper for bpost track & trace
License: MIT License
__mocks__
folder
Started out on this issue on the 0.2.0 branch
There was a breaking bug in one of the previous version
I think it's a good idea to update your generator and re-run it.
The json response will probably differ for door-delivery so needs to be checked when I can get a response from a door-delivery (should be soon). Adding to 0.2.0 for now, might change to 1.0.0 or 0.3.0
Branch | Build failing π¨ |
---|---|
Dependency | babel-cli |
Current Version | 6.22.2 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As babel-cli is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
In 0.1.0 and 0.1.1 all methods need to be called with an id passed to it each time:
import bpost from 'bpost';
const id = `323267009691651472`;
const a = bpost.getStatus(id);
const b = bpost.openingHours(id, 'monday');
const c = bpost. getPackageWeight(id);
β¦
Ideally the module would be created as an instance and then the id would be known to all methods:
import bpost from 'bpost';
bpost.setup(`323267009691651472`); // something like: setup, create, instantiate β¦
const a = bpost.getStatus();
const b = bpost.openingHours(`monday`);
axios was used since there was an issue with GlobalFetch due to CORS requests not being supported API-side.
Preferably src/lib/composedFetch.js
would use the following syntax (with a check for 200 status of course):
export default id =>
fetch(`http://track.bpost.be/btr/api/items?itemIdentifier=${id}`)
.then(res => res.data[0])
.catch(e => console.error(e));
This would be ideal but failed because fetch did not complete due to the bpost api endpoint not setting Header: 'access-allow-control-origin'
and thus not supporting CORS requests. Fetch offers a mode: 'no-cors'
to return an opaque response but contains no data.
Note: also include a fetch polyfill for non supported environments like node. isormophic-fetch would work best.
In https://github.com/thibmaek/bpost/blob/master/src/lib/methods/getStatus.js#L5 and https://github.com/thibmaek/bpost/blob/master/src/lib/methods/events.js#L5 the console.log()
needs to be replaced by a return for the data.
Branch | Build failing π¨ |
---|---|
Dependency | babel-core |
Current Version | 6.23.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As babel-core is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | eslint |
Current Version | 3.12.2 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As eslint is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
no-unneeded-ternary
(#7540) (Teddy Katz)padded-blocks
never
case (fixes #7868) (#7878) (alberto)operator-linebreak
(#7702) (Teddy Katz)return
argument (fixes #7594) (#7595) (Dalton Santos)semi
false positive before regex/template literals (fixes #7782) (#7783) (Teddy Katz)prefer-destructuring
rule (fixes #6053) (#7741) (Alex LaFroscia)The new version differs by 43 commits .
8571ab8
3.13.0
d54e0c1
Build: package.json and changelog update for 3.13.0
cd4c025
Update: add fixer for no-extra-label (#7840)
aa75c92
Fix: Ensure prefer-const fixes destructuring assignments (fixes #7852) (#7859)
4008022
Chore: Refactor to use ES6 Classes (Part 3)(refs #7849) (#7865)
c9ba40a
Update: add fixer for no-unneeded-ternary
(#7540)
dd56d87
Update: add object-shorthand option for arrow functions (fixes #7564) (#7746)
fbafdc0
Docs: padded-blocks
never
case (fixes #7868) (#7878)
ca1f841
Fix: no-useless-return stack overflow on loops after throw (fixes #7855) (#7856)
d80d994
Update: add fixer for object-property-newline (fixes #7740) (#7808)
bf3ea3a
Fix: capitalized-comments: Ignore consec. comments if first is invalid (#7835)
616611a
Chore: Refactor to use ES6 Classes (Part 2)(refs #7849) (#7847)
856084b
Chore: Refactor to use ES6 Classes (Part 1)(refs #7849) (#7846)
bf45893
Docs: Clarify that we only support Stage 4 proposals (#7845)
0fc24f7
Fix: adapt new-paren rule so it handles TypeScript (fixes #7817) (#7820)
There are 43 commits in total. See the full diff.
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
Breaks the UMD build.
Axios exports the module using keys which contain reserved js keywords which makes it error with bundling trough rollup. Issue is currently not easily fixable should become obsolete once #17 is fixed.
The JSON response has some keys for multilanguage usage (nl, fr, en).
Could be implemented by requiring an argument to the constructor for language settings.
Keep the default English.
example:
import bpost from 'bpost';
bpost(`323267009691651472`, 'nl');
Due to the bpost firewall blocking the error expect()
s Travis will fail currently.
It only needs to run npm run test:ci
because otherwise it will hit the API with too many exceptions. When installing with yarn though, the prepublish hook is triggered and runs npm run lint:build:test
before running the travis run command.
Branch | Build failing π¨ |
---|---|
Dependency | rollup |
Current Version | 0.41.4 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As rollup is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
The new version differs by 29 commits .
c33f575
-> v0.41.5
c8a980a
add test for #1317
05c44e5
Merge branch 'patch-2' of https://github.com/porsager/rollup into porsager-patch-2
d3c19ed
outwit uglify, which now tries to inline stuff
1b0823a
Merge branch 'logging-fix' of https://github.com/diervo/rollup into diervo-logging-fix
74a0d1b
Merge pull request #1311 from kzc/1273
9929d1b
Merge pull request #1255 from Comandeer/fix-babili
ae54071
Merge pull request #1287 from olsonpm/fix-warn-on-namespace-conflict
a6aa96e
add a test
3d311f7
Merge branch 'fix-default-conflict' of https://github.com/olsonpm/rollup into olsonpm-fix-default-conflict
178b822
typo that affects docs
a345361
Merge branch 'master' of https://github.com/rollup/rollup
6d352d6
fix guide link
007c264
documentation
49ac9e2
documentation
There are 29 commits in total. See the full diff.
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | babel-core |
Current Version | 6.18.2 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As babel-core is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
The api has a valid signed SSL certificate so the baseUrl for the fetch should be: https://track.bpost.be/btr/api
"processOverview": {
"activeStepTextKey": "RETOUR_DELIVERED",
"textKey": "step.text.retour.delivered",
"alert": false,
"processSteps": [
{
"name": "return_to_sender",
"status": "completed",
"label": {
"main": "returnToSender"
},
"knownProcessStep": "RETURN_TO_SENDER"
},
{
"name": "processing",
"status": "completed",
"label": {
"main": "processing",
"detail": "byBpost"
},
"knownProcessStep": "PROCESSING"
},
{
"name": "out_for_delivery",
"status": "completed",
"label": {
"main": "onTheWay",
"detail": "towardsSender"
},
"knownProcessStep": "ON_THE_WAY_TO_SENDER"
},
{
"name": "delivered",
"status": "active",
"label": {
"main": "returned",
"detail": "toSender"
},
"knownProcessStep": "DELIVERED_TO_SENDER"
}
]
"requestedDeliveryMethod": "HOME",
in the API response might pose a problem for:
export const deliveryMethod = id => composedFetch(id)
.then(data => data.requestedDeliveryMethod.toLowerCase().split(`_`));
in src/lib/methods/packageInfo.js
Before releasing 0.1.1 make sure to write up documentation on each method and how to use this module.
Since this is low-level preferably in README.
oneliner: mkd .github && touch PULL_REQUEST_TEMPLATE.md ISSUE_TEMPLATE.md
Add in content individually
Append:
"changelogCommand": "git log --pretty=format:'* %s (%h)' v[REV_RANGE]"
Codecov
Needs console.error for errors, warn for warnings, log for logsβ¦
Branch | Build failing π¨ |
---|---|
Dependency | eslint |
Current Version | 3.14.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As eslint is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
no-extra-parens
incorrect precedence (fixes #7978) (#7999) (alberto)template-tag-spacing
rule (fixes #7631) (#7913) (Jonathan Wilsson)The new version differs by 17 commits .
8ea98f9
3.15.0
77b5cb7
Build: package.json and changelog update for 3.15.0
f2a3580
Fix: no-extra-parens
incorrect precedence (fixes #7978) (#7999)
d6b6ba1
Fix: no-var should fix ForStatement.init (#7993)
99d386d
Upgrade: Espree v3.4.0 (#8019)
42390fd
Docs: update README.md for team (#8016)
d7ffd88
Chore: enable template-tag-spacing on ESLint codebase (#8005)
f2be7e3
Docs: Fix typo in object-curly-newline.md (#8002)
df2351a
Docs: Fix misleading section in brace-style documentation (#7996)
5ae6e00
Chore: avoid unnecessary feature detection for Symbol (#7992)
5d57c57
Chore: fix no-else-return lint error (refs #7986) (#7994)
62fb054
Chore: enable no-else-return on ESLint codebase (#7986)
c59a0ba
Update: add ignoreRestSiblings option to no-unused-vars (#7968)
5cdfa99
Chore: enable no-unneeded-ternary on ESLint codebase (#7987)
fbd7c13
Update: ensure operator-assignment handles exponentiation operators (#7970)
There are 17 commits in total. See the full diff.
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.