Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sapphiredev/utilities
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @sapphire/ts-config@3.3.3
Choose a base ref
...
head repository: sapphiredev/utilities
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @sapphire/ts-config@3.3.4
Choose a head ref
  • 6 commits
  • 61 files changed
  • 5 contributors

Commits on Mar 25, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    085a73a View commit details

Commits on Mar 27, 2022

  1. Copy the full SHA
    308cf66 View commit details

Commits on Apr 1, 2022

  1. fix(PaginatedMessage): removed duplicate page index footers on multip…

    …le embed pages (#320)
    
    Co-authored-by: Jeroen Claassens <jeroen.claassens@live.nl>
    Tokipudi and favna authored Apr 1, 2022

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    0d6934d View commit details
  2. chore: update dev deps

    favna committed Apr 1, 2022

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    493fd48 View commit details
  3. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    895ce7c View commit details
  4. chore(release): publish

     - @sapphire/async-queue@1.3.1
     - @sapphire/decorators@4.3.4
     - @sapphire/discord-utilities@2.10.3
     - @sapphire/discord.js-utilities@4.9.4
     - @sapphire/embed-jsx@2.3.1
     - @sapphire/eslint-config@4.3.3
     - @sapphire/event-iterator@1.6.1
     - @sapphire/fetch@2.3.1
     - @sapphire/phisherman@1.4.1
     - @sapphire/prettier-config@1.4.2
     - @sapphire/ratelimits@2.4.4
     - @sapphire/result@1.1.1
     - @sapphire/snowflake@3.2.1
     - @sapphire/stopwatch@1.4.1
     - @sapphire/time-utilities@1.7.4
     - @sapphire/ts-config@3.3.4
     - @sapphire/utilities@3.6.2
    favna committed Apr 1, 2022

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    bf5ac56 View commit details
Showing with 561 additions and 439 deletions.
  1. +6 −5 jest.config.ts → jest.config.mjs
  2. +10 −11 package.json
  3. +4 −0 packages/async-queue/CHANGELOG.md
  4. +15 −0 packages/async-queue/jest.config.mjs
  5. +1 −1 packages/async-queue/package.json
  6. +4 −0 packages/decorators/CHANGELOG.md
  7. +15 −0 packages/decorators/jest.config.mjs
  8. +5 −5 packages/decorators/package.json
  9. +4 −0 packages/discord-utilities/CHANGELOG.md
  10. +6 −5 packages/{discord.js-utilities/jest.config.ts → discord-utilities/jest.config.mjs}
  11. +1 −1 packages/discord-utilities/package.json
  12. +6 −0 packages/discord.js-utilities/CHANGELOG.md
  13. +6 −5 packages/{discord-utilities/jest.config.ts → discord.js-utilities/jest.config.mjs}
  14. +4 −4 packages/discord.js-utilities/package.json
  15. +13 −7 packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts
  16. +4 −0 packages/embed-jsx/CHANGELOG.md
  17. +6 −5 packages/embed-jsx/{jest.config.ts → jest.config.mjs}
  18. +2 −2 packages/embed-jsx/package.json
  19. +7 −0 packages/eslint-config/CHANGELOG.md
  20. +6 −5 packages/eslint-config/{jest.config.ts → jest.config.mjs}
  21. +6 −6 packages/eslint-config/package.json
  22. +4 −0 packages/event-iterator/CHANGELOG.md
  23. +6 −5 packages/{async-queue/jest.config.ts → event-iterator/jest.config.mjs}
  24. +1 −1 packages/event-iterator/package.json
  25. +4 −0 packages/fetch/CHANGELOG.md
  26. +6 −5 packages/{decorators/jest.config.ts → fetch/jest.config.mjs}
  27. +0 −15 packages/fetch/jest.config.ts
  28. +1 −1 packages/fetch/package.json
  29. +4 −0 packages/phisherman/CHANGELOG.md
  30. +2 −2 packages/phisherman/package.json
  31. +6 −0 packages/prettier-config/CHANGELOG.md
  32. +6 −5 packages/{event-iterator/jest.config.ts → prettier-config/jest.config.mjs}
  33. +0 −15 packages/prettier-config/jest.config.ts
  34. +2 −2 packages/prettier-config/package.json
  35. +4 −0 packages/ratelimits/CHANGELOG.md
  36. +16 −0 packages/ratelimits/jest.config.mjs
  37. +0 −15 packages/ratelimits/jest.config.ts
  38. +2 −2 packages/ratelimits/package.json
  39. +4 −0 packages/result/CHANGELOG.md
  40. +6 −5 packages/result/{jest.config.ts → jest.config.mjs}
  41. +1 −1 packages/result/package.json
  42. +4 −0 packages/snowflake/CHANGELOG.md
  43. +16 −0 packages/snowflake/jest.config.mjs
  44. +0 −15 packages/snowflake/jest.config.ts
  45. +1 −1 packages/snowflake/package.json
  46. +4 −0 packages/stopwatch/CHANGELOG.md
  47. +16 −0 packages/stopwatch/jest.config.mjs
  48. +0 −15 packages/stopwatch/jest.config.ts
  49. +1 −1 packages/stopwatch/package.json
  50. +4 −0 packages/time-utilities/CHANGELOG.md
  51. +16 −0 packages/time-utilities/jest.config.mjs
  52. +0 −15 packages/time-utilities/jest.config.ts
  53. +2 −2 packages/time-utilities/package.json
  54. +6 −0 packages/ts-config/CHANGELOG.md
  55. +6 −5 packages/ts-config/{jest.config.ts → jest.config.mjs}
  56. +2 −2 packages/ts-config/package.json
  57. +4 −0 packages/utilities/CHANGELOG.md
  58. +6 −5 packages/utilities/{jest.config.ts → jest.config.mjs}
  59. +1 −1 packages/utilities/package.json
  60. +1 −1 tsconfig.eslint.json
  61. +265 −240 yarn.lock
11 changes: 6 additions & 5 deletions jest.config.ts → jest.config.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import type { Config } from '@jest/types';

// eslint-disable-next-line @typescript-eslint/require-await
export default async (): Promise<Config.InitialOptions> => ({
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
displayName: 'unit test',
preset: 'ts-jest',
testEnvironment: 'node',
testRunner: 'jest-circus/runner',
testMatch: ['<rootDir>/packages/**/tests/**/*.test.ts', '<rootDir>/packages/**/tests/**/*.test.js', '<rootDir>/packages/**/tests/**/*.test.tsx'],
collectCoverageFrom: ['<rootDir>/packages/src/**/*.ts'],
setupFilesAfterEnv: ['jest-extended/all'],
globals: {
'ts-jest': {
@@ -20,4 +19,6 @@ export default async (): Promise<Config.InitialOptions> => ({
'<rootDir>/packages/utilities/src/index.ts',
'<rootDir>/packages/utilities/src/lib/debounce/index.ts'
]
});
};

export default config;
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -24,15 +24,15 @@
"@favware/rollup-type-bundler": "^1.0.7",
"@sapphire/framework": "^2.4.1",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.180",
"@types/node": "^17.0.21",
"@types/lodash": "^4.14.181",
"@types/node": "^17.0.23",
"@types/ws": "^8.5.3",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"cz-conventional-changelog": "^3.3.0",
"discord-api-types": "^0.26.1",
"discord.js": "^13.6.0",
"eslint": "^8.11.0",
"eslint": "^8.12.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.4",
@@ -43,18 +43,17 @@
"lint-staged": "^12.3.7",
"lodash": "^4.17.21",
"nock": "^13.2.4",
"prettier": "^2.6.0",
"prettier": "^2.6.1",
"pretty-quick": "^3.1.3",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"ts-node": "^10.7.0",
"ts-jest": "^27.1.4",
"tslib": "^2.3.1",
"tsup": "^5.12.1",
"turbo": "^1.1.6",
"tsup": "^5.12.2",
"turbo": "^1.1.10",
"typedoc": "^0.22.13",
"typedoc-plugin-djs-links": "^1.0.4",
"typedoc-plugin-mdn-links": "^1.0.5",
"typescript": "^4.6.2"
"typescript": "^4.6.3"
},
"repository": {
"type": "git",
4 changes: 4 additions & 0 deletions packages/async-queue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.3.1](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.3.0...@sapphire/async-queue@1.3.1) (2022-04-01)

**Note:** Version bump only for package @sapphire/async-queue

# [1.3.0](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.2.0...@sapphire/async-queue@1.3.0) (2022-03-06)

### Features
15 changes: 15 additions & 0 deletions packages/async-queue/jest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
displayName: 'unit test',
preset: 'ts-jest',
testEnvironment: 'node',
testRunner: 'jest-circus/runner',
testMatch: ['<rootDir>/tests/**/*.test.ts'],
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tests/tsconfig.json'
}
}
};
export default config;
2 changes: 1 addition & 1 deletion packages/async-queue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sapphire/async-queue",
"version": "1.3.0",
"version": "1.3.1",
"description": "Sequential asynchronous lock-based queue for promises",
"author": "@sapphire",
"license": "MIT",
4 changes: 4 additions & 0 deletions packages/decorators/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.3.4](https://github.com/sapphiredev/utilities/compare/@sapphire/decorators@4.3.3...@sapphire/decorators@4.3.4) (2022-04-01)

**Note:** Version bump only for package @sapphire/decorators

## [4.3.3](https://github.com/sapphiredev/utilities/compare/@sapphire/decorators@4.3.2...@sapphire/decorators@4.3.3) (2022-03-20)

**Note:** Version bump only for package @sapphire/decorators
15 changes: 15 additions & 0 deletions packages/decorators/jest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
displayName: 'unit test',
preset: 'ts-jest',
testEnvironment: 'node',
testRunner: 'jest-circus/runner',
testMatch: ['<rootDir>/tests/**/*.test.ts'],
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tests/tsconfig.json'
}
}
};
export default config;
10 changes: 5 additions & 5 deletions packages/decorators/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sapphire/decorators",
"version": "4.3.3",
"version": "4.3.4",
"description": "Useful TypeScript decorators for Sapphire Framework Discord bots",
"author": "@sapphire",
"license": "MIT",
@@ -24,10 +24,10 @@
"tslib": "^2.3.1"
},
"devDependencies": {
"@sapphire/discord-utilities": "^2.10.2",
"@sapphire/discord.js-utilities": "^4.9.3",
"@sapphire/ratelimits": "^2.4.3",
"@sapphire/utilities": "^3.6.1"
"@sapphire/discord-utilities": "^2.10.3",
"@sapphire/discord.js-utilities": "^4.9.4",
"@sapphire/ratelimits": "^2.4.4",
"@sapphire/utilities": "^3.6.2"
},
"repository": {
"type": "git",
4 changes: 4 additions & 0 deletions packages/discord-utilities/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.10.3](https://github.com/sapphiredev/utilities/compare/@sapphire/discord-utilities@2.10.2...@sapphire/discord-utilities@2.10.3) (2022-04-01)

**Note:** Version bump only for package @sapphire/discord-utilities

## [2.10.2](https://github.com/sapphiredev/utilities/compare/@sapphire/discord-utilities@2.10.1...@sapphire/discord-utilities@2.10.2) (2022-03-20)

### Bug Fixes
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import type { Config } from '@jest/types';

// eslint-disable-next-line @typescript-eslint/require-await
export default async (): Promise<Config.InitialOptions> => ({
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
displayName: 'unit test',
preset: 'ts-jest',
testEnvironment: 'node',
testRunner: 'jest-circus/runner',
testMatch: ['<rootDir>/tests/**/*.test.ts'],
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tests/tsconfig.json'
}
},
coveragePathIgnorePatterns: ['<rootDir>/tests/util/common.ts']
});
};

export default config;
2 changes: 1 addition & 1 deletion packages/discord-utilities/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sapphire/discord-utilities",
"version": "2.10.2",
"version": "2.10.3",
"description": "Discord specific utilities for your JavaScript/TypeScript bots",
"author": "@sapphire",
"license": "MIT",
6 changes: 6 additions & 0 deletions packages/discord.js-utilities/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.9.4](https://github.com/sapphiredev/utilities/compare/@sapphire/discord.js-utilities@4.9.3...@sapphire/discord.js-utilities@4.9.4) (2022-04-01)

### Bug Fixes

- **PaginatedMessage:** removed duplicate page index footers on multiple embed pages ([#320](https://github.com/sapphiredev/utilities/issues/320)) ([0d6934d](https://github.com/sapphiredev/utilities/commit/0d6934db2aba8235270df0ec8160c7915e906831))

## [4.9.3](https://github.com/sapphiredev/utilities/compare/@sapphire/discord.js-utilities@4.9.2...@sapphire/discord.js-utilities@4.9.3) (2022-03-20)

**Note:** Version bump only for package @sapphire/discord.js-utilities
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import type { Config } from '@jest/types';

// eslint-disable-next-line @typescript-eslint/require-await
export default async (): Promise<Config.InitialOptions> => ({
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
displayName: 'unit test',
preset: 'ts-jest',
testEnvironment: 'node',
testRunner: 'jest-circus/runner',
testMatch: ['<rootDir>/tests/**/*.test.ts'],
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tests/tsconfig.json'
}
},
coveragePathIgnorePatterns: ['<rootDir>/tests/util/common.ts']
});
};

export default config;
8 changes: 4 additions & 4 deletions packages/discord.js-utilities/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sapphire/discord.js-utilities",
"version": "4.9.3",
"version": "4.9.4",
"description": "Discord.js specific utilities for your JavaScript/TypeScript bots",
"author": "@sapphire",
"license": "MIT",
@@ -51,9 +51,9 @@
"access": "public"
},
"dependencies": {
"@sapphire/discord-utilities": "^2.10.2",
"@sapphire/time-utilities": "^1.7.3",
"@sapphire/utilities": "^3.6.1",
"@sapphire/discord-utilities": "^2.10.3",
"@sapphire/time-utilities": "^1.7.4",
"@sapphire/utilities": "^3.6.2",
"tslib": "^2.3.1"
}
}
Original file line number Diff line number Diff line change
@@ -1149,20 +1149,26 @@ export class PaginatedMessage {
}
}

/**
* Applies footer to the last embed of the page
* @param message The message options
* @param index The current index
* @returns The message options with the footer applied
*/
protected applyFooter(message: PaginatedMessageMessageOptionsUnion, index: number): PaginatedMessageMessageOptionsUnion {
if (!message.embeds?.length) {
return message;
}

const embedsWithFooterApplied = deepClone(message.embeds);

for (const [idx, embed] of Object.entries(embedsWithFooterApplied)) {
if (embed) {
embed.footer ??= { text: this.template.embeds?.[Number(idx)]?.footer?.text ?? this.template.embeds?.[0]?.footer?.text ?? '' };
embed.footer.text = `${this.pageIndexPrefix ? `${this.pageIndexPrefix} ` : ''}${index + 1} / ${this.pages.length}${
embed.footer.text ? ` ${this.embedFooterSeparator} ${embed.footer.text}` : ''
}`;
}
const idx = embedsWithFooterApplied.length - 1;
const lastEmbed = embedsWithFooterApplied[idx];
if (lastEmbed) {
lastEmbed.footer ??= { text: this.template.embeds?.[idx]?.footer?.text ?? this.template.embeds?.[0]?.footer?.text ?? '' };
lastEmbed.footer.text = `${this.pageIndexPrefix ? `${this.pageIndexPrefix} ` : ''}${index + 1} / ${this.pages.length}${
lastEmbed.footer.text ? ` ${this.embedFooterSeparator} ${lastEmbed.footer.text}` : ''
}`;
}

return { ...message, embeds: embedsWithFooterApplied };
4 changes: 4 additions & 0 deletions packages/embed-jsx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.3.1](https://github.com/sapphiredev/utilities/compare/@sapphire/embed-jsx@2.3.0...@sapphire/embed-jsx@2.3.1) (2022-04-01)

**Note:** Version bump only for package @sapphire/embed-jsx

# [2.3.0](https://github.com/sapphiredev/utilities/compare/@sapphire/embed-jsx@2.2.0...@sapphire/embed-jsx@2.3.0) (2022-03-06)

### Features
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import type { Config } from '@jest/types';

// eslint-disable-next-line @typescript-eslint/require-await
export default async (): Promise<Config.InitialOptions> => ({
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
displayName: 'unit test',
preset: 'ts-jest',
testEnvironment: 'node',
testRunner: 'jest-circus/runner',
testMatch: ['<rootDir>/tests/**/*.test.tsx'],
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tests/tsconfig.json'
}
}
});
};

export default config;
4 changes: 2 additions & 2 deletions packages/embed-jsx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sapphire/embed-jsx",
"version": "2.3.0",
"version": "2.3.1",
"description": "An easy way to use JSX to create discord embeds with discord.js",
"author": "@sapphire",
"license": "MIT",
@@ -25,7 +25,7 @@
"tslib": "^2.3.1"
},
"devDependencies": {
"@sapphire/async-queue": "^1.3.0"
"@sapphire/async-queue": "^1.3.1"
},
"repository": {
"type": "git",
7 changes: 7 additions & 0 deletions packages/eslint-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.3.3](https://github.com/sapphiredev/utilities/compare/@sapphire/eslint-config@4.3.2...@sapphire/eslint-config@4.3.3) (2022-04-01)

### Bug Fixes

- **deps:** update all non-major dependencies ([308cf66](https://github.com/sapphiredev/utilities/commit/308cf66056b9b3718abb6946b1bc1cc9c144c4a3))
- **eslint-config:** update dependencies ([895ce7c](https://github.com/sapphiredev/utilities/commit/895ce7c404dfe4dda2be7151ff2600668e3ecfe5))

## [4.3.2](https://github.com/sapphiredev/utilities/compare/@sapphire/eslint-config@4.3.1...@sapphire/eslint-config@4.3.2) (2022-03-20)

**Note:** Version bump only for package @sapphire/eslint-config
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import type { Config } from '@jest/types';

// eslint-disable-next-line @typescript-eslint/require-await
export default async (): Promise<Config.InitialOptions> => ({
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
displayName: 'unit test',
preset: 'ts-jest',
testEnvironment: 'node',
testRunner: 'jest-circus/runner',
testMatch: ['<rootDir>/tests/**/*.test.ts'],
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tests/tsconfig.json'
}
}
});
};

export default config;
12 changes: 6 additions & 6 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sapphire/eslint-config",
"version": "4.3.2",
"version": "4.3.3",
"description": "Standard ESLint config for the Sapphire Community",
"author": "@sapphire",
"license": "MIT",
@@ -20,13 +20,13 @@
"prepublishOnly": "yarn build"
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"eslint": "^8.11.0",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"eslint": "^8.12.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.6.0",
"typescript": "^4.6.2"
"prettier": "^2.6.1",
"typescript": "^4.6.3"
},
"repository": {
"type": "git",
Loading