From 2e3ca941b4343144d551f4e769f1d95b7d64a6ce Mon Sep 17 00:00:00 2001 From: M-Scott-Lassiter Date: Fri, 20 May 2022 13:04:47 -0700 Subject: [PATCH 01/14] build: ignore CHANGELOG.md from linting and formatting Prettier and ESLint were both trying to drive formatting for CHANGELOG.md that didn't actually result in a end difference for Github's markdown generator. It was causing unnecessary commits. As CHANGELOG.md is auto-generated, linting it is not necessary. Resolves: 44 --- .eslintignore | 3 ++- .prettierignore | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .prettierignore diff --git a/.eslintignore b/.eslintignore index 3091757..473e3ac 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,3 @@ node_modules -coverage \ No newline at end of file +coverage +CHANGELOG.md \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..0e0e791 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +node_modules +CHANGELOG.md \ No newline at end of file From 487c76790754bcbd2f1cd25a2d5a7f7b452045ac Mon Sep 17 00:00:00 2001 From: M-Scott-Lassiter Date: Fri, 20 May 2022 13:07:21 -0700 Subject: [PATCH 02/14] ci: remove contact information input field from issue templates These were superfluous and getting ignored anyway. Conversations about details and problems on these should be had in the open, not behind email. --- .github/ISSUE_TEMPLATE/bug_report.yml | 8 -------- .github/ISSUE_TEMPLATE/documentation_request.yml | 8 -------- .github/ISSUE_TEMPLATE/feature_request.yml | 8 -------- 3 files changed, 24 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index a19ca08..34003a9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -9,14 +9,6 @@ body: attributes: value: | Thank you taking the time to fill out this bug report! - - type: input - id: contact - attributes: - label: Contact Details - description: How can I get in touch with you if needed for more info? - placeholder: ex. email@example.com - validations: - required: false - type: textarea id: what-happened attributes: diff --git a/.github/ISSUE_TEMPLATE/documentation_request.yml b/.github/ISSUE_TEMPLATE/documentation_request.yml index 1f4ac5f..5ba1d6d 100644 --- a/.github/ISSUE_TEMPLATE/documentation_request.yml +++ b/.github/ISSUE_TEMPLATE/documentation_request.yml @@ -9,14 +9,6 @@ body: attributes: value: | Thank you taking the time to fill out this request! - - type: input - id: contact - attributes: - label: Contact Details - description: How can I get in touch with you if needed for more info? - placeholder: ex. email@example.com - validations: - required: false - type: input id: component attributes: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 8526337..60f309f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -9,14 +9,6 @@ body: attributes: value: | Thank you taking the time to fill out this request! - - type: input - id: contact - attributes: - label: Contact Details - description: How can I get in touch with you if needed for more info? - placeholder: ex. email@example.com - validations: - required: false - type: textarea id: description attributes: From 9e6f20680e90f9c7b70c9757b170e47e9e98394c Mon Sep 17 00:00:00 2001 From: M-Scott-Lassiter Date: Fri, 20 May 2022 13:18:08 -0700 Subject: [PATCH 03/14] add the test coverage folder to ignored prettier files list --- .prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.prettierignore b/.prettierignore index 0e0e791..473e3ac 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ node_modules +coverage CHANGELOG.md \ No newline at end of file From c2a19fa455444bd07af0968b00d2988369f7680c Mon Sep 17 00:00:00 2001 From: M-Scott-Lassiter Date: Fri, 20 May 2022 13:20:06 -0700 Subject: [PATCH 04/14] build: change the semantic-release configuration to a shared config See @m-scott-lassiter/semantic-release-github-npm-config --- package-lock.json | 34 ++++++++++++++++++++++++++++++++-- package.json | 6 ++++-- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6987431..9c37b5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,7 @@ "version": "1.5.2", "license": "MIT", "devDependencies": { - "@semantic-release/changelog": "^6.0.1", - "@semantic-release/git": "^10.0.1", + "@m-scott-lassiter/semantic-release-github-npm-config": "^1.0.4", "@types/jest": "^27.4.1", "commitizen": "^4.2.4", "cz-customizable": "^6.3.0", @@ -1626,6 +1625,23 @@ "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", "dev": true }, + "node_modules/@m-scott-lassiter/semantic-release-github-npm-config": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@m-scott-lassiter/semantic-release-github-npm-config/-/semantic-release-github-npm-config-1.0.4.tgz", + "integrity": "sha512-3oYEpFNL9X/S7he7c0IjiIyABJiJSwgRtoVB8rB9KvbyLDc5buEk6ud6FSKUZh0WF6+P4syj76yKLqI+eaq4aw==", + "dev": true, + "dependencies": { + "@semantic-release/changelog": "^6.0.1", + "@semantic-release/commit-analyzer": "^9.0.2", + "@semantic-release/git": "^10.0.1", + "@semantic-release/github": "^8.0.4", + "@semantic-release/npm": "^9.0.1", + "@semantic-release/release-notes-generator": "^10.0.3" + }, + "peerDependencies": { + "semantic-release": "^19.0.2" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -20710,6 +20726,20 @@ "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", "dev": true }, + "@m-scott-lassiter/semantic-release-github-npm-config": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@m-scott-lassiter/semantic-release-github-npm-config/-/semantic-release-github-npm-config-1.0.4.tgz", + "integrity": "sha512-3oYEpFNL9X/S7he7c0IjiIyABJiJSwgRtoVB8rB9KvbyLDc5buEk6ud6FSKUZh0WF6+P4syj76yKLqI+eaq4aw==", + "dev": true, + "requires": { + "@semantic-release/changelog": "^6.0.1", + "@semantic-release/commit-analyzer": "^9.0.2", + "@semantic-release/git": "^10.0.1", + "@semantic-release/github": "^8.0.4", + "@semantic-release/npm": "^9.0.1", + "@semantic-release/release-notes-generator": "^10.0.3" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", diff --git a/package.json b/package.json index 7e5d916..31ead9d 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,7 @@ } }, "devDependencies": { - "@semantic-release/changelog": "^6.0.1", - "@semantic-release/git": "^10.0.1", + "@m-scott-lassiter/semantic-release-github-npm-config": "^1.0.4", "@types/jest": "^27.4.1", "commitizen": "^4.2.4", "cz-customizable": "^6.3.0", @@ -66,5 +65,8 @@ }, "engines": { "node": ">=10" + }, + "release": { + "extends": "@m-scott-lassiter/semantic-release-github-npm-config" } } From f86650c9e5add7b98a7b8e2d4730f03957892cbe Mon Sep 17 00:00:00 2001 From: M-Scott-Lassiter Date: Fri, 20 May 2022 13:32:25 -0700 Subject: [PATCH 05/14] ci: add the beta branch to the publish script The new semantic-release config with this change uses a beta branch for pre-releases. --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1d762fa..7615600 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,7 +5,7 @@ name: CD Build on: push: - branches: [main] + branches: [main, beta] jobs: publish: From e1cd754472567e61b9f0b420bad3899c988afe0c Mon Sep 17 00:00:00 2001 From: M-Scott-Lassiter Date: Fri, 20 May 2022 13:36:31 -0700 Subject: [PATCH 06/14] feat: add typescript bindings to the encoder This is a beta test addressing issue #43 for testing. It adds typescript bindings in a index.d.ts file. --- .eslintignore | 3 ++- API.md | 12 ++++++--- index.d.ts | 25 ++++++++++++++++++ index.js | 29 +++++++++++++++----- index.test.js | 11 ++++---- package.json | 3 ++- release.config.js | 67 ----------------------------------------------- 7 files changed, 64 insertions(+), 86 deletions(-) create mode 100644 index.d.ts delete mode 100644 release.config.js diff --git a/.eslintignore b/.eslintignore index 473e3ac..d3decb7 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ node_modules coverage -CHANGELOG.md \ No newline at end of file +CHANGELOG.md +*.d.ts \ No newline at end of file diff --git a/API.md b/API.md index ee883b4..9e817fc 100644 --- a/API.md +++ b/API.md @@ -29,11 +29,11 @@ A class for encoding and decoding base 10 integers to a custom alphanumeric base ### Parameters -- `configOptions` **[object][21]?** Optional object defining initial settings for the class (optional, default `{}`) +- `configOptions` **[object][21]?** Optional object defining initial settings for the class (optional, default `{allowLowerCaseDictionary:false,dictionary:'ABCDEFGHIJKLMNOPQRSTUVWXYZ'}`) - - `configOptions.allowLowerCaseDictionary` **[boolean][22]?** Whether or not to allow lower case letters in the dictionary - - `configOptions.dictionary` **[string][23]?** Starting dictionary to use. Must contain only letters or numbers. Characters cannot be repeated. - If `allowLowerCaseDictionary = true`, then lower case letters are not considered the same as upper case. (e.g. 'ABCabc' has 6 unique characters.) + - `configOptions.allowLowerCaseDictionary` **[boolean][22]** Whether or not to allow lower case letters in the dictionary (optional, default `false`) + - `configOptions.dictionary` **[string][23]** Starting dictionary to use. Must contain only letters or numbers. Characters cannot be repeated. + If `allowLowerCaseDictionary = true`, then lower case letters are not considered the same as upper case. (e.g. 'ABCabc' has 6 unique characters.) (optional, default `'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`) ### Examples @@ -240,6 +240,10 @@ console.log(encoder.deconstruct('')) // undefined Returns **[Array][27]<[number][25]>** An array of numbers. Characters not present in the dictionary are treated as letters and return `undefined` for that array value. Passing an empty string (`''`), `null`, or `undefined` will return `undefined` for the whole function. +## + +Type: [string][23] + [1]: #alphanumericencoder [2]: #parameters [3]: #examples diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..ce83a64 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,25 @@ +// Manually generated from https://www.typescriptlang.org/play + +export class AlphanumericEncoder { + constructor(configOptions?: { + allowLowerCaseDictionary: boolean | undefined + dictionary: string | undefined + }) + private _defaultDictionary + private _dictionaryInUse + private _allowLowerCaseDictionary + + set allowLowerCaseDictionary(arg: boolean) + get allowLowerCaseDictionary(): boolean + + set dictionary(arg: string) + get dictionary(): string + + resetDefaultDictionary(): void + + encode(integerToEncode: number): string + + decode(stringToDecode: string): number + + deconstruct(stringToDeconstruct: string | number): number[] +} diff --git a/index.js b/index.js index 9369547..6a5e56a 100644 --- a/index.js +++ b/index.js @@ -1,10 +1,8 @@ -// @ts-check - /** * A class for encoding and decoding base 10 integers to a custom alphanumeric base representation. * @param {object} [configOptions] Optional object defining initial settings for the class - * @param {boolean} [configOptions.allowLowerCaseDictionary] Whether or not to allow lower case letters in the dictionary - * @param {string} [configOptions.dictionary] Starting dictionary to use. Must contain only letters or numbers. Characters cannot be repeated. + * @param {boolean} [configOptions.allowLowerCaseDictionary=false] Whether or not to allow lower case letters in the dictionary + * @param {string} [configOptions.dictionary='ABCDEFGHIJKLMNOPQRSTUVWXYZ'] Starting dictionary to use. Must contain only letters or numbers. Characters cannot be repeated. * If `allowLowerCaseDictionary = true`, then lower case letters are not considered the same as upper case. (e.g. 'ABCabc' has 6 unique characters.) * @example * // Import into a project @@ -26,7 +24,12 @@ * const encoder = new AlphanumericEncoder(configOptions) */ class AlphanumericEncoder { - constructor(configOptions = {}) { + constructor( + configOptions = { + allowLowerCaseDictionary: false, + dictionary: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + } + ) { /** * @private * @type {string} Internal value used to initialize and reset the dictionary @@ -209,8 +212,15 @@ class AlphanumericEncoder { ) } + /** + * Takes a letter between 0 and max letter length and returns the corresponding letter + * + * @private + * @param {number} num The index to search for + * @param {string} dictionary The dictionary used to search + * @returns {string} The letter corresponding to this number index + */ function numToLetter(num, dictionary) { - // Takes a letter between 0 and max letter length and returns the corresponding letter if (num === 0) { return undefined } @@ -330,12 +340,17 @@ class AlphanumericEncoder { } const safeString = String(stringToDeconstruct) // Force argument to string to process number arguments and prevent slice from throwing an error + /** + * @private + * @type {number[]} Array of numbers after splitting a string. + * Elements include (in order) the number or decoded number from a letter. + */ const deconstructedArray = [] let character = '' let componentPart = safeString.slice(0, 1) // Initialize with the first character (which has been guranteed present by above guard functions) // A helper function to push the final component into the array that gets returned. Numbers get added as is, strings get decoded. - const addDecodedElement = (componentString) => { + const addDecodedElement = (/** @type {string} */ componentString) => { if (componentString.match(/[0-9]/)) { deconstructedArray.push(Number.parseInt(componentString, 10)) // Numbers } else { diff --git a/index.test.js b/index.test.js index 59f488d..bce7325 100644 --- a/index.test.js +++ b/index.test.js @@ -1,8 +1,9 @@ -// @ts-check - const AlphanumericEncoder = require('./index') -let encoder = new AlphanumericEncoder() +let encoder = new AlphanumericEncoder({ + allowLowerCaseDictionary: false, + dictionary: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' +}) const numberToEncodedLetters = [ [1, 'A'], @@ -67,7 +68,6 @@ describe('Allow Lower Case Dictionaries', () => { test.each([true, 1, [123], { value: 1 }])( 'allowLowerCaseDictionary with truthy value %p', (truthyTestValue) => { - // @ts-ignore encoder.allowLowerCaseDictionary = truthyTestValue expect(encoder.allowLowerCaseDictionary).toBeTruthy() } @@ -86,7 +86,6 @@ describe('Allow Lower Case Dictionaries', () => { test.each([false, 0, null, undefined])( 'allowLowerCaseDictionary with falsy value %p', (truthyTestValue) => { - // @ts-ignore encoder.allowLowerCaseDictionary = truthyTestValue expect(encoder.allowLowerCaseDictionary).toBeFalsy() } @@ -317,7 +316,7 @@ describe('Test Decoding', () => { test('Expect decoding strings to integers greater than Number.MAX_SAFE_INTEGER throws an error', () => { expect(() => { - encoder.decode('BKTXHSOGHKKF') + encoder.decode('BKTXHSOGHKKF') // BKTXHSOGHKKE is what max safe integer encodes to under default dictionary }).toThrow(/maximum safe integer/) }) diff --git a/package.json b/package.json index 31ead9d..1ffd8c3 100644 --- a/package.json +++ b/package.json @@ -24,12 +24,13 @@ "package-lock.json" ], "main": "index.js", + "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder.git" }, "scripts": { - "build": "npm run lint && npm run test && npm run docs && npm run tableofcontents && npm run format", + "build": "npm run lint && npm run test && npm run docs && npm run tableofcontents && npm run format && echo \"Build process complete.\" && exit 0", "cz": "cz", "docs": "documentation build index.js --format md --output API.md", "format": "npx prettier . --write", diff --git a/release.config.js b/release.config.js deleted file mode 100644 index 31a9168..0000000 --- a/release.config.js +++ /dev/null @@ -1,67 +0,0 @@ -module.exports = { - branches: ['main', 'next'], - plugins: [ - [ - '@semantic-release/commit-analyzer', - { - preset: 'angular', - releaseRules: [{ scope: 'api', release: 'patch' }] - } - ], - [ - '@semantic-release/release-notes-generator', - { - preset: 'conventionalcommits', - presetConfig: { - types: [ - { - type: 'build', - section: ':building_construction: Build Changes', - hidden: false - }, - { type: 'ci', hidden: true }, - { type: 'docs', hidden: true }, - { type: 'feat', section: ':gift: Feature Changes', hidden: false }, - { type: 'fix', section: ':lady_beetle: Bug Fixes', hidden: false }, - { - type: 'perf', - section: ':fast_forward: Performance Improvements', - hidden: false - }, - { type: 'refactor', hidden: true }, - { type: 'test', section: ':dart: Test Changes', hidden: false } - ] - }, - writerOpts: { - commitsSort: ['subject', 'scope'] - } - } - ], - [ - '@semantic-release/changelog', - { - changelogFile: 'CHANGELOG.md' - } - ], - '@semantic-release/npm', - ['@semantic-release/github'], - [ - '@semantic-release/git', - { - assets: [ - 'index.js', - 'README.md', - 'API.md', - 'CHANGELOG.md', - 'CONTRIBUTING.md', - 'LICENSE', - 'package.json', - 'package-lock.json' - ], - // eslint-disable-next-line no-template-curly-in-string - message: 'docs: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}' // These variables are used in the CD script by semantic-release - } - ] - ], - preset: 'angular' -} From c375161361f82d56fe45b7ed4660d98c3a241f98 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 20 May 2022 20:37:38 +0000 Subject: [PATCH 07/14] docs: 1.6.0-beta.1 [skip ci] ## [1.6.0-beta.1](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/compare/v1.5.2...v1.6.0-beta.1) (2022-05-20) ### :building_construction: Build Changes * change the semantic-release configuration to a shared config ([c2a19fa](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/commit/c2a19fa455444bd07af0968b00d2988369f7680c)) * ignore CHANGELOG.md from linting and formatting ([2e3ca94](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/commit/2e3ca941b4343144d551f4e769f1d95b7d64a6ce)) ### :gift: Feature Changes * add typescript bindings to the encoder ([e1cd754](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/commit/e1cd754472567e61b9f0b420bad3899c988afe0c)), closes [#43](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/issues/43) --- CHANGELOG.md | 13 +++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a68875e..f92c0cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## [1.6.0-beta.1](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/compare/v1.5.2...v1.6.0-beta.1) (2022-05-20) + + +### :building_construction: Build Changes + +* change the semantic-release configuration to a shared config ([c2a19fa](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/commit/c2a19fa455444bd07af0968b00d2988369f7680c)) +* ignore CHANGELOG.md from linting and formatting ([2e3ca94](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/commit/2e3ca941b4343144d551f4e769f1d95b7d64a6ce)) + + +### :gift: Feature Changes + +* add typescript bindings to the encoder ([e1cd754](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/commit/e1cd754472567e61b9f0b420bad3899c988afe0c)), closes [#43](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/issues/43) + ### [1.5.2](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/compare/v1.5.1...v1.5.2) (2022-05-14) diff --git a/package-lock.json b/package-lock.json index 9c37b5b..1c8ecc2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alphanumeric-encoder", - "version": "1.5.2", + "version": "1.6.0-beta.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alphanumeric-encoder", - "version": "1.5.2", + "version": "1.6.0-beta.1", "license": "MIT", "devDependencies": { "@m-scott-lassiter/semantic-release-github-npm-config": "^1.0.4", diff --git a/package.json b/package.json index 1ffd8c3..15b59df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alphanumeric-encoder", - "version": "1.5.2", + "version": "1.6.0-beta.1", "description": "Encodes a number to a letter representation, or decodes it back", "keywords": [ "alphanumeric", From 009460cb87ebc18b5bbbc6fe90db932232afce1b Mon Sep 17 00:00:00 2001 From: "M. Scott Lassiter" Date: Fri, 20 May 2022 16:10:08 -0700 Subject: [PATCH 08/14] fix: add typescript definition file to "files" key Missed this when building the new package. Refer to issue #43 for details. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 15b59df..a715767 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "author": "M. Scott Lassiter", "files": [ "index.js", + "index.d.ts", "LICENSE", "package.json", "package-lock.json" From 3e51512079d6817e604a3aadb303d2ecc93c8741 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 20 May 2022 23:11:06 +0000 Subject: [PATCH 09/14] docs: 1.6.0-beta.2 [skip ci] ## [1.6.0-beta.2](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/compare/v1.6.0-beta.1...v1.6.0-beta.2) (2022-05-20) ### :lady_beetle: Bug Fixes * add typescript definition file to "files" key ([009460c](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/commit/009460cb87ebc18b5bbbc6fe90db932232afce1b)), closes [#43](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/issues/43) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f92c0cf..c427c80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.6.0-beta.2](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/compare/v1.6.0-beta.1...v1.6.0-beta.2) (2022-05-20) + + +### :lady_beetle: Bug Fixes + +* add typescript definition file to "files" key ([009460c](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/commit/009460cb87ebc18b5bbbc6fe90db932232afce1b)), closes [#43](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/issues/43) + ## [1.6.0-beta.1](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/compare/v1.5.2...v1.6.0-beta.1) (2022-05-20) diff --git a/package-lock.json b/package-lock.json index 1c8ecc2..889aef4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alphanumeric-encoder", - "version": "1.6.0-beta.1", + "version": "1.6.0-beta.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alphanumeric-encoder", - "version": "1.6.0-beta.1", + "version": "1.6.0-beta.2", "license": "MIT", "devDependencies": { "@m-scott-lassiter/semantic-release-github-npm-config": "^1.0.4", diff --git a/package.json b/package.json index a715767..4631c14 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alphanumeric-encoder", - "version": "1.6.0-beta.1", + "version": "1.6.0-beta.2", "description": "Encodes a number to a letter representation, or decodes it back", "keywords": [ "alphanumeric", From f40be7ff983cd7997be370d591b12b04e92e901f Mon Sep 17 00:00:00 2001 From: M-Scott-Lassiter Date: Mon, 23 May 2022 07:31:29 -0700 Subject: [PATCH 10/14] build: update commitizen configuration for API Updates @m-scott-lassiter/semantic-release-github-npm-config to version 2.0.0 which causes API types to trigger patches. Also upgrades the commitizen script with a more customized scope list to assist other developers. --- .cz-config.js | 45 ++++++++++++++++++++++++++++++--------------- package-lock.json | 14 +++++++------- package.json | 2 +- 3 files changed, 38 insertions(+), 23 deletions(-) diff --git a/.cz-config.js b/.cz-config.js index 69b0f3d..15ceb02 100644 --- a/.cz-config.js +++ b/.cz-config.js @@ -1,5 +1,26 @@ +const encoderMethods = [ + { name: 'dictionary' }, + { name: 'allowLowerCaseDictionary' }, + { name: 'resetDefaultDictionary' }, + { name: 'encode' }, + { name: 'decode' }, + { name: 'deconstruct' } +] + +const documentation = [ + { name: 'contributing' }, + { name: 'code of conduct' }, + { name: 'license' }, + { name: 'readme' }, + { name: 'security' } +] + module.exports = { types: [ + { + value: 'api', + name: 'api: Non-functional changes to code API documentation that help other developers understand how to use a tool or feature (i.e. intellisense)' + }, { value: 'build', name: 'build: Changes that affect the build system configuration, package scripts, or dev dependencies (i.e. adds/remove/modify/update)' @@ -26,13 +47,7 @@ module.exports = { { value: 'test', name: 'test: Add missing tests or correct existing tests' } ], - scopes: [ - { name: 'api' }, - { name: 'contributing' }, - { name: 'license' }, - { name: 'readme' }, - { name: 'security' } - ], + scopes: [...encoderMethods, ...documentation], allowTicketNumber: false, isTicketNumberRequired: false, @@ -40,16 +55,16 @@ module.exports = { ticketNumberRegExp: '\\d{1,5}', // it needs to match the value for field type. Eg.: 'fix' - /* scopeOverrides: { - fix: [ - {name: 'merge'}, - {name: 'style'}, - {name: 'e2eTest'}, - {name: 'unitTest'} - ] + api: encoderMethods, + ci: [{ name: 'publish' }, { name: 'test' }, { name: 'hooks' }], + docs: documentation, + fix: encoderMethods, + perf: encoderMethods, + refactor: encoderMethods, + test: encoderMethods }, - */ + // override the messages, defaults are as follows messages: { type: "Select the type of change that you're committing:", diff --git a/package-lock.json b/package-lock.json index 1c8ecc2..be44408 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.6.0-beta.1", "license": "MIT", "devDependencies": { - "@m-scott-lassiter/semantic-release-github-npm-config": "^1.0.4", + "@m-scott-lassiter/semantic-release-github-npm-config": "^2.0.0", "@types/jest": "^27.4.1", "commitizen": "^4.2.4", "cz-customizable": "^6.3.0", @@ -1626,9 +1626,9 @@ "dev": true }, "node_modules/@m-scott-lassiter/semantic-release-github-npm-config": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@m-scott-lassiter/semantic-release-github-npm-config/-/semantic-release-github-npm-config-1.0.4.tgz", - "integrity": "sha512-3oYEpFNL9X/S7he7c0IjiIyABJiJSwgRtoVB8rB9KvbyLDc5buEk6ud6FSKUZh0WF6+P4syj76yKLqI+eaq4aw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@m-scott-lassiter/semantic-release-github-npm-config/-/semantic-release-github-npm-config-2.0.0.tgz", + "integrity": "sha512-BtXYuLIlvz7CInKlFdJaLwvLzlJPZZB8I5fw9WgAhQ03F79CWKAmRm4SII7LuFxodDKGSM4bg/WwhNPH5TjkrA==", "dev": true, "dependencies": { "@semantic-release/changelog": "^6.0.1", @@ -20727,9 +20727,9 @@ "dev": true }, "@m-scott-lassiter/semantic-release-github-npm-config": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@m-scott-lassiter/semantic-release-github-npm-config/-/semantic-release-github-npm-config-1.0.4.tgz", - "integrity": "sha512-3oYEpFNL9X/S7he7c0IjiIyABJiJSwgRtoVB8rB9KvbyLDc5buEk6ud6FSKUZh0WF6+P4syj76yKLqI+eaq4aw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@m-scott-lassiter/semantic-release-github-npm-config/-/semantic-release-github-npm-config-2.0.0.tgz", + "integrity": "sha512-BtXYuLIlvz7CInKlFdJaLwvLzlJPZZB8I5fw9WgAhQ03F79CWKAmRm4SII7LuFxodDKGSM4bg/WwhNPH5TjkrA==", "dev": true, "requires": { "@semantic-release/changelog": "^6.0.1", diff --git a/package.json b/package.json index 15b59df..9b36b09 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ } }, "devDependencies": { - "@m-scott-lassiter/semantic-release-github-npm-config": "^1.0.4", + "@m-scott-lassiter/semantic-release-github-npm-config": "^2.0.0", "@types/jest": "^27.4.1", "commitizen": "^4.2.4", "cz-customizable": "^6.3.0", From b891650b2a0c6891bcb7a265fbd39a06908240cc Mon Sep 17 00:00:00 2001 From: M-Scott-Lassiter Date: Sat, 4 Jun 2022 07:00:28 -0700 Subject: [PATCH 11/14] fix: correct problems with Typescript definitions and JSDoc comments This might fix the problem in #43. I added @ts-check back in, changed the index.d.ts to 'declare class' instead of 'export class', and I am not getting any errors in VS Code anymore with the built in Typescript checker. However, I am not actually running Typescript, so I do not know if this will solve the problem once and for all or not. Additionally, I indentified some issues in the API documentation and have improved those. --- API.md | 13 +++++++------ index.d.ts | 16 ++++++++++------ index.js | 8 +++++--- index.test.js | 7 +++++++ 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/API.md b/API.md index 9e817fc..d20a1c2 100644 --- a/API.md +++ b/API.md @@ -175,7 +175,7 @@ console.log(encoder.encode(undefined)) // undefined - Throws **[RangeError][24]** if `integerToEncode` exceeds the maximum safe integer for Javascript (`2^53 - 1 = 9007199254740991`). -Returns **[string][23]** Dictionary encoded value +Returns **([string][23] | [undefined][26])** Dictionary encoded value. Returns undefined of passed negative numbers or NaN ### decode @@ -221,7 +221,7 @@ Takes any string of letters and numbers and deconstructs it into an array of bas #### Parameters -- `stringToDeconstruct` **([string][23] | [number][25])** A string of letters and numbers (e.g. `'A7'`, `'AC22'`, `'7C10F'`) +- `stringToDeconstruct` **[string][23]** A string of letters and numbers (e.g. `'A7'`, `'AC22'`, `'7C10F'`) #### Examples @@ -235,9 +235,9 @@ console.log(encoder.deconstruct('7AC!23A1%')) // [7, undefined, 23, 1, 1, undefi console.log(encoder.deconstruct('')) // undefined ``` -- Throws **[Error][26]** if the dictionary contains a number as this function would be unable to differentiate between where a number and dictionary value. +- Throws **[Error][27]** if the dictionary contains a number as this function would be unable to differentiate between where a number and dictionary value. -Returns **[Array][27]<[number][25]>** An array of numbers. Characters not present in the dictionary are treated as letters and return `undefined` for that array value. +Returns **([Array][28]<([number][25] | [undefined][26])> | [undefined][26])** An array of numbers. Characters not present in the dictionary are treated as letters and return `undefined` for that array value. Passing an empty string (`''`), `null`, or `undefined` will return `undefined` for the whole function. ## @@ -269,5 +269,6 @@ Type: [string][23] [23]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String [24]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RangeError [25]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number -[26]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error -[27]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array +[26]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined +[27]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error +[28]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array diff --git a/index.d.ts b/index.d.ts index ce83a64..95609ba 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,9 +1,11 @@ +// @ts-check + // Manually generated from https://www.typescriptlang.org/play -export class AlphanumericEncoder { +declare class AlphanumericEncoder { constructor(configOptions?: { - allowLowerCaseDictionary: boolean | undefined - dictionary: string | undefined + allowLowerCaseDictionary?: boolean | undefined + dictionary?: string | undefined }) private _defaultDictionary private _dictionaryInUse @@ -17,9 +19,11 @@ export class AlphanumericEncoder { resetDefaultDictionary(): void - encode(integerToEncode: number): string + encode(integerToEncode: number): string | undefined - decode(stringToDecode: string): number + decode(stringToDecode: string): number | undefined - deconstruct(stringToDeconstruct: string | number): number[] + deconstruct(stringToDeconstruct: string): (number | undefined)[] | undefined } + +export = AlphanumericEncoder diff --git a/index.js b/index.js index 6a5e56a..e301d41 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,5 @@ +// @ts-check + /** * A class for encoding and decoding base 10 integers to a custom alphanumeric base representation. * @param {object} [configOptions] Optional object defining initial settings for the class @@ -171,7 +173,7 @@ class AlphanumericEncoder { * @param {number} integerToEncode Base 10 integer. If passed a non-integer number, decimal values are truncated. * Passing zero, negative numbers, or non-numbers will return `undefined`. * @throws {RangeError} if `integerToEncode` exceeds the maximum safe integer for Javascript (`2^53 - 1 = 9007199254740991`). - * @returns {string} Dictionary encoded value + * @returns {string|undefined} Dictionary encoded value. Returns undefined of passed negative numbers or NaN * * @example * const encoder = new AlphanumericEncoder() @@ -309,9 +311,9 @@ class AlphanumericEncoder { /** * Takes any string of letters and numbers and deconstructs it into an array of base 10 integers based on the defined dictionary. * - * @param {string|number} stringToDeconstruct A string of letters and numbers (e.g. `'A7'`, `'AC22'`, `'7C10F'`) + * @param {string} stringToDeconstruct A string of letters and numbers (e.g. `'A7'`, `'AC22'`, `'7C10F'`) * @throws {Error} if the dictionary contains a number as this function would be unable to differentiate between where a number and dictionary value. - * @returns {number[]} An array of numbers. Characters not present in the dictionary are treated as letters and return `undefined` for that array value. + * @returns {(number|undefined)[]|undefined} An array of numbers. Characters not present in the dictionary are treated as letters and return `undefined` for that array value. * Passing an empty string (`''`), `null`, or `undefined` will return `undefined` for the whole function. * @example * const encoder = new AlphanumericEncoder() diff --git a/index.test.js b/index.test.js index bce7325..8abf746 100644 --- a/index.test.js +++ b/index.test.js @@ -1,3 +1,5 @@ +// @ts-check + const AlphanumericEncoder = require('./index') let encoder = new AlphanumericEncoder({ @@ -68,6 +70,7 @@ describe('Allow Lower Case Dictionaries', () => { test.each([true, 1, [123], { value: 1 }])( 'allowLowerCaseDictionary with truthy value %p', (truthyTestValue) => { + // @ts-ignore encoder.allowLowerCaseDictionary = truthyTestValue expect(encoder.allowLowerCaseDictionary).toBeTruthy() } @@ -77,6 +80,7 @@ describe('Allow Lower Case Dictionaries', () => { 'allowLowerCaseDictionary with truthy value in setup: new AlphanumericEncoder({ allowLowerCaseDictionary: %p })', (truthyTestValue) => { const setupEncoder = new AlphanumericEncoder({ + // @ts-ignore allowLowerCaseDictionary: truthyTestValue }) expect(setupEncoder.allowLowerCaseDictionary).toBeTruthy() @@ -86,6 +90,7 @@ describe('Allow Lower Case Dictionaries', () => { test.each([false, 0, null, undefined])( 'allowLowerCaseDictionary with falsy value %p', (truthyTestValue) => { + // @ts-ignore encoder.allowLowerCaseDictionary = truthyTestValue expect(encoder.allowLowerCaseDictionary).toBeFalsy() } @@ -95,6 +100,7 @@ describe('Allow Lower Case Dictionaries', () => { 'allowLowerCaseDictionary with falsy value in setup: new AlphanumericEncoder({ allowLowerCaseDictionary: %p })', (truthyTestValue) => { const setupEncoder = new AlphanumericEncoder({ + // @ts-ignore allowLowerCaseDictionary: truthyTestValue }) expect(setupEncoder.allowLowerCaseDictionary).toBeFalsy() @@ -157,6 +163,7 @@ describe('Dictionary Validation', () => { expect(() => { // eslint-disable-next-line no-unused-vars const setupEncoder = new AlphanumericEncoder({ + // @ts-ignore dictionary: dictionaryInput }) }).toThrow() From 8bddcb738d0fac7f8e6bd07668758ddf051ff284 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 4 Jun 2022 14:01:27 +0000 Subject: [PATCH 12/14] docs: 1.6.0-beta.3 [skip ci] ## [1.6.0-beta.3](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/compare/v1.6.0-beta.2...v1.6.0-beta.3) (2022-06-04) ### :building_construction: Build Changes * update commitizen configuration for API ([f40be7f](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/commit/f40be7ff983cd7997be370d591b12b04e92e901f)) ### :lady_beetle: Bug Fixes * correct problems with Typescript definitions and JSDoc comments ([b891650](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/commit/b891650b2a0c6891bcb7a265fbd39a06908240cc)), closes [#43](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/issues/43) --- CHANGELOG.md | 12 ++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c427c80..47daf42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## [1.6.0-beta.3](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/compare/v1.6.0-beta.2...v1.6.0-beta.3) (2022-06-04) + + +### :building_construction: Build Changes + +* update commitizen configuration for API ([f40be7f](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/commit/f40be7ff983cd7997be370d591b12b04e92e901f)) + + +### :lady_beetle: Bug Fixes + +* correct problems with Typescript definitions and JSDoc comments ([b891650](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/commit/b891650b2a0c6891bcb7a265fbd39a06908240cc)), closes [#43](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/issues/43) + ## [1.6.0-beta.2](https://github.com/M-Scott-Lassiter/Alphanumeric-Encoder/compare/v1.6.0-beta.1...v1.6.0-beta.2) (2022-05-20) diff --git a/package-lock.json b/package-lock.json index b081c4a..ec70ccd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alphanumeric-encoder", - "version": "1.6.0-beta.2", + "version": "1.6.0-beta.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alphanumeric-encoder", - "version": "1.6.0-beta.2", + "version": "1.6.0-beta.3", "license": "MIT", "devDependencies": { "@m-scott-lassiter/semantic-release-github-npm-config": "^2.0.0", diff --git a/package.json b/package.json index 2f0497a..fff71cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alphanumeric-encoder", - "version": "1.6.0-beta.2", + "version": "1.6.0-beta.3", "description": "Encodes a number to a letter representation, or decodes it back", "keywords": [ "alphanumeric", From 150c77bff7baf2e414375b1e2661e23d7f3ea901 Mon Sep 17 00:00:00 2001 From: M-Scott-Lassiter Date: Sat, 4 Jun 2022 07:10:01 -0700 Subject: [PATCH 13/14] build: update dev dependencies --- package-lock.json | 164 +++++++++++++++++++++++----------------------- 1 file changed, 81 insertions(+), 83 deletions(-) diff --git a/package-lock.json b/package-lock.json index ec70ccd..22e1f79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "semantic-release": "^19.0.2" }, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/@babel/code-frame": { @@ -2820,7 +2820,7 @@ "node_modules/ansi-html": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "integrity": "sha512-JoAxEa1DfP9m2xfB/y2r/aKcwXNlltr4+0QSBC4TrLfcxyvepX2Pv0t/xpgGV5bGsDzCYV8SzjWgyCW0T9yYbA==", "dev": true, "engines": [ "node >= 0.8.0" @@ -7123,7 +7123,7 @@ "node_modules/glob-stream": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "integrity": "sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==", "dev": true, "dependencies": { "extend": "^3.0.0", @@ -7144,7 +7144,7 @@ "node_modules/glob-stream/node_modules/glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", "dev": true, "dependencies": { "is-glob": "^3.1.0", @@ -12339,9 +12339,9 @@ } }, "node_modules/npm": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/npm/-/npm-8.8.0.tgz", - "integrity": "sha512-MDHVaj0zrinLkshylII8pT46VCkAUqQfYRS+pyuuZZtBZRRphH/IG5HC1YbIc77AX5FmLUWGvu23Kah5fscIbw==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/npm/-/npm-8.12.1.tgz", + "integrity": "sha512-0yOlhfgu1UzP6UijnaFuIS2bES2H9D90EA5OVsf2iOZw7VBrjntXKEwKfCaFA6vMVWkCP8qnPwCxxPdnDVwlNw==", "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", @@ -12426,7 +12426,7 @@ "@npmcli/run-script": "^3.0.1", "abbrev": "~1.1.1", "archy": "~1.0.0", - "cacache": "^16.0.6", + "cacache": "^16.1.0", "chalk": "^4.1.2", "chownr": "^2.0.0", "cli-columns": "^4.0.0", @@ -12451,7 +12451,7 @@ "libnpmsearch": "^5.0.2", "libnpmteam": "^4.0.2", "libnpmversion": "^3.0.1", - "make-fetch-happen": "^10.1.2", + "make-fetch-happen": "^10.1.6", "minipass": "^3.1.6", "minipass-pipeline": "^1.2.4", "mkdirp": "^1.0.4", @@ -12468,7 +12468,7 @@ "npm-user-validate": "^1.0.1", "npmlog": "^6.0.2", "opener": "^1.5.2", - "pacote": "^13.1.1", + "pacote": "^13.6.0", "parse-conflict-json": "^2.0.2", "proc-log": "^2.0.1", "qrcode-terminal": "^0.12.0", @@ -12478,7 +12478,7 @@ "readdir-scoped-modules": "^1.1.0", "rimraf": "^3.0.2", "semver": "^7.3.7", - "ssri": "^9.0.0", + "ssri": "^9.0.1", "tar": "^6.1.11", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", @@ -12530,7 +12530,7 @@ "license": "ISC" }, "node_modules/npm/node_modules/@npmcli/arborist": { - "version": "5.1.1", + "version": "5.2.1", "dev": true, "inBundle": true, "license": "ISC", @@ -12914,7 +12914,7 @@ } }, "node_modules/npm/node_modules/builtins": { - "version": "5.0.0", + "version": "5.0.1", "dev": true, "inBundle": true, "license": "MIT", @@ -12923,7 +12923,7 @@ } }, "node_modules/npm/node_modules/cacache": { - "version": "16.0.6", + "version": "16.1.0", "dev": true, "inBundle": true, "license": "ISC", @@ -13260,7 +13260,7 @@ } }, "node_modules/npm/node_modules/glob": { - "version": "8.0.1", + "version": "8.0.3", "dev": true, "inBundle": true, "license": "ISC", @@ -13269,8 +13269,7 @@ "inflight": "^1.0.4", "inherits": "2", "minimatch": "^5.0.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "once": "^1.3.0" }, "engines": { "node": ">=12" @@ -13345,7 +13344,7 @@ } }, "node_modules/npm/node_modules/https-proxy-agent": { - "version": "5.0.0", + "version": "5.0.1", "dev": true, "inBundle": true, "license": "MIT", @@ -13459,7 +13458,7 @@ } }, "node_modules/npm/node_modules/ip": { - "version": "1.1.5", + "version": "1.1.8", "dev": true, "inBundle": true, "license": "MIT" @@ -13486,7 +13485,7 @@ } }, "node_modules/npm/node_modules/is-core-module": { - "version": "2.8.1", + "version": "2.9.0", "dev": true, "inBundle": true, "license": "MIT", @@ -13543,7 +13542,7 @@ "license": "MIT" }, "node_modules/npm/node_modules/just-diff": { - "version": "5.0.1", + "version": "5.0.2", "dev": true, "inBundle": true, "license": "MIT" @@ -13589,7 +13588,7 @@ } }, "node_modules/npm/node_modules/libnpmexec": { - "version": "4.0.5", + "version": "4.0.6", "dev": true, "inBundle": true, "license": "ISC", @@ -13650,14 +13649,14 @@ } }, "node_modules/npm/node_modules/libnpmpack": { - "version": "4.0.3", + "version": "4.1.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "@npmcli/run-script": "^3.0.0", "npm-package-arg": "^9.0.1", - "pacote": "^13.0.5" + "pacote": "^13.5.0" }, "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -13721,7 +13720,7 @@ } }, "node_modules/npm/node_modules/lru-cache": { - "version": "7.8.1", + "version": "7.9.0", "dev": true, "inBundle": true, "license": "ISC", @@ -13730,13 +13729,13 @@ } }, "node_modules/npm/node_modules/make-fetch-happen": { - "version": "10.1.2", + "version": "10.1.6", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", - "cacache": "^16.0.2", + "cacache": "^16.1.0", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", @@ -13757,7 +13756,7 @@ } }, "node_modules/npm/node_modules/minimatch": { - "version": "5.0.1", + "version": "5.1.0", "dev": true, "inBundle": true, "license": "ISC", @@ -13950,7 +13949,7 @@ } }, "node_modules/npm/node_modules/node-gyp/node_modules/glob": { - "version": "7.2.0", + "version": "7.2.3", "dev": true, "inBundle": true, "license": "ISC", @@ -13958,7 +13957,7 @@ "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -14065,7 +14064,7 @@ } }, "node_modules/npm/node_modules/npm-packlist": { - "version": "5.0.2", + "version": "5.1.0", "dev": true, "inBundle": true, "license": "ISC", @@ -14183,7 +14182,7 @@ } }, "node_modules/npm/node_modules/pacote": { - "version": "13.1.1", + "version": "13.6.0", "dev": true, "inBundle": true, "license": "ISC", @@ -14199,7 +14198,7 @@ "minipass": "^3.1.6", "mkdirp": "^1.0.4", "npm-package-arg": "^9.0.0", - "npm-packlist": "^5.0.0", + "npm-packlist": "^5.1.0", "npm-pick-manifest": "^7.0.0", "npm-registry-fetch": "^13.0.1", "proc-log": "^2.0.0", @@ -14413,7 +14412,7 @@ } }, "node_modules/npm/node_modules/rimraf/node_modules/glob": { - "version": "7.2.0", + "version": "7.2.3", "dev": true, "inBundle": true, "license": "ISC", @@ -14421,7 +14420,7 @@ "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -14535,14 +14534,14 @@ } }, "node_modules/npm/node_modules/socks-proxy-agent": { - "version": "6.1.1", + "version": "6.2.0", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { "agent-base": "^6.0.2", - "debug": "^4.3.1", - "socks": "^2.6.1" + "debug": "^4.3.3", + "socks": "^2.6.2" }, "engines": { "node": ">= 10" @@ -14581,7 +14580,7 @@ "license": "CC0-1.0" }, "node_modules/npm/node_modules/ssri": { - "version": "9.0.0", + "version": "9.0.1", "dev": true, "inBundle": true, "license": "ISC", @@ -16784,9 +16783,9 @@ } }, "node_modules/semver-regex": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.3.tgz", - "integrity": "sha512-Aqi54Mk9uYTjVexLnR67rTyBusmwd04cLkHy9hNvk3+G3nT2Oyg7E0l4XVbOaNwIvQ3hHeYxGcyEy+mKreyBFQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.4.tgz", + "integrity": "sha512-6IiqeZNgq01qGf0TId0t3NvKzSvUsjcpdEO3AQNeIjR6A2+ckTnQlDpl4qu1bjRv0RzN3FP9hzFmws3lKqRWkA==", "dev": true, "engines": { "node": ">=8" @@ -21700,7 +21699,7 @@ "ansi-html": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "integrity": "sha512-JoAxEa1DfP9m2xfB/y2r/aKcwXNlltr4+0QSBC4TrLfcxyvepX2Pv0t/xpgGV5bGsDzCYV8SzjWgyCW0T9yYbA==", "dev": true }, "ansi-red": { @@ -25056,7 +25055,7 @@ "glob-stream": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "integrity": "sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==", "dev": true, "requires": { "extend": "^3.0.0", @@ -25074,7 +25073,7 @@ "glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", "dev": true, "requires": { "is-glob": "^3.1.0", @@ -28972,9 +28971,9 @@ } }, "npm": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/npm/-/npm-8.8.0.tgz", - "integrity": "sha512-MDHVaj0zrinLkshylII8pT46VCkAUqQfYRS+pyuuZZtBZRRphH/IG5HC1YbIc77AX5FmLUWGvu23Kah5fscIbw==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/npm/-/npm-8.12.1.tgz", + "integrity": "sha512-0yOlhfgu1UzP6UijnaFuIS2bES2H9D90EA5OVsf2iOZw7VBrjntXKEwKfCaFA6vMVWkCP8qnPwCxxPdnDVwlNw==", "dev": true, "requires": { "@isaacs/string-locale-compare": "^1.1.0", @@ -28987,7 +28986,7 @@ "@npmcli/run-script": "^3.0.1", "abbrev": "~1.1.1", "archy": "~1.0.0", - "cacache": "^16.0.6", + "cacache": "^16.1.0", "chalk": "^4.1.2", "chownr": "^2.0.0", "cli-columns": "^4.0.0", @@ -29012,7 +29011,7 @@ "libnpmsearch": "^5.0.2", "libnpmteam": "^4.0.2", "libnpmversion": "^3.0.1", - "make-fetch-happen": "^10.1.2", + "make-fetch-happen": "^10.1.6", "minipass": "^3.1.6", "minipass-pipeline": "^1.2.4", "mkdirp": "^1.0.4", @@ -29029,7 +29028,7 @@ "npm-user-validate": "^1.0.1", "npmlog": "^6.0.2", "opener": "^1.5.2", - "pacote": "^13.1.1", + "pacote": "^13.6.0", "parse-conflict-json": "^2.0.2", "proc-log": "^2.0.1", "qrcode-terminal": "^0.12.0", @@ -29039,7 +29038,7 @@ "readdir-scoped-modules": "^1.1.0", "rimraf": "^3.0.2", "semver": "^7.3.7", - "ssri": "^9.0.0", + "ssri": "^9.0.1", "tar": "^6.1.11", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", @@ -29066,7 +29065,7 @@ "dev": true }, "@npmcli/arborist": { - "version": "5.1.1", + "version": "5.2.1", "bundled": true, "dev": true, "requires": { @@ -29342,7 +29341,7 @@ } }, "builtins": { - "version": "5.0.0", + "version": "5.0.1", "bundled": true, "dev": true, "requires": { @@ -29350,7 +29349,7 @@ } }, "cacache": { - "version": "16.0.6", + "version": "16.1.0", "bundled": true, "dev": true, "requires": { @@ -29589,7 +29588,7 @@ } }, "glob": { - "version": "8.0.1", + "version": "8.0.3", "bundled": true, "dev": true, "requires": { @@ -29597,8 +29596,7 @@ "inflight": "^1.0.4", "inherits": "2", "minimatch": "^5.0.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "once": "^1.3.0" } }, "graceful-fs": { @@ -29648,7 +29646,7 @@ } }, "https-proxy-agent": { - "version": "5.0.0", + "version": "5.0.1", "bundled": true, "dev": true, "requires": { @@ -29730,7 +29728,7 @@ } }, "ip": { - "version": "1.1.5", + "version": "1.1.8", "bundled": true, "dev": true }, @@ -29748,7 +29746,7 @@ } }, "is-core-module": { - "version": "2.8.1", + "version": "2.9.0", "bundled": true, "dev": true, "requires": { @@ -29786,7 +29784,7 @@ "dev": true }, "just-diff": { - "version": "5.0.1", + "version": "5.0.2", "bundled": true, "dev": true }, @@ -29822,7 +29820,7 @@ } }, "libnpmexec": { - "version": "4.0.5", + "version": "4.0.6", "bundled": true, "dev": true, "requires": { @@ -29867,13 +29865,13 @@ } }, "libnpmpack": { - "version": "4.0.3", + "version": "4.1.0", "bundled": true, "dev": true, "requires": { "@npmcli/run-script": "^3.0.0", "npm-package-arg": "^9.0.1", - "pacote": "^13.0.5" + "pacote": "^13.5.0" } }, "libnpmpublish": { @@ -29918,17 +29916,17 @@ } }, "lru-cache": { - "version": "7.8.1", + "version": "7.9.0", "bundled": true, "dev": true }, "make-fetch-happen": { - "version": "10.1.2", + "version": "10.1.6", "bundled": true, "dev": true, "requires": { "agentkeepalive": "^4.2.1", - "cacache": "^16.0.2", + "cacache": "^16.1.0", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", @@ -29946,7 +29944,7 @@ } }, "minimatch": { - "version": "5.0.1", + "version": "5.1.0", "bundled": true, "dev": true, "requires": { @@ -30079,14 +30077,14 @@ } }, "glob": { - "version": "7.2.0", + "version": "7.2.3", "bundled": true, "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } @@ -30160,7 +30158,7 @@ } }, "npm-packlist": { - "version": "5.0.2", + "version": "5.1.0", "bundled": true, "dev": true, "requires": { @@ -30242,7 +30240,7 @@ } }, "pacote": { - "version": "13.1.1", + "version": "13.6.0", "bundled": true, "dev": true, "requires": { @@ -30257,7 +30255,7 @@ "minipass": "^3.1.6", "mkdirp": "^1.0.4", "npm-package-arg": "^9.0.0", - "npm-packlist": "^5.0.0", + "npm-packlist": "^5.1.0", "npm-pick-manifest": "^7.0.0", "npm-registry-fetch": "^13.0.1", "proc-log": "^2.0.0", @@ -30403,14 +30401,14 @@ } }, "glob": { - "version": "7.2.0", + "version": "7.2.3", "bundled": true, "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } @@ -30479,13 +30477,13 @@ } }, "socks-proxy-agent": { - "version": "6.1.1", + "version": "6.2.0", "bundled": true, "dev": true, "requires": { "agent-base": "^6.0.2", - "debug": "^4.3.1", - "socks": "^2.6.1" + "debug": "^4.3.3", + "socks": "^2.6.2" } }, "spdx-correct": { @@ -30517,7 +30515,7 @@ "dev": true }, "ssri": { - "version": "9.0.0", + "version": "9.0.1", "bundled": true, "dev": true, "requires": { @@ -32159,9 +32157,9 @@ } }, "semver-regex": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.3.tgz", - "integrity": "sha512-Aqi54Mk9uYTjVexLnR67rTyBusmwd04cLkHy9hNvk3+G3nT2Oyg7E0l4XVbOaNwIvQ3hHeYxGcyEy+mKreyBFQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.4.tgz", + "integrity": "sha512-6IiqeZNgq01qGf0TId0t3NvKzSvUsjcpdEO3AQNeIjR6A2+ckTnQlDpl4qu1bjRv0RzN3FP9hzFmws3lKqRWkA==", "dev": true }, "set-blocking": { From b3c253fbc2f520cfb97ce368797bdbc3601a2813 Mon Sep 17 00:00:00 2001 From: M-Scott-Lassiter Date: Sat, 4 Jun 2022 07:10:42 -0700 Subject: [PATCH 14/14] ci(test): remove support for Node v12 This version has reached end of life and will no longer get supported in the test scripts. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2a8bcc..83368e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [12.x, 14.x, 16.x, 17.x, 18.x] + node-version: [14.x, 16.x, 17.x, 18.x] os: [ubuntu-latest, windows-latest, macos-latest] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/