Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@atproto/common

Package Overview
Dependencies
Maintainers
4
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atproto/common - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4-next.0

dist/buffers.d.ts.map

9

CHANGELOG.md
# @atproto/common
## 0.3.4-next.0
### Patch Changes
- Overhaul of package builds, no longer bundling deps.
- Updated dependencies []:
- @atproto/common-web@0.2.4-next.0
## 0.3.3

@@ -4,0 +13,0 @@

1

dist/buffers.d.ts
/// <reference types="node" />
export declare function ui8ToBuffer(bytes: Uint8Array): Buffer;
export declare function ui8ToArrayBuffer(bytes: Uint8Array): ArrayBuffer;
//# sourceMappingURL=buffers.d.ts.map
export declare function toSimplifiedISOSafe(dateStr: string): string;
//# sourceMappingURL=dates.d.ts.map
export declare const fileExists: (location: string) => Promise<boolean>;
export declare const readIfExists: (filepath: string) => Promise<Uint8Array | undefined>;
export declare const rmIfExists: (filepath: string, recursive?: boolean) => Promise<void>;
//# sourceMappingURL=fs.d.ts.map
export * from '@atproto/common-web';
export * from './dates';
export * from './env';
export * from './fs';

@@ -9,1 +10,2 @@ export * from './ipld';

export * from './buffers';
//# sourceMappingURL=index.d.ts.map
export declare const cborDecodeMulti: (encoded: Uint8Array) => unknown[];
//# sourceMappingURL=ipld-multi.d.ts.map

@@ -30,1 +30,2 @@ /// <reference types="node" />

}
//# sourceMappingURL=ipld.d.ts.map
import pino from 'pino';
export declare const subsystemLogger: (name: string) => pino.Logger;
//# sourceMappingURL=logger.d.ts.map

3

dist/streams.d.ts

@@ -15,3 +15,4 @@ /// <reference types="node" />

constructor(maxSize: number, createError: () => Error);
_transform(chunk: Uint8Array, _enc: BufferEncoding, cb: TransformCallback): void | this;
_transform(chunk: Uint8Array, _enc: BufferEncoding, cb: TransformCallback): void;
}
//# sourceMappingURL=streams.d.ts.map

@@ -1,6 +0,6 @@

const base = require('../../jest.config.base.js')
/** @type {import('jest').Config} */
module.exports = {
...base,
displayName: 'Common',
transform: { '^.+\\.(t|j)s$': '@swc/jest' },
setupFiles: ['<rootDir>/../../jest.setup.ts'],
}
Dual MIT/Apache-2.0 License
Copyright (c) 2022-2023 Bluesky PBC, and Contributors
Copyright (c) 2022-2024 Bluesky PBC, and Contributors

@@ -5,0 +5,0 @@ Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).

{
"name": "@atproto/common",
"version": "0.3.3",
"version": "0.3.4-next.0",
"license": "MIT",

@@ -16,2 +16,3 @@ "description": "Shared web-platform-friendly code for atproto libraries",

"main": "dist/index.js",
"types": "dist/index.d.ts",
"dependencies": {

@@ -24,11 +25,13 @@ "@ipld/dag-cbor": "^7.0.3",

"zod": "3.21.4",
"@atproto/common-web": "^0.2.3"
"@atproto/common-web": "^0.2.4-next.0"
},
"devDependencies": {
"jest": "^28.1.2",
"typescript": "^5.3.3",
"uint8arrays": "3.0.0"
},
"scripts": {
"test": "jest",
"build": "node ./build.js",
"postbuild": "tsc --build tsconfig.build.json",
"update-main-to-dist": "node ../../update-main-to-dist.js packages/common"
},
"types": "dist/index.d.ts"
"build": "tsc --build tsconfig.build.json"
}
}

@@ -16,1 +16,28 @@ import { isErrnoException } from '@atproto/common-web'

}
export const readIfExists = async (
filepath: string,
): Promise<Uint8Array | undefined> => {
try {
return await fs.readFile(filepath)
} catch (err) {
if (isErrnoException(err) && err.code === 'ENOENT') {
return
}
throw err
}
}
export const rmIfExists = async (
filepath: string,
recursive = false,
): Promise<void> => {
try {
await fs.rm(filepath, { recursive })
} catch (err) {
if (isErrnoException(err) && err.code === 'ENOENT') {
return
}
throw err
}
}
export * from '@atproto/common-web'
export * from './dates'
export * from './env'
export * from './fs'

@@ -4,0 +5,0 @@ export * from './ipld'

@@ -62,6 +62,7 @@ import {

if (this.totalSize > this.maxSize) {
return this.destroy(this.createError())
cb(this.createError())
} else {
cb(null, chunk)
}
return cb(null, chunk)
}
}
{
"extends": "./tsconfig.json",
"exclude": ["**/*.spec.ts", "**/*.test.ts"]
"extends": "../../tsconfig/node.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist"
},
"include": ["./src"]
}
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist", // Your outDir,
"emitDeclarationOnly": true
},
"include": ["./src", "__tests__/**/**.ts"],
"references": [{ "path": "../common-web/tsconfig.build.json" }]
"include": [],
"references": [
{ "path": "./tsconfig.build.json" },
{ "path": "./tsconfig.tests.json" }
]
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc