Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit 53c6275

Browse files
authored
Merge branch 'master' into 645-search-response-spaces-dn
2 parents 6efc5e0 + c39285b commit 53c6275

File tree

8 files changed

+47
-21
lines changed

8 files changed

+47
-21
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
# versioning-strategy: increase-if-necessary
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "saturday"
9+
time: "03:00"
10+
timezone: "America/New_York"
11+
- package-ecosystem: "npm"
12+
versioning-strategy: increase-if-necessary
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
day: "saturday"
17+
time: "03:00"
18+
timezone: "America/New_York"

.github/workflows/main.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Lint Check
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v2
1515
- uses: actions/setup-node@v1
1616
- name: Install Packages
1717
run: npm install
@@ -29,9 +29,10 @@ jobs:
2929
- 10.13.0
3030
- 10.x
3131
- 12.x
32+
- 14.x
3233
runs-on: ${{ matrix.os }}
3334
steps:
34-
- uses: actions/checkout@v1
35+
- uses: actions/checkout@v2
3536
- uses: actions/setup-node@v1
3637
with:
3738
node-version: ${{ matrix.node }}
@@ -40,12 +41,12 @@ jobs:
4041
- name: Run Tests
4142
run: npm run test:ci
4243
- name: Coveralls Parallel
43-
uses: coverallsapp/github-action@master
44+
uses: coverallsapp/github-action@v1.1.1
4445
with:
4546
github-token: ${{ secrets.GITHUB_TOKEN }}
4647
parallel: true
4748
- name: Coveralls Finished
48-
uses: coverallsapp/github-action@master
49+
uses: coverallsapp/github-action@v1.1.1
4950
with:
5051
github-token: ${{ secrets.GITHUB_TOKEN }}
5152
parallel-finished: true

lib/filters/filter.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22

33
// var assert = require('assert')
44

5-
var asn1 = require('asn1')
6-
75
var Protocol = require('../protocol')
86

97
/// --- Globals
108

11-
var BerWriter = asn1.BerWriter
12-
139
var TYPES = {
1410
and: Protocol.FILTER_AND,
1511
or: Protocol.FILTER_OR,
@@ -38,9 +34,18 @@ function isFilter (filter) {
3834
return false
3935
}
4036

37+
function isBerWriter (ber) {
38+
return Boolean(
39+
ber &&
40+
typeof (ber) === 'object' &&
41+
typeof (ber.startSequence) === 'function' &&
42+
typeof (ber.endSequence) === 'function'
43+
)
44+
}
45+
4146
function mixin (target) {
4247
target.prototype.toBer = function toBer (ber) {
43-
if (!ber || !(ber instanceof BerWriter)) { throw new TypeError('ber (BerWriter) required') }
48+
if (isBerWriter(ber) === false) { throw new TypeError('ber (BerWriter) required') }
4449

4550
ber.startSequence(TYPES[this.type])
4651
ber = this._toBer(ber)

lib/logger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const logger = Object.create(require('abstract-logging'))
3+
const logger = require('abstract-logging')
44
logger.child = function () { return logger }
55

66
module.exports = logger

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "ldapjs",
44
"homepage": "http://ldapjs.org",
55
"description": "LDAP client and server APIs",
6-
"version": "2.0.0",
6+
"version": "2.1.0",
77
"license": "MIT",
88
"repository": {
99
"type": "git",
@@ -17,7 +17,7 @@
1717
"node": ">=10.13.0"
1818
},
1919
"dependencies": {
20-
"abstract-logging": "^1.0.0",
20+
"abstract-logging": "^2.0.0",
2121
"asn1": "^0.2.4",
2222
"assert-plus": "^1.0.0",
2323
"backoff": "^2.5.0",
@@ -28,11 +28,10 @@
2828
},
2929
"devDependencies": {
3030
"get-port": "^5.1.1",
31-
"husky": "^3.0.4",
31+
"husky": "^4.2.5",
3232
"snazzy": "^8.0.0",
3333
"standard": "^14.0.2",
34-
"tap": "14.10.1",
35-
"uuid": "^3.3.3"
34+
"tap": "14.10.8"
3635
},
3736
"scripts": {
3837
"test": "tap --no-cov",

test/client.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
const util = require('util')
44
const assert = require('assert')
55
const tap = require('tap')
6-
const uuid = require('uuid')
76
const vasync = require('vasync')
87
const getPort = require('get-port')
9-
const { getSock } = require('./utils')
8+
const { getSock, uuid } = require('./utils')
109
const ldap = require('../lib')
1110
const { Attribute, Change } = ldap
1211

test/laundry.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
'use strict'
22

33
const tap = require('tap')
4-
const uuid = require('uuid')
5-
const { getSock } = require('./utils')
4+
const { getSock, uuid } = require('./utils')
65
const ldap = require('../lib')
76

87
function search (t, options, callback) {

test/utils.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
const os = require('os')
44
const path = require('path')
5-
const uuid = require('uuid')
5+
const crypto = require('crypto')
6+
7+
function uuid () {
8+
return crypto.randomBytes(16).toString('hex')
9+
}
610

711
function getSock () {
812
if (process.platform === 'win32') {
@@ -13,5 +17,6 @@ function getSock () {
1317
}
1418

1519
module.exports = {
16-
getSock
20+
getSock,
21+
uuid
1722
}

0 commit comments

Comments
 (0)