Skip to content

Commit 5d3b2ef

Browse files
authored
Remove getPublicCrawlerNiceUrl and bluebird promises (#77)
* Remove getPublicCrawlerNicePath * Remove bluebird
1 parent 549189b commit 5d3b2ef

File tree

4 files changed

+1
-20
lines changed

4 files changed

+1
-20
lines changed

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "apify-shared",
3-
"version": "0.4.6",
3+
"version": "0.5.0",
44
"description": "Tools and constants shared across Apify projects.",
55
"main": "build/index.js",
66
"keywords": [
@@ -37,7 +37,6 @@
3737
},
3838
"dependencies": {
3939
"axios": "^0.19.2",
40-
"bluebird": "^3.7.2",
4140
"chalk": "^4.0.0",
4241
"cherow": "^1.6.9",
4342
"clone": "^2.1.1",
@@ -47,7 +46,6 @@
4746
"match-all": "^1.2.6",
4847
"moment": "^2.27.0",
4948
"request": "^2.88.0",
50-
"slugg": "^1.2.1",
5149
"underscore": "^1.9.1",
5250
"url": "^0.11.0"
5351
},

src/utilities.client.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
const _ = require('underscore');
10-
const slugg = require('slugg');
1110
const isBuffer = require('is-buffer');
1211
const { countries } = require('countries-list');
1312
const consts = require('./consts');
@@ -167,16 +166,6 @@ export const markedDecreaseHeadsLevel = (text, level) => {
167166
return `<h${level}>${text}</h${level}>`;
168167
};
169168

170-
/**
171-
* Creates a "nice path" for public act consisting of 5 chars of it's _id
172-
* word "api" and slug version of either public.domain and customId.
173-
*/
174-
export const getPublicCrawlerNicePath = (actId, customId, domain) => {
175-
const parts = [actId.substr(0, consts.SHORT_CRAWLER_ID_LENGTH), 'api', slugg(domain || customId)];
176-
177-
return parts.join('-');
178-
};
179-
180169
/**
181170
* Converts integer version number previously generated by buildNumberToInt() or versionNumberToInt()
182171
* to string in a form 'MAJOR.MINOR' or 'MAJOR.MINOR.BUILD' in case build number is non-zero.

src/utilities.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
const _ = require('underscore');
1111
const crypto = require('crypto');
12-
const Promise = require('bluebird');
1312
const request = require('request');
1413
const cherow = require('cherow');
1514
const utilsClient = require('./utilities.client');

test/utilities.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,6 @@ describe('utilities', () => {
179179
});
180180
});
181181
});
182-
183-
it('getPublicCrawlerNicePath()', () => {
184-
const nicePath = utils.getPublicCrawlerNicePath('1234567890', 'example-crawler');
185-
expect(nicePath).to.be.eql('12345-api-example-crawler');
186-
});
187182
});
188183

189184
describe('timeoutPromise()', () => {

0 commit comments

Comments
 (0)