Skip to content

Commit

Permalink
fix: remove type field from package json
Browse files Browse the repository at this point in the history
see: #98
  • Loading branch information
littlespex committed Aug 27, 2024
1 parent 3a4cc38 commit 9b9a6d7
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.7.2] - 2024-06-21

### Fix
- Cannot import library in jest tests [#98](https://github.com/streaming-video-technology-alliance/common-media-library/issues/98)


## [0.7.1] - 2024-06-21

Expand Down
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"scripts": {
"build": "npm run build:esm && npm run build:cjs",
"postbuild": "api-extractor run --local",
"build:esm": "node --no-warnings --loader ts-node/esm ../scripts/build.ts",
"build:esm": "node --no-warnings --loader ts-node/esm ../scripts/build.mts",
"build:cjs": "tsc --module commonjs --outDir dist/cjs",
"test": "node --no-warnings --loader ts-node/esm --test ./test/**/*.test.ts",
"prepublishOnly": "npm run build"
Expand Down
6 changes: 4 additions & 2 deletions lib/test/structuredfield/util/read.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { promises as fs } from 'node:fs';

// read json test suite
export async function read(name: string) {
const json = await import(`../../../../structured-field-tests/${name}.json`, { assert: { type: 'json' } });
return json.default;
const json = await fs.readFile(`../structured-field-tests/${name}.json`, 'utf8');
return JSON.parse(json);
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@svta/common-media-library-workspace",
"version": "0.7.2",
"license": "Apache-2.0",
"type": "module",
"homepage": "https://github.com/streaming-video-technology-alliance/common-media-library",
"authors": "Casey Occhialini <[email protected]>",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.ts → scripts/build.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { rm } from 'node:fs/promises';
import { cmd } from './cmd.js';
import { removeBlankFiles } from './removeBlankFiles.js';
import { cmd } from './cmd.mjs';
import { removeBlankFiles } from './removeBlankFiles.mjs';

await rm('dist', { recursive: true, force: true });
await cmd('tsc');
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/version.ts → scripts/version.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { readFile, writeFile } from 'node:fs/promises';
import { cmd } from './cmd.js';
import { cmd } from './cmd.mjs';

const ver = process.argv[2];

Expand Down
2 changes: 1 addition & 1 deletion structured-field-tests

0 comments on commit 9b9a6d7

Please sign in to comment.