Skip to content

Commit 4c4d774

Browse files
mrtstoomy4taneltm
committed
build: prepare 2.1.0-beta.1 with ESM exports, TS entrypoint exports, dependency and minor test/docs updates
WE2-1179 Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com> Co-authored-by: Toomas Pärna <toomy4@users.noreply.github.com> Co-authored-by: Tanel Metsar <taneltm@users.noreply.github.com>
1 parent c719daf commit 4c4d774

10 files changed

Lines changed: 878 additions & 1142 deletions

File tree

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,19 +250,25 @@ When using a build tool like WebPack, Babel, Rollup or the TypeScript compiler:
250250
251251
```javascript
252252
// Import the Web-eID library
253-
import * as webeid from '@web-eid/web-eid-library/web-eid';
253+
import * as webeid from '@web-eid/web-eid-library';
254254
255255
// ...or only what you need
256256
import {
257257
status,
258258
authenticate,
259259
Action,
260260
ErrorCode
261-
} from '@web-eid/web-eid-library/web-eid';
261+
} from '@web-eid/web-eid-library';
262262
263263
264264
// If you need TypeScript interfaces, they are also available!
265-
import ActionOptions from '@web-eid/web-eid-library/models/ActionOptions';
265+
import {
266+
ActionOptions,
267+
LibraryAuthenticateResponse,
268+
LibraryGetSigningCertificateResponse,
269+
LibrarySignResponse,
270+
LibraryStatusResponse
271+
} from '@web-eid/web-eid-library';
266272
```
267273
268274
### ES module for browsers

eslint.config.mjs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import eslint from "@eslint/js";
22
import globals from "globals";
3-
import stylisticJs from "@stylistic/eslint-plugin-js";
4-
import stylisticTs from "@stylistic/eslint-plugin-ts";
3+
import stylistic from "@stylistic/eslint-plugin";
54
import tseslint from "typescript-eslint";
65

76
const sharedOptions = {
@@ -10,7 +9,7 @@ const sharedOptions = {
109

1110
languageOptions: {
1211
sourceType: "module",
13-
12+
1413
globals: {
1514
...globals.browser,
1615
...globals.node,
@@ -25,16 +24,16 @@ const sharedOptions = {
2524

2625
languageOptions: {
2726
sourceType: "module",
28-
27+
2928
globals: {
3029
...globals.browser,
3130
...globals.node,
3231
...globals.es2021,
3332
...globals.webextensions,
3433
},
35-
34+
3635
parser: tseslint.parser,
37-
36+
3837
parserOptions: {
3938
project: "./tsconfig.eslint.json",
4039
tsconfigRootDir: import.meta.dirname,
@@ -49,11 +48,11 @@ const overrides = {
4948

5049
name: "web-eid/js/override",
5150

52-
plugins: { "@stylistic/js": stylisticJs },
53-
51+
plugins: { "@stylistic/js": stylistic },
52+
5453
rules: {
5554
"sort-imports": ["error", { allowSeparatedGroups: true }],
56-
55+
5756
"@stylistic/js/quotes": "error",
5857
"@stylistic/js/key-spacing": ["error", { "align": "value" }],
5958
"@stylistic/js/comma-dangle": ["error", "always-multiline"],
@@ -71,9 +70,9 @@ const overrides = {
7170

7271
plugins: {
7372
"@typescript-eslint": tseslint.plugin,
74-
"@stylistic/ts": stylisticTs,
73+
"@stylistic/ts": stylistic,
7574
},
76-
75+
7776
rules: {
7877
"@typescript-eslint/array-type": ["error", { default: "generic" }],
7978
"@stylistic/ts/semi": "error",
@@ -83,7 +82,7 @@ const overrides = {
8382

8483
export default [
8584
{ ignores: ["dist/", "node_modules/"] },
86-
85+
8786
{
8887
name: "eslint/recommended",
8988

jest.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ const config = {
44
testEnvironment: "jsdom",
55
};
66

7-
export default config;
7+
export default config;

0 commit comments

Comments
 (0)