Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: solidify the exported atlas file format #14

Merged
merged 1 commit into from Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -13,7 +13,7 @@ Install the `expo-atlas` package as (development) dependency to your project:
$ npx expo install expo-atlas
```

Configure your Metro config to emit a `.expo/stats.jsonl` file containing information about your bundles.
Configure your Metro config to emit an Atlas file containing information about your bundles.

```js metro.config.js
const { getDefaultConfig } = require('expo/metro-config');
Expand All @@ -36,12 +36,12 @@ $ npx expo export --platform all
$ npx expo-atlas
```

## 🧑‍🤝‍🧑 Sharing stats files
## 🧑‍🤝‍🧑 Sharing the Atlas file

You can also open a previously created `stats.jsonl` file:
You can also open a previously created `atlas.jsonl` file:

```
$ npx expo-atlas ./path/to/stats.jsonl
$ npx expo-atlas ./path/to/atlas.jsonl
```

<div align="center">
Expand Down
4 changes: 2 additions & 2 deletions src/utils/__tests__/stats.test.ts
Expand Up @@ -7,8 +7,8 @@ import { AtlasValidationError } from '../errors';
import { getStatsPath, getStatsMetdata, createStatsFile, validateStatsFile } from '../stats';

describe('getStatsPath', () => {
it('returns default path `<project>/.expo/stats.jsonl`', () => {
expect(getStatsPath('<project>')).toBe('<project>/.expo/stats.jsonl');
it('returns default path `<project>/.expo/atlas.jsonl`', () => {
expect(getStatsPath('<project>')).toBe('<project>/.expo/atlas.jsonl');
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/utils/stats.ts
Expand Up @@ -10,7 +10,7 @@ export type StatsMetadata = { name: string; version: string };

/** The default location of the metro stats file */
export function getStatsPath(projectRoot: string) {
return path.join(projectRoot, '.expo/stats.jsonl');
return path.join(projectRoot, '.expo/atlas.jsonl');
}

/** The information to validate if a stats file is compatible with this library version */
Expand Down