Comparing version 5.0.1 to 5.0.2-beta-103
@@ -12,3 +12,3 @@ { | ||
"homepage": "https://github.com/tanepiper/node-bitly", | ||
"version": "5.0.1", | ||
"version": "5.0.2-beta-103", | ||
"author": { | ||
@@ -54,17 +54,18 @@ "name": "Tane Piper", | ||
"scripts": { | ||
"prepublishOnly": "npm test", | ||
"test": "VCR_MODE=cache mocha --reporter list src/*.spec.js", | ||
"prepublishOnly": "npm test && npm run build", | ||
"test": "VCR_MODE=cache mocha-webpack --reporter list src/*.spec.js", | ||
"build": "webpack --config=webpack.config.js" | ||
}, | ||
"devDependencies": { | ||
"@babel/preset-env": "^7.0.0-beta.4", | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-plugin-transform-object-rest-spread": "^6.26.0", | ||
"babel-polyfill": "^6.26.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-es2017": "^6.24.1", | ||
"babel-plugin-transform-runtime": "^6.23.0", | ||
"chai": "^4.1.2", | ||
"eslint": "^4.10.0", | ||
"mocha": "^4.0.1", | ||
"mocha-webpack": "^1.0.1", | ||
"sepia": "^2.0.2", | ||
"ts-loader": "^3.1.1", | ||
"typescript": "^2.6.1", | ||
"webpack": "^3.8.1", | ||
@@ -74,2 +75,3 @@ "webpack-node-externals": "^1.6.0" | ||
"dependencies": { | ||
"babel-polyfill": "^6.26.0", | ||
"request": "^2.83.0", | ||
@@ -79,3 +81,3 @@ "request-promise": "^4.2.2", | ||
}, | ||
"main": "src/bitly.js" | ||
"main": "dist/bitly.js" | ||
} |
@@ -12,3 +12,4 @@ # node-bitly - Bitly API for nodejs | ||
Version 5 of this library only support `Node 8.x.x` and above as it uses `async/await` | ||
`node-bitly` is programmed with ES7 `async/await` but uses the `typescript` compiler to ES5, so the library has | ||
been tested back to support `node v4.8.4` | ||
@@ -28,3 +29,3 @@ ## Installation | ||
#### Code | ||
### Code | ||
@@ -44,2 +45,14 @@ ```js | ||
If you are not using `node 8` then you can still use the library with `Promise` values: | ||
```js | ||
const BitlyClient = require('bitly'); | ||
const bitly = BitleyClient('<accessToken>'); | ||
const uri = 'https://github.com/tanepiper/node-bitly'; | ||
bitly.shorten(uri).then(result => { | ||
console.log(result); | ||
}); | ||
``` | ||
You can also do raw requests to any Bitly endpoint. With this you need to pass the access | ||
@@ -62,5 +75,6 @@ token to the method | ||
## Tests | ||
To run tests type `npm test`. For coverage type `npm run coverage` | ||
### Tests | ||
To run tests type `npm test`. | ||
### Bit.ly Features | ||
@@ -67,0 +81,0 @@ |
@@ -10,2 +10,3 @@ const Path = require('path'); | ||
target: 'node', | ||
devtool: 'sourcemap', | ||
output: { | ||
@@ -19,2 +20,3 @@ path: Path.join(__dirname, 'dist'), | ||
resolve: { | ||
extensions: ['.ts', '.js'], | ||
modules: [Path.resolve(__dirname, '/src'), Path.resolve(__dirname, 'node_modules/')], | ||
@@ -28,6 +30,3 @@ descriptionFiles: ['package.json'] | ||
exclude: [/node_modules/, '*.spec.js'], | ||
loader: 'babel-loader', // or just "babel" | ||
query: { | ||
presets: ['es2015'] | ||
} | ||
loader: 'ts-loader', // or just "babel" | ||
} | ||
@@ -34,0 +33,0 @@ ] |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
57372
13
777
0
87
4
13
1
+ Addedbabel-polyfill@^6.26.0
+ Addedbabel-polyfill@6.26.0(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedregenerator-runtime@0.10.50.11.1(transitive)