Skip to content

Commit

Permalink
refactor: rename to nanotar
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Dec 9, 2023
1 parent 56257e7 commit c1247bd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 30 deletions.
11 changes: 4 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# Changelog


## v0.1.1


### 🚀 Enhancements

- Support compression and decompression ([aac7d21](https://github.com/unjs/mircrotar/commit/aac7d21))
- Support compression and decompression ([aac7d21](https://github.com/unjs/nanotar/commit/aac7d21))

### 🏡 Chore

- Apply automated fixes ([a5bb6c7](https://github.com/unjs/mircrotar/commit/a5bb6c7))
- Update readme ([0584b0d](https://github.com/unjs/mircrotar/commit/0584b0d))
- Lint ([14289aa](https://github.com/unjs/mircrotar/commit/14289aa))
- Apply automated fixes ([a5bb6c7](https://github.com/unjs/nanotar/commit/a5bb6c7))
- Update readme ([0584b0d](https://github.com/unjs/nanotar/commit/0584b0d))
- Lint ([14289aa](https://github.com/unjs/nanotar/commit/14289aa))

### ❤️ Contributors

- Pooya Parsa ([@pi0](http://github.com/pi0))

38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 📼 mircrotar
# 📼 nanotar

[![npm version][npm-version-src]][npm-version-href]
[![bundle][bundle-src]][bundle-href]
Expand All @@ -24,16 +24,16 @@ Install package:

```sh
# npm
npm install mircrotar
npm install nanotar

# yarn
yarn add mircrotar
yarn add nanotar

# pnpm
pnpm install mircrotar
pnpm install nanotar

# bun
bun install mircrotar
bun install nanotar
```

Import:
Expand All @@ -46,10 +46,10 @@ import {
createTarGzipStream,
parseTar,
parseTarGzip,
} from "mircrotar";
} from "nanotar";

// CommonJS
const { createTar } = require("mircrotar");
const { createTar } = require("nanotar");
```

## Creating a tar archive
Expand All @@ -76,7 +76,7 @@ Possible attributes are:
**Example:**

```ts
import { createTar } from "mircrotar";
import { createTar } from "nanotar";

const data = createTar(
[
Expand All @@ -95,7 +95,7 @@ const data = createTar(
You can optionaly use `createTarGzip` or `createTarGzipStream` to create a compressed tar data stream (returned value is a [`Promise<Uint8Array>`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) or [`RedableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) piped to [`CompressionStream`](https://developer.mozilla.org/en-US/docs/Web/API/CompressionStream))

```js
import { createTarGzip, createTarGzipStream } from "mircrotar";
import { createTarGzip, createTarGzipStream } from "nanotar";

createTarGzip([]); // Promise<Uint8Array>

Expand All @@ -109,7 +109,7 @@ Easily parse a tar archive using `parseTar` utility.
**Example:**

```ts
import { parseTar } from "mircrotar";
import { parseTar } from "nanotar";

// Read tar data from file or other sources into an ArrayBuffer or Uint8Array

Expand Down Expand Up @@ -144,7 +144,7 @@ Parsed files array has two additional properties: `size` file size and `text`, a
If input is compressed, you can use `parseTarGzip` utility instead to parse it (it used [`DecompressionStream`](https://developer.mozilla.org/en-US/docs/Web/API/DecompressionStream) internally and return a `Promise<Uint8Array>` value)

```js
import { parseTarGzip } from "mircrotar";
import { parseTarGzip } from "nanotar";

parseTarGzip(data); // Promise<Uint8Array>
```
Expand All @@ -167,11 +167,11 @@ Published under the [MIT License](./LICENSE).

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/mircrotar?style=flat&colorA=18181B&colorB=F0DB4F
[npm-version-href]: https://npmjs.com/package/mircrotar
[npm-downloads-src]: https://img.shields.io/npm/dm/mircrotar?style=flat&colorA=18181B&colorB=F0DB4F
[npm-downloads-href]: https://npmjs.com/package/mircrotar
[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/mircrotar/main?style=flat&colorA=18181B&colorB=F0DB4F
[codecov-href]: https://codecov.io/gh/unjs/mircrotar
[bundle-src]: https://img.shields.io/bundlephobia/minzip/mircrotar?style=flat&colorA=18181B&colorB=F0DB4F
[bundle-href]: https://bundlephobia.com/result?p=mircrotar
[npm-version-src]: https://img.shields.io/npm/v/nanotar?style=flat&colorA=18181B&colorB=F0DB4F
[npm-version-href]: https://npmjs.com/package/nanotar
[npm-downloads-src]: https://img.shields.io/npm/dm/nanotar?style=flat&colorA=18181B&colorB=F0DB4F
[npm-downloads-href]: https://npmjs.com/package/nanotar
[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/nanotar/main?style=flat&colorA=18181B&colorB=F0DB4F
[codecov-href]: https://codecov.io/gh/unjs/nanotar
[bundle-src]: https://img.shields.io/bundlephobia/minzip/nanotar?style=flat&colorA=18181B&colorB=F0DB4F
[bundle-href]: https://bundlephobia.com/result?p=nanotar
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "mircrotar",
"name": "nanotar",
"version": "0.1.1",
"description": "Tiny and fast Tar utils for any JavaScript runtime!",
"repository": "unjs/mircrotar",
"repository": "unjs/nanotar",
"license": "MIT",
"sideEffects": false,
"type": "module",
Expand Down Expand Up @@ -43,4 +43,4 @@
"vitest": "^1.0.1"
},
"packageManager": "pnpm@8.11.0"
}
}
2 changes: 1 addition & 1 deletion test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const fixture: TarFileItem<any>[] = [
{ name: "foo/bar.txt", data: "Hello World!", attrs: { mtime } },
];

describe("mircrotar", () => {
describe("nanotar", () => {
it("createTar", async () => {
const data = await createTarGzip(fixture);
expect(data).toBeInstanceOf(Uint8Array);
Expand Down

0 comments on commit c1247bd

Please sign in to comment.