diff --git a/Readme.md b/Readme.md index dd874df..4c97fc6 100644 --- a/Readme.md +++ b/Readme.md @@ -4,13 +4,6 @@ This package provides implementations of [LDAP controls][controls]. The primary purpose of this library is to facilitate client and server implementations in the [`ldapjs`](https://npm.im/ldapjs) package. -## Note About API Stability - -As of June 2022, this module provides an API that was directly copied from -the original code in the `ldapjs` module. This API is marked as v1.0.0. The -API is subject to drastic change in future semver major releases. The v1 release -was published as foundational work in the overall `ldapjs` project. - ## Docs At this time, one must reference the code to learn about the available diff --git a/index.js b/index.js index 6a496bc..9f260b7 100644 --- a/index.js +++ b/index.js @@ -1,16 +1,15 @@ 'use strict' const { Ber } = require('@ldapjs/asn1') + const Control = require('./lib/control') -const { - EntryChangeNotificationControl, - PagedResultsControl, - PersistentSearchControl, - ServerSideSortingRequestControl, - ServerSideSortingResponseControl, - VirtualListViewRequestControl, - VirtualListViewResponseControl -} = require('./lib/controls') +const EntryChangeNotificationControl = require('./lib/controls/entry-change-notification-control') +const PagedResultsControl = require('./lib/controls/paged-results-control') +const PersistentSearchControl = require('./lib/controls/persistent-search-control') +const ServerSideSortingRequestControl = require('./lib/controls/server-side-sorting-request-control') +const ServerSideSortingResponseControl = require('./lib/controls/server-side-sorting-response-control') +const VirtualListViewRequestControl = require('./lib/controls/virtual-list-view-request-control') +const VirtualListViewResponseControl = require('./lib/controls/virtual-list-view-response-control') module.exports = { diff --git a/lib/control.js b/lib/control.js index 3efb6ea..d484b68 100644 --- a/lib/control.js +++ b/lib/control.js @@ -10,16 +10,20 @@ const { BerWriter } = require('@ldapjs/asn1') */ class Control { /** - * Create a new baseline LDAP control. - * - * @param {object} [options] - * @param {string} [options.type=''] The dotted decimal control type value. - * @param {boolean} [options.criticality=false] Criticality value for the control. - * @param {string|Buffer} [options.value] The value for the control. If this is + * @typedef {object} ControlParams + * @property {string} [type=''] The dotted decimal control type value. + * @property {boolean} [criticality=false] Criticality value for the control. + * @property {string|Buffer} [value] The value for the control. If this is * a `string` then it will be written as-is. If it is an instance of `Buffer` * then it will be written by `value.toString()` when generating a BER * instance. */ + + /** + * Create a new baseline LDAP control. + * + * @param {ControlParams} [options] + */ constructor (options = {}) { const opts = Object.assign({ type: '', criticality: false, value: null }, options) this.type = opts.type @@ -27,25 +31,30 @@ class Control { this.value = opts.value } + get [Symbol.toStringTag] () { + return 'LdapControl' + } + /** - * Serializes the control instance into an LDAP style control object, e.g. - * `type` => `controlType`. If an instance has a `_updatePlainObject(obj)` + * Serializes the control into a plain JavaScript object that can be passed + * to the constructor as an options object. If an instance has a `_pojo(obj)` * method then the built object will be sent to that method and the resulting * mutated object returned. * * @returns {object} A plain JavaScript object that represents an LDAP control. */ - get plainObject () { + get pojo () { const obj = { - controlType: this.type, - criticality: this.criticality, - controlValue: this.value + type: this.type, + value: this.value, + criticality: this.criticality } - return ( - typeof (this._updatePlainObject) === 'function' - ? this._updatePlainObject(obj) - : obj - ) + + if (typeof this._pojo === 'function') { + this._pojo(obj) + } + + return obj } /** diff --git a/lib/control.test.js b/lib/control.test.js index 9cdc10b..4164eb3 100644 --- a/lib/control.test.js +++ b/lib/control.test.js @@ -4,9 +4,10 @@ const tap = require('tap') const { BerWriter } = require('@ldapjs/asn1') const Control = require('./control') -tap.test('contructor', t => { +tap.test('constructor', t => { t.test('new no args', function (t) { t.ok(new Control()) + t.equal(Object.prototype.toString.call(new Control()), '[object LdapControl]') t.end() }) @@ -24,7 +25,35 @@ tap.test('contructor', t => { t.end() }) -tap.test('#toBer', t => { +tap.test('pojo', t => { + t.test('passes through _pojo', async t => { + class Foo extends Control { + _pojo (obj) { + obj.foo = 'foo' + } + } + const control = new Foo() + t.strictSame(control.pojo, { + type: '', + value: null, + criticality: false, + foo: 'foo' + }) + }) + + t.test('returns basic object', async t => { + const control = new Control({ type: '1.2.3', criticality: false, value: 'foo' }) + t.strictSame(control.pojo, { + type: '1.2.3', + value: 'foo', + criticality: false + }) + }) + + t.end() +}) + +tap.test('toBer', t => { t.test('converts empty instance to BER', async t => { const target = new BerWriter() target.startSequence() @@ -128,28 +157,3 @@ tap.test('#toBer', t => { t.end() }) - -tap.test('#plainObject', t => { - t.test('passes through _updatePlainObject', async t => { - t.plan(2) - const control = new Control() - control._updatePlainObject = () => { - t.pass() - return 'foo' - } - const str = control.plainObject - t.equal(str, 'foo') - }) - - t.test('returns basic object', async t => { - const control = new Control({ type: '1.2.3', criticality: false, value: 'foo' }) - const str = control.plainObject - t.same(str, { - controlType: '1.2.3', - criticality: false, - controlValue: 'foo' - }) - }) - - t.end() -}) diff --git a/lib/controls/entry-change-notification-control.js b/lib/controls/entry-change-notification-control.js index 5e58288..d27f2f2 100644 --- a/lib/controls/entry-change-notification-control.js +++ b/lib/controls/entry-change-notification-control.js @@ -22,11 +22,15 @@ const Control = require('../control') class EntryChangeNotificationControl extends Control { static OID = '2.16.840.1.113730.3.4.7' + /** + * @typedef {ControlParams} EntryChangeNotificationParams + * @property {EntryChangeNotificationControlValue | Buffer} [value] + */ + /** * Creates a new persistent search control. * - * @param {object} [options] - * @param {EntryChangeNotificationControlValue | Buffer} [options.value] + * @param {EntryChangeNotificationParams} [options] */ constructor (options = {}) { options.type = EntryChangeNotificationControl.OID diff --git a/lib/controls/entry-change-notification-control.test.js b/lib/controls/entry-change-notification-control.test.js index 0c58b67..e6f09ed 100644 --- a/lib/controls/entry-change-notification-control.test.js +++ b/lib/controls/entry-change-notification-control.test.js @@ -56,7 +56,30 @@ tap.test('contructor', t => { t.end() }) -tap.test('#toBer', t => { +tap.test('pojo', t => { + t.test('adds control value', async t => { + const control = new ECNC({ + value: { + changeType: 8, + previousDN: 'dn=foo', + changeNumber: 42 + } + }) + t.strictSame(control.pojo, { + type: ECNC.OID, + criticality: false, + value: { + changeType: 8, + previousDN: 'dn=foo', + changeNumber: 42 + } + }) + }) + + t.end() +}) + +tap.test('toBer', t => { t.test('converts empty instance to BER', async t => { const target = new BerWriter() target.startSequence() @@ -108,27 +131,3 @@ tap.test('#toBer', t => { t.end() }) - -tap.test('#plainObject', t => { - t.test('adds control value', async t => { - const control = new ECNC({ - value: { - changeType: 8, - previousDN: 'dn=foo', - changeNumber: 42 - } - }) - const value = control.plainObject - t.same(value, { - controlType: ECNC.OID, - criticality: false, - controlValue: { - changeType: 8, - previousDN: 'dn=foo', - changeNumber: 42 - } - }) - }) - - t.end() -}) diff --git a/lib/controls/index.js b/lib/controls/index.js deleted file mode 100644 index a2e44ab..0000000 --- a/lib/controls/index.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -const fs = require('fs') -const files = fs.readdirSync(__dirname) - -const controls = {} - -for (const file of files) { - if (['index.js'].includes(file)) continue - if (file.endsWith('test.js')) continue - - const control = require(`./${file}`) - controls[control.name] = control -} - -module.exports = controls diff --git a/lib/controls/paged-results-control.js b/lib/controls/paged-results-control.js index c5b63bc..fe7dc5f 100644 --- a/lib/controls/paged-results-control.js +++ b/lib/controls/paged-results-control.js @@ -21,11 +21,15 @@ const Control = require('../control') class PagedResultsControl extends Control { static OID = '1.2.840.113556.1.4.319' + /** + * @typedef {ControlParams} PagedResultsParams + * @property {PagedResultsControlValue | Buffer} [value] + */ + /** * Creates a new paged results control. * - * @param {object} [options] - * @param {PagedResultsControlValue | Buffer} [options.value] + * @param {PagedResultsParams} [options] */ constructor (options = {}) { options.type = PagedResultsControl.OID diff --git a/lib/controls/paged-results-control.test.js b/lib/controls/paged-results-control.test.js index 8c78f41..9bc5b64 100644 --- a/lib/controls/paged-results-control.test.js +++ b/lib/controls/paged-results-control.test.js @@ -62,7 +62,28 @@ tap.test('contructor', t => { t.end() }) -tap.test('#toBer', t => { +tap.test('pojo', t => { + t.test('adds control value', async t => { + const control = new PSC({ + value: { + size: 1, + cookie: 'foo' + } + }) + t.same(control.pojo, { + type: PSC.OID, + criticality: false, + value: { + size: 1, + cookie: Buffer.from('foo') + } + }) + }) + + t.end() +}) + +tap.test('toBer', t => { t.test('converts empty instance to BER', async t => { const target = new BerWriter() target.startSequence() @@ -116,25 +137,3 @@ tap.test('#toBer', t => { t.end() }) - -tap.test('#plainObject', t => { - t.test('adds control value', async t => { - const control = new PSC({ - value: { - size: 1, - cookie: 'foo' - } - }) - const value = control.plainObject - t.same(value, { - controlType: PSC.OID, - criticality: false, - controlValue: { - size: 1, - cookie: Buffer.from('foo') - } - }) - }) - - t.end() -}) diff --git a/lib/controls/persistent-search-control.js b/lib/controls/persistent-search-control.js index d38b9b8..12cf5ee 100644 --- a/lib/controls/persistent-search-control.js +++ b/lib/controls/persistent-search-control.js @@ -22,11 +22,15 @@ const Control = require('../control') class PersistentSearchControl extends Control { static OID = '2.16.840.1.113730.3.4.3' + /** + * @typedef {ControlParams} PersistentSearchParams + * @property {PersistentSearchControlValue | Buffer} [value] + */ + /** * Creates a new persistent search control. * - * @param {object} [options] - * @param {PersistentSearchControlValue | Buffer} [options.value] + * @param {PersistentSearchParams} [options] */ constructor (options = {}) { options.type = PersistentSearchControl.OID diff --git a/lib/controls/persistent-search-control.test.js b/lib/controls/persistent-search-control.test.js index a68022a..c3f0bb2 100644 --- a/lib/controls/persistent-search-control.test.js +++ b/lib/controls/persistent-search-control.test.js @@ -62,7 +62,24 @@ tap.test('contructor', t => { t.end() }) -tap.test('#toBer', t => { +tap.test('pojo', t => { + t.test('adds control value', async t => { + const control = new PSC() + t.same(control.pojo, { + type: PSC.OID, + criticality: false, + value: { + changeTypes: 15, + changesOnly: true, + returnECs: true + } + }) + }) + + t.end() +}) + +tap.test('toBer', t => { t.test('converts empty instance to BER', async t => { const target = new BerWriter() target.startSequence() @@ -87,21 +104,3 @@ tap.test('#toBer', t => { t.end() }) - -tap.test('#plainObject', t => { - t.test('adds control value', async t => { - const control = new PSC() - const value = control.plainObject - t.same(value, { - controlType: PSC.OID, - criticality: false, - controlValue: { - changeTypes: 15, - changesOnly: true, - returnECs: true - } - }) - }) - - t.end() -}) diff --git a/lib/controls/server-side-sorting-request-control.js b/lib/controls/server-side-sorting-request-control.js index 25cd1ac..878fa4f 100644 --- a/lib/controls/server-side-sorting-request-control.js +++ b/lib/controls/server-side-sorting-request-control.js @@ -25,11 +25,15 @@ const Control = require('../control') class ServerSideSortingRequestControl extends Control { static OID = '1.2.840.113556.1.4.473' + /** + * @typedef {ControlParams} ServerSideSortingRequestParams + * @property {ServerSideSortingRequestControlValue | SortKeyItem | Buffer} [value] + */ + /** * Creates a new server side sorting request control. * - * @param {object} [options] - * @param {ServerSideSortingRequestControlValue | SortKeyItem | Buffer} [options.value] + * @param {ServerSideSortingRequestParams} [options] */ constructor (options = { value: [] }) { options.type = ServerSideSortingRequestControl.OID @@ -94,6 +98,11 @@ class ServerSideSortingRequestControl extends Control { } } + _pojo (obj) { + obj.value = this.value + return obj + } + _toBer (ber) { if (this.value.length === 0) { return } @@ -119,10 +128,5 @@ class ServerSideSortingRequestControl extends Control { writer.endSequence() ber.writeBuffer(writer.buffer, 0x04) } - - _updatePlainObject (obj) { - obj.controlValue = this.value - return obj - } } module.exports = ServerSideSortingRequestControl diff --git a/lib/controls/server-side-sorting-request-control.test.js b/lib/controls/server-side-sorting-request-control.test.js index ba23cea..b45f4cc 100644 --- a/lib/controls/server-side-sorting-request-control.test.js +++ b/lib/controls/server-side-sorting-request-control.test.js @@ -73,7 +73,26 @@ tap.test('contructor', t => { t.end() }) -tap.test('#toBer', t => { +tap.test('pojo', t => { + t.test('adds control value', async t => { + const control = new SSSRC() + t.same(control.pojo, { + type: SSSRC.OID, + criticality: false, + value: [] + }) + }) + + t.test('_pojo', async t => { + const control = new SSSRC() + const obj = control._pojo({ value: 'change_me' }) + t.strictSame(obj, { value: [] }) + }) + + t.end() +}) + +tap.test('toBer', t => { t.test('converts empty instance to BER', async t => { const target = new BerWriter() target.startSequence() @@ -123,17 +142,3 @@ tap.test('#toBer', t => { t.end() }) - -tap.test('#plainObject', t => { - t.test('adds control value', async t => { - const control = new SSSRC() - const value = control.plainObject - t.same(value, { - controlType: SSSRC.OID, - criticality: false, - controlValue: [] - }) - }) - - t.end() -}) diff --git a/lib/controls/server-side-sorting-response-control.js b/lib/controls/server-side-sorting-response-control.js index 65412b4..976897c 100644 --- a/lib/controls/server-side-sorting-response-control.js +++ b/lib/controls/server-side-sorting-response-control.js @@ -4,23 +4,23 @@ const { BerReader, BerWriter } = require('@ldapjs/asn1') const Control = require('../control') const isObject = require('../is-object') const hasOwn = require('../has-own') -const CODES = require('@ldapjs/codes') +const { resultCodes: RESULT_CODES } = require('@ldapjs/protocol') const validCodeNames = [ - 'LDAP_SUCCESS', - 'LDAP_OPERATIONS_ERROR', - 'LDAP_TIME_LIMIT_EXCEEDED', - 'LDAP_STRONG_AUTH_REQUIRED', - 'LDAP_ADMIN_LIMIT_EXCEEDED', - 'LDAP_NO_SUCH_ATTRIBUTE', - 'LDAP_INAPPROPRIATE_MATCHING', - 'LDAP_INSUFFICIENT_ACCESS_RIGHTS', - 'LDAP_BUSY', - 'LDAP_UNWILLING_TO_PERFORM', - 'LDAP_OTHER' + 'SUCCESS', + 'OPERATIONS_ERROR', + 'TIME_LIMIT_EXCEEDED', + 'STRONGER_AUTH_REQUIRED', + 'ADMIN_LIMIT_EXCEEDED', + 'NO_SUCH_ATTRIBUTE', + 'INAPPROPRIATE_MATCHING', + 'INSUFFICIENT_ACCESS_RIGHTS', + 'BUSY', + 'UNWILLING_TO_PERFORM', + 'OTHER' ] -const filteredCodes = Object.entries(CODES).filter(([k, v]) => validCodeNames.includes(k)) +const filteredCodes = Object.entries(RESULT_CODES).filter(([k, v]) => validCodeNames.includes(k)) const VALID_CODES = new Map([ ...filteredCodes, ...filteredCodes.map(([k, v]) => { return [v, k] }) @@ -48,11 +48,15 @@ class ServerSideSortingResponseControl extends Control { */ static RESPONSE_CODES = Object.freeze(VALID_CODES) + /** + * @typedef {ControlParams} ServerSideSortingResponseParams + * @property {ServerSideSortingResponseControlResult | Buffer} value + */ + /** * Creates a new server side sorting response control. * - * @param {object} [options] - * @param {ServerSideSortingResponseControlResult | Buffer} + * @param {ServerSideSortingResponseParams} [options] */ constructor (options = {}) { options.type = ServerSideSortingResponseControl.OID @@ -103,6 +107,11 @@ class ServerSideSortingResponseControl extends Control { } } + _pojo (obj) { + obj.value = this.value + return obj + } + _toBer (ber) { if (!this._value || Object.keys(this._value).length === 0) { return } @@ -110,16 +119,11 @@ class ServerSideSortingResponseControl extends Control { writer.startSequence(0x30) writer.writeEnumeration(this.value.result) /* istanbul ignore else */ - if (this.value.result !== CODES.LDAP_SUCCESS && this.value.failedAttribute) { + if (this.value.result !== RESULT_CODES.SUCCESS && this.value.failedAttribute) { writer.writeString(this.value.failedAttribute, 0x80) } writer.endSequence() ber.writeBuffer(writer.buffer, 0x04) } - - _updatePlainObject (obj) { - obj.controlValue = this.value - return obj - } } module.exports = ServerSideSortingResponseControl diff --git a/lib/controls/server-side-sorting-response-control.test.js b/lib/controls/server-side-sorting-response-control.test.js index e186ab4..2579964 100644 --- a/lib/controls/server-side-sorting-response-control.test.js +++ b/lib/controls/server-side-sorting-response-control.test.js @@ -5,7 +5,7 @@ const { BerWriter } = require('@ldapjs/asn1') const SSSRC = require('./server-side-sorting-response-control') const Control = require('../control') -tap.test('contructor', t => { +tap.test('constructor', t => { t.test('new no args', async t => { const control = new SSSRC() t.ok(control) @@ -20,7 +20,7 @@ tap.test('contructor', t => { type: '1.2.840.113556.1.4.474', criticality: true, value: { - result: SSSRC.RESPONSE_CODES.get('LDAP_OPERATIONS_ERROR'), + result: SSSRC.RESPONSE_CODES.get('OPERATIONS_ERROR'), failedAttribute: 'foo' } }) @@ -61,7 +61,27 @@ tap.test('contructor', t => { t.end() }) -tap.test('#toBer', t => { +tap.test('pojo', t => { + t.test('adds control value', async t => { + const control = new SSSRC() + t.same(control.pojo, { + type: SSSRC.OID, + criticality: false, + value: {} + }) + }) + + t.test('_pojo', async t => { + const control = new SSSRC() + t.strictSame(control._pojo({ value: 'change_me' }), { + value: {} + }) + }) + + t.end() +}) + +tap.test('toBer', t => { t.test('converts empty instance to BER', async t => { const target = new BerWriter() target.startSequence() @@ -92,7 +112,7 @@ tap.test('#toBer', t => { const control = new SSSRC({ value: { - result: SSSRC.RESPONSE_CODES.get('LDAP_OPERATIONS_ERROR'), + result: SSSRC.RESPONSE_CODES.get('OPERATIONS_ERROR'), failedAttribute: 'foo' } }) @@ -103,17 +123,3 @@ tap.test('#toBer', t => { t.end() }) - -tap.test('#plainObject', t => { - t.test('adds control value', async t => { - const control = new SSSRC() - const value = control.plainObject - t.same(value, { - controlType: SSSRC.OID, - criticality: false, - controlValue: {} - }) - }) - - t.end() -}) diff --git a/lib/controls/virtual-list-view-request-control.js b/lib/controls/virtual-list-view-request-control.js index 22eb871..ef7b1f4 100644 --- a/lib/controls/virtual-list-view-request-control.js +++ b/lib/controls/virtual-list-view-request-control.js @@ -21,6 +21,14 @@ const Control = require('../control') class VirtualListViewRequestControl extends Control { static OID = '2.16.840.1.113730.3.4.9' + /** + * @typedef {ControlParams} VirtualListViewRequestParams + * @property {Buffer|VirtualListViewControlValue} [value] + */ + + /** + * @param {VirtualListViewRequestParams} [options] + */ constructor (options = {}) { options.type = VirtualListViewRequestControl.OID super(options) @@ -80,6 +88,11 @@ class VirtualListViewRequestControl extends Control { return false } + _pojo (obj) { + obj.value = this.value + return obj + } + _toBer (ber) { if (!this._value || this._value.length === 0) { return @@ -99,10 +112,5 @@ class VirtualListViewRequestControl extends Control { writer.endSequence() ber.writeBuffer(writer.buffer, 0x04) } - - _updatePlainObject (obj) { - obj.controlValue = this.value - return obj - } } module.exports = VirtualListViewRequestControl diff --git a/lib/controls/virtual-list-view-response-control.js b/lib/controls/virtual-list-view-response-control.js index 4bda0da..f9b1efe 100644 --- a/lib/controls/virtual-list-view-response-control.js +++ b/lib/controls/virtual-list-view-response-control.js @@ -4,24 +4,24 @@ const { Ber, BerReader, BerWriter } = require('@ldapjs/asn1') const isObject = require('../is-object') const hasOwn = require('../has-own') const Control = require('../control') -const CODES = require('@ldapjs/codes') +const { resultCodes: RESULT_CODES } = require('@ldapjs/protocol') const validCodeNames = [ - 'LDAP_SUCCESS', - 'LDAP_OPERATIONS_ERROR', - 'LDAP_UNWILLING_TO_PERFORM', - 'LDAP_INSUFFICIENT_ACCESS_RIGHTS', - 'LDAP_BUSY', - 'LDAP_TIME_LIMIT_EXCEEDED', - 'LDAP_STRONG_AUTH_REQUIRED', - 'LDAP_ADMIN_LIMIT_EXCEEDED', - 'LDAP_SORT_CONTROL_MISSING', - 'LDAP_INDEX_RANGE_ERROR', - 'LDAP_CONTROL_ERROR', - 'LDAP_OTHER' + 'SUCCESS', + 'OPERATIONS_ERROR', + 'UNWILLING_TO_PERFORM', + 'INSUFFICIENT_ACCESS_RIGHTS', + 'BUSY', + 'TIME_LIMIT_EXCEEDED', + 'STRONGER_AUTH_REQUIRED', + 'ADMIN_LIMIT_EXCEEDED', + 'SORT_CONTROL_MISSING', + 'OFFSET_RANGE_ERROR', + 'CONTROL_ERROR', + 'OTHER' ] -const filteredCodes = Object.entries(CODES).filter(([k, v]) => validCodeNames.includes(k)) +const filteredCodes = Object.entries(RESULT_CODES).filter(([k, v]) => validCodeNames.includes(k)) const VALID_CODES = new Map([ ...filteredCodes, ...filteredCodes.map(([k, v]) => { return [v, k] }) @@ -49,6 +49,14 @@ class VirtualListViewResponseControl extends Control { */ static RESPONSE_CODES = Object.freeze(VALID_CODES) + /** + * @typedef {ControlParams} VirtualListViewResponseParams + * @property {Buffer|VirtualListViewResponseControlValue} [value] + */ + + /** + * @param {VirtualListViewResponseParams} options + */ constructor (options = {}) { options.type = VirtualListViewResponseControl.OID options.criticality = false @@ -111,6 +119,11 @@ class VirtualListViewResponseControl extends Control { return false } + _pojo (obj) { + obj.value = this.value + return obj + } + _toBer (ber) { if (this.value.length === 0) { return } @@ -133,10 +146,5 @@ class VirtualListViewResponseControl extends Control { writer.endSequence() ber.writeBuffer(writer.buffer, 0x04) } - - _updatePlainObject (obj) { - obj.controlValue = this.value - return obj - } } module.exports = VirtualListViewResponseControl diff --git a/package.json b/package.json index 70453ae..f29079b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ldapjs/controls", - "version": "1.0.0", + "version": "2.0.0", "description": "LDAP control objects", "main": "index.js", "scripts": { @@ -26,17 +26,17 @@ "homepage": "https://github.com/ldapjs/controls#readme", "devDependencies": { "@fastify/pre-commit": "^2.0.2", - "eslint": "^8.17.0", + "eslint": "^8.34.0", "eslint-config-standard": "^17.0.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-n": "^15.2.1", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-n": "^15.6.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^6.0.0", - "tap": "^16.2.0" + "eslint-plugin-promise": "^6.1.1", + "tap": "^16.3.4" }, "dependencies": { - "@ldapjs/asn1": "^1.0.1", - "@ldapjs/codes": "^1.0.0" + "@ldapjs/asn1": "^1.2.0", + "@ldapjs/protocol": "^1.2.1" }, "pre-commit": [ "lint",