Vigia

brotli को 1.x से 2.x पर अपग्रेड करना

brotli 1.3.3 और 2.1.0 के सार्वजनिक API की तुलना, उनके TypeScript टाइप से अपने-आप निकाली गई। बदला हुआ सिग्नेचर संभावित असंगत बदलाव है, निश्चितता नहीं।

सारांश

हटाए गए इम्पोर्ट पाथ0
हटाए गए एक्सपोर्ट0
बदले गए सिग्नेचर2
क्लास या इंटरफ़ेस के हटाए गए सदस्य0
क्लास या इंटरफ़ेस के बदले गए सदस्य0
नए डिप्रिकेटेड0
आवश्यकताओं में बदलाव (engines, peer निर्भरताएँ)0
नए एक्सपोर्ट4

हटाए गए एक्सपोर्ट

कुछ नहीं मिला।

बदले गए सिग्नेचर

exportपहलेबाद में
brotli · compress(buffer: Buffer, options?: CompressOptions | undefined): Uint8Array<ArrayBufferLike> | null(buffer: string | ArrayLike<number>, options?: boolean | CompressOptions | undefined): Promise<Uint8Array<ArrayBufferLike> | null>
brotli · decompress(buffer: Buffer, outputSize?: number | undefined): Uint8Array<ArrayBufferLike>(buffer: ArrayLike<number>, outSize?: number | null | undefined): Uint8Array<ArrayBufferLike>

क्लास या इंटरफ़ेस के हटाए गए सदस्य

कुछ नहीं मिला।

क्लास या इंटरफ़ेस के बदले गए सदस्य

कुछ नहीं मिला।

नए डिप्रिकेटेड

कुछ नहीं मिला।

आवश्यकताओं में बदलाव (engines, peer निर्भरताएँ)

कुछ नहीं मिला।

नए एक्सपोर्ट (4)
importexportkind
brotliCompressOptionsinterface
brotli/compresscompressfunction
brotli/compressCompressOptionsinterface
brotli/decompressdecompressfunction

इन संस्करणों के बीच का changelog

पैकेज के लेखकों द्वारा प्रकाशित पाठ, जैसा है वैसा दिखाया गया।

2.1.0
### Changed
 - Use the nullish coalescing (??) operator to check if the value is defined (#38)
 - Use imports field to ship differential implementation for node and browser
2.0.0
### Changed

- **Breaking:** Converted the package to ESM only. All public entry points use
  named `compress` and/or `decompress` exports with no default export.
- **Breaking:** `compress()` now returns `Promise<Uint8Array | null>` and must
  be awaited. Compression options, output bytes, and `null` results are unchanged.
  `decompress()` remains synchronous.
- Public entry points are limited to the package root, `brotli/compress`, and
  `brotli/decompress`, including `.js` aliases for both standalone modules.
  Standalone modules export their named function.
- Encoder initialization is deferred until the first compression call. Concurrent
  calls share one initialization Promise, including failures, with no automatic
  retries. Initialization and runtime errors reject the compression Promise.
- Removed top-level await and enabled modern Node.js `require()` through every
  public entry point. Unflagged ESM loading is supported in Node 20.19+, 22.12+,
  and later releases; see the [Node documentation](https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require).
  The distribution remains ESM only.
- Encoding still runs on the calling thread without workers. Keep the input,
  options, and dictionary unchanged until compression settles; no input copying
  is added.

### Added

- TypeScript declarations for the package root and standalone modules, including
  their `.js` aliases and the `CompressOptions` type.
- Tests for ESM and CommonJS exports, lazy and shared initialization, Promise
  results and failures, and browser bundles, including dictionary initialization
  and decompression without the encoder.

### Migration

```javascript
import { compress, decompress } from 'brotli';

const compressed = await compress(input);
const original = decompress(compressed);
```

To load either function independently:

```javascript
import { compress } from 'brotli/compress';
import { decompress } from 'brotli/decompress';
```

Modern Node.js CommonJS consumers can destructure named exports from the root
or standalone modules:

```javascript
const { compress, decompress } = require('brotli');
// Alternatively: const { compress } = require('brotli/compress');

compress(input).then(compressed => {
  const original = decompress(compressed);
}).catch(console.error);
```

Older Node.js CommonJS consumers can continue to use dynamic `import()`.

अपने AI एजेंट को ये तथ्य दें

Vigia एक मुफ़्त MCP सर्वर है: आपका कोडिंग एजेंट कोड लिखने से पहले वर्ज़न, ब्रेकिंग बदलाव और कमज़ोरियाँ जाँचता है। न साइनअप, न API कुंजी।

claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp

Cursor में जोड़ेंVS Code में जोड़ें★ GitHub पर स्टार दें

कोई भी दूसरा MCP क्लाइंट
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }

एजेंट स्किल (SKILL.md): एजेंट को बताती है कि Vigia कब इस्तेमाल करना है · पुल रिक्वेस्ट के लिए GitHub Action

अक्सर पूछे जाने वाले प्रश्न

brotli को 1 से 2 पर अपग्रेड करने पर कौन-से असंगत बदलाव हैं?

brotli 1.3.3 और 2.1.0 के बीच Vigia को 0 हटाए गए एक्सपोर्ट, 2 बदले गए सिग्नेचर और 0 हटाए या बदले गए क्लास/इंटरफ़ेस सदस्य मिले।

brotli 2 में क्या डिप्रिकेट हुआ?

brotli 2.1.0 में 0 एक्सपोर्ट या सदस्य नए रूप से डिप्रिकेटेड चिह्नित हैं।

एजेंटों के लिए

GET https://vigia.coredls.cloud/v1/packages/npm/brotli/upgrade?from=1.3.3&to=2.1.0