Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitly

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitly - npm Package Compare versions

Comparing version 5.1.1 to 5.1.2

26

package.json

@@ -12,3 +12,3 @@ {

"homepage": "https://github.com/tanepiper/node-bitly",
"version": "5.1.1",
"version": "5.1.2",
"author": {

@@ -61,5 +61,5 @@ "name": "Tane Piper",

"devDependencies": {
"@babel/preset-env": "^7.0.0-beta.5",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"@babel/preset-env": "^7.0.0-beta.51",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.3",
"babel-plugin-transform-async-to-generator": "^6.24.1",

@@ -70,15 +70,15 @@ "babel-plugin-transform-object-rest-spread": "^6.26.0",

"chai": "^4.1.2",
"eslint": "^4.10.0",
"eslint": "^4.19.1",
"jsdoc": "^3.5.5",
"jsdoc-babel": "^0.3.0",
"jsdoc-to-markdown": "^3.0.0",
"jsdoc-to-markdown": "^3.0.4",
"minami": "^1.2.3",
"mocha": "^4.0.1",
"mocha-webpack": "^1.0.1",
"np": "^2.16.1",
"mocha": "^4.1.0",
"mocha-webpack": "^1.1.0",
"np": "^2.20.1",
"sepia": "^2.0.2",
"ts-loader": "^3.1.1",
"typescript": "^2.6.1",
"webpack": "^3.8.1",
"webpack-node-externals": "^1.6.0"
"ts-loader": "^3.5.0",
"typescript": "^2.9.1",
"webpack": "^3.12.0",
"webpack-node-externals": "^1.7.2"
},

@@ -85,0 +85,0 @@ "dependencies": {

@@ -26,3 +26,5 @@ require('sepia');

}
return expect(err.statusCode).to.equal(500);
return expect(err)
.to.have.property('statusCode')
.and.to.equal(500);
});

@@ -32,5 +34,5 @@ });

describe('should work with bitly api endpoints with no helper', () => {
it('should accept any valid bitly url and data object', async() => {
it('should accept any valid bitly url and data object', async () => {
try {
const {data} = await bitly.bitlyRequest('link/referrers_by_domain', {
const { data } = await bitly.bitlyRequest('link/referrers_by_domain', {
link: EXAMPLE_URL_BITLY,

@@ -41,7 +43,7 @@ unit: 'hour',

return expect(data).to.have.property('referrers');
} catch (error) {
} catch (error) {
throw error;
}
})
})
});
});

@@ -52,3 +54,5 @@ describe('shorten', () => {

const { data } = await bitly.shorten(EXAMPLE_URL);
return expect(data.hash).to.equal(EXAMPLE_URL_HASH);
return expect(data)
.to.have.property('hash')
.and.to.equal(EXAMPLE_URL_HASH);
} catch (error) {

@@ -64,3 +68,5 @@ throw error;

const { data } = await bitly.expand([EXAMPLE_URL_BITLY, EXAMPLE_URL_HASH]);
return expect(data.expand.length).to.equal(2);
return expect(data)
.to.have.property('expand')
.and.lengthOf(2);
} catch (error) {

@@ -67,0 +73,0 @@ throw error;

@@ -10,5 +10,5 @@ const expect = require('chai').expect;

const result = generateUrl('iamatoken', 'foo');
expect(result.href).to.equal(
'https://api-ssl.bitly.com/v3/foo?access_token=iamatoken&domain=bit.ly&format=json',
);
expect(result)
.to.have.property('href')
.and.to.equal('https://api-ssl.bitly.com/v3/foo?access_token=iamatoken&domain=bit.ly&format=json');
});

@@ -19,7 +19,7 @@

apiUrl: 'api-ssl.myhost.com',
apiVersion: 'v4',
apiVersion: 'v4'
});
expect(result.href).to.equal(
'https://api-ssl.myhost.com/v4/foo?access_token=iamatoken&domain=bit.ly&format=json',
);
expect(result)
.to.have.property('href')
.and.to.equal('https://api-ssl.myhost.com/v4/foo?access_token=iamatoken&domain=bit.ly&format=json');
});

@@ -31,4 +31,4 @@ });

const { shortUrl, hash } = sortUrlsAndHash(['http://example.com', '1KjIwXl']);
expect(shortUrl.length).to.equal(1);
expect(hash.length).to.equal(1);
expect(shortUrl).to.have.lengthOf(1);
expect(hash).to.have.lengthOf(1);
});

@@ -38,5 +38,5 @@

const { shortUrl, hash } = sortUrlsAndHash([false, null, undefined]);
expect(shortUrl.length).to.equal(0);
expect(hash.length).to.equal(0);
expect(shortUrl).to.have.lengthOf(0);
expect(hash).to.have.lengthOf(0);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc