-
Notifications
You must be signed in to change notification settings - Fork 572
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(crypto): remove circular dependency * refactor(crypto): expose compress/decompress as part of the DidKeyPlugin interface * fix(crypto): remove import from private file * refactor: isolate tsconfig * fix: remove unused bench file * chore(repo): remove unused deps * fix(ozone): properly list dependencies * fix(services): do lint js files * fix(services/pds): remove unused deps * chore(pds): remove bench * chore(dev-env): remove unused deps * chore(api): remove bench * remove unused babel.config.js files * fix: remove .ts extension from import * fix(pds): remove imports of src files * fix(tsconfig): properly list all projects * fix(dev-env): remove imports of src files * fix(bsky): remove direct import to crypto src * fix(api): remove imports to api internals * chore(build): prevent bundling of built output * chore(dev): add "dev" script to build in watch mode * chore(deps): move ts-node dependency where it is actually used * fix(deps): add dev-env as project dependency * fix(xrpc-server): properly type kexicon * fix(bsky): improve typings * fix(pds): fully type formatRecordEmbedInternal return value * fix(repo): remove imports from @ipld/car/api * feat(dev-env): re-export BskyIngester * fix: properly lint & type jest config & test files * fix(ci): test after build * fix(types): use NodeJS.Timeout instead of NodeJS.Timer * fix(bsky): make types exportable * fix(ozone): make types exportable * fix(xrpc-server): make types exportable * fix(xprc-server): make code compliant with "node" types * fix(xrpc-server): avoid accessing properties of unknown * chore(deps): update @types/node * feat(tsconfig): narrow down available types depending on the package's target environment * fix(pds): remove unused prop * fix(bsync): Database's migrator not always initialized * fix(dev-env): remove unreachable code * fix(xrpc-server): remove unused import * fix(xrpc-server): mark header property as abstract * fix(pds): initialize LeakyTxPlugin's txOver property * fix(bsky): initialize LeakyTxPlugin's txOver property * fix(bsky): remove unused migrator from DatabaseCoordinator * fix(bsky): Properly initialize LabelService's cache property * fix(ozone): Database's migrator not initialized * fix(ozone): initialize LeakyTxPlugin's txOver property * fix(crypto): ignore unused variable error * feat(tsconfig): use stricter rules * feat(tsconfig): enable useDefineForClassFields * feat(xrpc-server): add support for brotli incoming payload * fix(xrpc-server): properly parse & process content-encoding * fix(common:stream): always call cb in _transform * tidy/fix tests and service entrypoints * Revert "fix(xrpc-server): properly parse & process content-encoding" This reverts commit 2b1c66e. * Revert "feat(xrpc-server): add support for brotli incoming payload" This reverts commit e710c21. * remove special node env for tests (defaults to jest val of "test") * kill mute sync handler on disconnect * work around connect-es bug w/ request aborts * style(crypto): rename imports from uint8arrays * fix update package-lock * fix lint * force hbs files to be bundled as cjs * fix: use concurrently instead of npm-run-all npm-run-all seems not to be maintained anymore. Additionally, concurrently better forwards signals to child processes. * remove concurrently alltogether * ignore sqlite files in services/pds * fix verify * fix verify * tidy, fix verify * fix blob diversion test * build rework changeset --------- Co-authored-by: Devin Ivy <[email protected]>
- Loading branch information
1 parent
0a2464c
commit f689bd5
Showing
232 changed files
with
1,571 additions
and
1,557 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
'@atproto/xrpc-server': minor | ||
'@atproto/common-web': minor | ||
'@atproto/identity': minor | ||
'@atproto/dev-env': minor | ||
'@atproto/lex-cli': minor | ||
'@atproto/lexicon': minor | ||
'@atproto/common': minor | ||
'@atproto/crypto': minor | ||
'@atproto/syntax': minor | ||
'@atproto/repo': minor | ||
'@atproto/xrpc': minor | ||
'@atproto/api': minor | ||
'@atproto/aws': minor | ||
'@atproto/bsync': patch | ||
'@atproto/ozone': patch | ||
'@atproto/bsky': patch | ||
'@atproto/pds': patch | ||
--- | ||
|
||
Build system rework, stop bundling dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
// jest.config.js | ||
const base = require('./jest.config.base.js') | ||
|
||
/** @type {import('jest').Config} */ | ||
module.exports = { | ||
...base, | ||
projects: ['<rootDir>/packages/*/jest.config.js'], | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
const base = require('../../jest.config.base.js') | ||
|
||
/** @type {import('jest').Config} */ | ||
module.exports = { | ||
...base, | ||
displayName: 'API', | ||
transform: { '^.+\\.(t|j)s$': '@swc/jest' }, | ||
transformIgnorePatterns: [`<rootDir>/node_modules/(?!get-port)`], | ||
testTimeout: 60000, | ||
setupFiles: ['<rootDir>/../../jest.setup.ts'], | ||
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
declare namespace jest { | ||
// eslint-disable-next-line | ||
interface Matchers<R, T = {}> { | ||
toBeModerationResult( | ||
expected: ModerationTestSuiteResultFlag[] | undefined, | ||
context?: string, | ||
stringifiedResult?: string, | ||
ignoreCause?: boolean, | ||
): R | ||
} | ||
|
||
interface Expect { | ||
toBeModerationResult( | ||
expected: ModerationTestSuiteResultFlag[] | undefined, | ||
context?: string, | ||
stringifiedResult?: string, | ||
ignoreCause?: boolean, | ||
): void | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import { ModerationUI } from './src' | ||
import { ModerationTestSuiteResultFlag } from './tests/util/moderation-behavior' | ||
|
||
expect.extend({ | ||
toBeModerationResult( | ||
actual: ModerationUI, | ||
expected: ModerationTestSuiteResultFlag[] | undefined, | ||
context: string = '', | ||
stringifiedResult: string | undefined = undefined, | ||
_ignoreCause = false, | ||
) { | ||
const fail = (msg: string) => ({ | ||
pass: false, | ||
message: () => | ||
`${msg}.${ | ||
stringifiedResult ? ` Full result: ${stringifiedResult}` : '' | ||
}`, | ||
}) | ||
// let cause = actual.causes?.type as string | ||
// if (actual.cause?.type === 'label') { | ||
// cause = `label:${actual.cause.labelDef.id}` | ||
// } else if (actual.cause?.type === 'muted') { | ||
// if (actual.cause.source.type === 'list') { | ||
// cause = 'muted-by-list' | ||
// } | ||
// } else if (actual.cause?.type === 'blocking') { | ||
// if (actual.cause.source.type === 'list') { | ||
// cause = 'blocking-by-list' | ||
// } | ||
// } | ||
if (!expected) { | ||
// if (!ignoreCause && actual.cause) { | ||
// return fail(`${context} expected to be a no-op, got ${cause}`) | ||
// } | ||
if (actual.inform) { | ||
return fail(`${context} expected to be a no-op, got inform=true`) | ||
} | ||
if (actual.alert) { | ||
return fail(`${context} expected to be a no-op, got alert=true`) | ||
} | ||
if (actual.blur) { | ||
return fail(`${context} expected to be a no-op, got blur=true`) | ||
} | ||
if (actual.filter) { | ||
return fail(`${context} expected to be a no-op, got filter=true`) | ||
} | ||
if (actual.noOverride) { | ||
return fail(`${context} expected to be a no-op, got noOverride=true`) | ||
} | ||
} else { | ||
// if (!ignoreCause && cause !== expected.cause) { | ||
// return fail(`${context} expected to be ${expected.cause}, got ${cause}`) | ||
// } | ||
const expectedInform = expected.includes('inform') | ||
if (!!actual.inform !== expectedInform) { | ||
return fail( | ||
`${context} expected to be inform=${expectedInform}, got ${ | ||
actual.inform || false | ||
}`, | ||
) | ||
} | ||
const expectedAlert = expected.includes('alert') | ||
if (!!actual.alert !== expectedAlert) { | ||
return fail( | ||
`${context} expected to be alert=${expectedAlert}, got ${ | ||
actual.alert || false | ||
}`, | ||
) | ||
} | ||
const expectedBlur = expected.includes('blur') | ||
if (!!actual.blur !== expectedBlur) { | ||
return fail( | ||
`${context} expected to be blur=${expectedBlur}, got ${ | ||
actual.blur || false | ||
}`, | ||
) | ||
} | ||
const expectedFilter = expected.includes('filter') | ||
if (!!actual.filter !== expectedFilter) { | ||
return fail( | ||
`${context} expected to be filter=${expectedFilter}, got ${ | ||
actual.filter || false | ||
}`, | ||
) | ||
} | ||
const expectedNoOverride = expected.includes('noOverride') | ||
if (!!actual.noOverride !== expectedNoOverride) { | ||
return fail( | ||
`${context} expected to be noOverride=${expectedNoOverride}, got ${ | ||
actual.noOverride || false | ||
}`, | ||
) | ||
} | ||
} | ||
return { pass: true, message: () => '' } | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.