Skip to content

Commit 8cf34d0

Browse files
authored
fix: expose FilterXYSchema.json in exports (#27)
Also fixes the readme with correct links. BREAKING-CHANGE: The JSON schema must now be imported like this: `import filterXY from 'ml-signal-processing/FilterXYSchema.json' with { type: 'json' };`
1 parent eca5d21 commit 8cf34d0

File tree

8 files changed

+15
-42
lines changed

8 files changed

+15
-42
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
FilterXYSchema.js
21
FilterXYSchema.json
32

43
# Logs

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ CHANGELOG.md
22
lib
33
coverage
44
FilterXYSchema.json
5-
FilterXYSchema.js

FilterXYSchema.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
# signal-processing
1+
# ml-signal-processing
22

3-
[![NPM version][npm-image]][npm-url]
4-
[![build status][ci-image]][ci-url]
5-
[![Test coverage][codecov-image]][codecov-url]
6-
[![npm download][download-image]][download-url]
3+
[![NPM version](https://img.shields.io/npm/v/ml-signal-processing.svg)](https://www.npmjs.com/package/ml-signal-processing)
4+
[![npm download](https://img.shields.io/npm/dm/ml-signal-processing.svg)](https://www.npmjs.com/package/ml-signal-processing)
5+
[![test coverage](https://img.shields.io/codecov/c/github/mljs/signal-processing.svg)](https://codecov.io/gh/mljs/signal-processing)
6+
[![license](https://img.shields.io/npm/l/ml-signal-processing.svg)](https://github.com/mljs/signal-processing/blob/main/LICENSE)
77

88
Process data in the form of {x:[], y:[]}.
99

1010
## Installation
1111

12-
`$ npm i signal-processing`
12+
```console
13+
npm install ml-signal-processing
14+
```
1315

1416
## Usage
1517

@@ -38,12 +40,3 @@ const result = filterXY(data, filters);
3840
## License
3941

4042
[MIT](./LICENSE)
41-
42-
[npm-image]: https://img.shields.io/npm/v/signal-processing.svg
43-
[npm-url]: https://www.npmjs.com/package/signal-processing
44-
[ci-image]: https://github.com/cheminfo/signal-processing/workflows/Node.js%20CI/badge.svg?branch=main
45-
[ci-url]: https://github.com/cheminfo/signal-processing/actions?query=workflow%3A%22Node.js+CI%22
46-
[codecov-image]: https://img.shields.io/codecov/c/github/cheminfo/signal-processing.svg
47-
[codecov-url]: https://codecov.io/gh/cheminfo/signal-processing
48-
[download-image]: https://img.shields.io/npm/dm/signal-processing.svg
49-
[download-url]: https://www.npmjs.com/package/signal-processing
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
import { defineConfig, globalIgnores } from 'eslint/config';
22
import cheminfo from 'eslint-config-cheminfo-typescript';
33

4-
export default defineConfig(
5-
globalIgnores(['coverage', 'lib', 'FilterXYSchema.*']),
6-
cheminfo,
7-
);
4+
export default defineConfig(globalIgnores(['coverage', 'lib']), cheminfo);

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
"version": "1.2.0",
44
"description": "Process data in the form of {x:[], y:[]}",
55
"type": "module",
6-
"exports": "./lib/index.js",
6+
"exports": {
7+
".": "./lib/index.js",
8+
"./FilterXYSchema.json": "./FilterXYSchema.json"
9+
},
710
"keywords": [],
811
"author": "Luc Patiny",
912
"license": "MIT",
1013
"files": [
1114
"src",
1215
"lib",
13-
"FilterXYSchema.d.ts",
14-
"FilterXYSchema.js",
1516
"FilterXYSchema.json"
1617
],
1718
"scripts": {
1819
"check-types": "tsc --noEmit",
1920
"clean": "rimraf lib",
2021
"createSchema": "typescript-json-schema --refs false ./tsconfig.json FilterXYType > FilterXYSchema.json",
21-
"postcreateSchema": "node scripts/create_js_schema.mjs",
2222
"eslint": "eslint . --cache",
2323
"eslint-fix": "node --run eslint -- --fix",
2424
"prepack": "npm run createSchema && npm run tsc",
@@ -39,7 +39,7 @@
3939
"homepage": "https://github.com/mljs/signal-processing#readme",
4040
"devDependencies": {
4141
"@vitest/coverage-v8": "^3.2.3",
42-
"@zakodium/tsconfig": "^1.0.1",
42+
"@zakodium/tsconfig": "^1.0.2",
4343
"eslint": "^9.29.0",
4444
"eslint-config-cheminfo-typescript": "^18.0.1",
4545
"jest-matcher-deep-close-to": "^3.0.2",

scripts/create_js_schema.mjs

Lines changed: 0 additions & 12 deletions
This file was deleted.

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"extends": "@zakodium/tsconfig",
33
"compilerOptions": {
44
"outDir": "lib",
5-
"noUncheckedIndexedAccess": false,
6-
"allowImportingTsExtensions": true
5+
"noUncheckedIndexedAccess": false
76
},
87
"include": ["src", "vite*.ts"]
98
}

0 commit comments

Comments
 (0)