Vigia

ترقية brotli من 1.x إلى 2.x

مقارنة الواجهة العامة لـ brotli بين 1.3.3 و2.1.0، محسوبة تلقائيًا من أنواع 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

سجل التغييرات بين هذين الإصدارين

نص نشره مؤلفو الحزمة، معروض كما هو.

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()`.

زوّد وكيل الذكاء الاصطناعي بهذه البيانات

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؟

عُلِّم 0 من الصادرات أو الأعضاء حديثًا على أنها موقوفة في brotli 2.1.0.

للوكلاء

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