@nulogy/components 15.3.0 → 15.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,61 @@
1
+ import { resolve } from "node:path";
2
+ import { defineConfig } from "vitest/config";
3
+ import react from "@vitejs/plugin-react";
4
+ const PEER_DEPENDENCIES = {
5
+ react: "React",
6
+ "styled-components": "styled",
7
+ "@nulogy/icons": "icons",
8
+ };
9
+ const GLOBALS = {
10
+ ...PEER_DEPENDENCIES,
11
+ "deep-equal": "deepEqual",
12
+ "create-react-context": "createReactContext",
13
+ warning: "warning",
14
+ exenv: "exenv",
15
+ classnames: "t",
16
+ "html-parse-stringify2": "HTML",
17
+ "react-fast-compare": "isEqual",
18
+ "path-to-regexp": "pathToRegexp",
19
+ "react-is": "reactIs",
20
+ "react-dom": "reactDom",
21
+ };
22
+ const externals = Object.keys(GLOBALS);
23
+ export default defineConfig({
24
+ plugins: [react()],
25
+ define: {
26
+ ENV: JSON.stringify(process.env.NODE_ENV || "development"),
27
+ },
28
+ resolve: {
29
+ extensions: [".js", ".jsx", ".ts", ".tsx", ".mjs"],
30
+ },
31
+ build: {
32
+ emptyOutDir: false,
33
+ lib: {
34
+ entry: resolve(__dirname, "src/index.ts"),
35
+ name: "NDSComponents",
36
+ formats: ["umd", "es"],
37
+ fileName: (format) => {
38
+ if (format === "umd") {
39
+ return "main.js";
40
+ }
41
+ return "main.module.js";
42
+ },
43
+ },
44
+ rollupOptions: {
45
+ external: externals,
46
+ output: {
47
+ globals: GLOBALS,
48
+ },
49
+ },
50
+ sourcemap: true,
51
+ minify: false,
52
+ target: "es2020",
53
+ },
54
+ test: {
55
+ environment: "jsdom",
56
+ globals: false,
57
+ include: ["**/*.spec.tsx", "**/*.spec.ts"],
58
+ exclude: ["**/node_modules/**", "**/cypress/**", "**/dist/**"],
59
+ setupFiles: [resolve(__dirname, "spec/support/vitestAutoCleanup.ts")],
60
+ },
61
+ });
package/package.json CHANGED
@@ -1,21 +1,23 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "15.3.0",
3
+ "version": "15.4.0",
4
+ "type": "module",
4
5
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
6
  "private": false,
6
7
  "publishConfig": {
7
8
  "access": "public"
8
9
  },
9
10
  "scripts": {
10
- "ci": "pnpm && pnpm build && pnpm test && pnpm run check",
11
+ "ci": "pnpm && pnpm build && pnpm build:verify && pnpm test && pnpm run check",
11
12
  "start-server": "pnpm build:storybook && pnpm http-server -p 9999 ./storybook-static",
12
13
  "start": "concurrently \"pnpm build:watch\" \"pnpm start:storybook\"",
13
14
  "start:cypress": "start-server-and-test start 9999 'cypress open'",
14
15
  "start:storybook": "storybook dev -p 9999",
15
16
  "clean:storybook": "rm -rf node_modules/.cache/storybook && rm -rf ./storybook-static",
16
- "build": "rollup -c",
17
- "build:watch": "rollup -c --watch",
18
- "build:storybook": "storybook build --webpack-stats-json",
17
+ "build": "tsc -p tsconfig.build.json && vite build",
18
+ "build:verify": "node scripts/verify-build.js",
19
+ "build:watch": "vite build --watch",
20
+ "build:storybook": "storybook build --stats-json",
19
21
  "warn:prepush": "echo \"Make sure you also run all the other CI steps before pushing by running 'pnpm ci'\"",
20
22
  "check": "pnpm warn:prepush && pnpm check:types && pnpm check:lint && pnpm check:format",
21
23
  "check:types": "tsc && cd cypress && tsc --noEmit",
@@ -61,17 +63,8 @@
61
63
  },
62
64
  "devDependencies": {
63
65
  "@apollo/client": "^3.11.8",
64
- "@babel/cli": "^7.28.3",
65
- "@babel/core": "^7.28.5",
66
- "@babel/plugin-transform-runtime": "^7.28.5",
67
- "@babel/preset-env": "^7.28.5",
68
- "@babel/preset-react": "^7.28.5",
69
- "@babel/preset-typescript": "^7.28.5",
70
- "@chromatic-com/storybook": "^3",
71
66
  "@nulogy/eslint-config-nulogy": "^1.0.0",
72
67
  "@nulogy/icons": "^4.37.2",
73
- "@rollup/plugin-babel": "^5.0.0",
74
- "@rollup/plugin-node-resolve": "^7.1.3",
75
68
  "@semantic-release/changelog": "^6.0.2",
76
69
  "@semantic-release/commit-analyzer": "^9.0.2",
77
70
  "@semantic-release/git": "^10.0.1",
@@ -84,10 +77,9 @@
84
77
  "@storybook/addon-storysource": "8.6.14",
85
78
  "@storybook/addon-toolbars": "8.6.14",
86
79
  "@storybook/addon-viewport": "8.6.14",
87
- "@storybook/addon-webpack5-compiler-babel": "^4.0.0",
88
80
  "@storybook/codemod": "8.6.14",
89
81
  "@storybook/react": "8.6.14",
90
- "@storybook/react-webpack5": "8.6.14",
82
+ "@storybook/react-vite": "8.6.14",
91
83
  "@storybook/theming": "8.6.14",
92
84
  "@testing-library/react": "^12.1.5",
93
85
  "@types/css-mediaquery": "^0.1.4",
@@ -95,15 +87,10 @@
95
87
  "@types/node": "^24.0.0",
96
88
  "@types/react": "^17.0.39",
97
89
  "@types/react-dom": "^17.0.20",
98
- "@types/react-router-dom": "^5.3.3",
90
+ "@types/react-router-dom": "5.3.0",
99
91
  "@typescript-eslint/eslint-plugin": "^4.0.0",
100
92
  "@typescript-eslint/parser": "^5.30.5",
101
- "babel-eslint": "^10.0.3",
102
- "babel-loader": "8.0.6",
103
- "babel-plugin-inline-json-import": "^0.3.2",
104
- "babel-plugin-require-context-hook": "1.0.0",
105
- "babel-plugin-styled-components": "^2.1.4",
106
- "babel-preset-react": "6.24.1",
93
+ "@vitejs/plugin-react": "^4.7.0",
107
94
  "chromatic": "^13.3.3",
108
95
  "concurrently": "^9.2.0",
109
96
  "css-mediaquery": "^0.1.2",
@@ -124,22 +111,16 @@
124
111
  "react-color": "^2.18.1",
125
112
  "react-dom": "17.0.2",
126
113
  "react-router-dom": "^5.3.3",
127
- "rollup": "^2.7.3",
128
- "rollup-plugin-babel": "^4.4.0",
129
- "rollup-plugin-commonjs": "^10.1.0",
130
- "rollup-plugin-replace": "^2.2.0",
131
- "rollup-plugin-typescript2": "^0.36.0",
132
114
  "semantic-release": "^24.2.5",
133
115
  "start-server-and-test": "^2.0.12",
134
116
  "storybook": "8.6.14",
135
117
  "styled-components": "^6.1.19",
136
118
  "svg-sprite-loader": "^6.0.11",
137
119
  "typescript": "^5.9.3",
138
- "typescript-eslint": "^0.0.1-alpha.0",
139
- "vitest": "^4.0.15"
120
+ "vite": "^6.0.0",
121
+ "vitest": "^3.0.0"
140
122
  },
141
123
  "dependencies": {
142
- "@babel/runtime": "^7.9.6",
143
124
  "@emotion/is-prop-valid": "^1.3.1",
144
125
  "@nulogy/tokens": "^6.1.1",
145
126
  "@radix-ui/react-navigation-menu": "^1.1.4",
@@ -149,7 +130,6 @@
149
130
  "@styled-system/theme-get": "^5.1.2",
150
131
  "@types/react-window": "^1.8.8",
151
132
  "@types/styled-system": "5.1.25",
152
- "core-js": "3",
153
133
  "date-fns": "2.23.0",
154
134
  "debounce": "^1.2.0",
155
135
  "deep-equal": "^2.2.1",
@@ -1,11 +0,0 @@
1
- import { resolve } from "path";
2
- import { defineConfig } from "vitest/config";
3
- export default defineConfig({
4
- test: {
5
- environment: "jsdom",
6
- globals: false,
7
- include: ["**/*.spec.tsx", "**/*.spec.ts"],
8
- exclude: ["**/node_modules/**", "**/cypress/**", "**/dist/**"],
9
- setupFiles: [resolve(__dirname, "spec/support/vitestAutoCleanup.ts")],
10
- },
11
- });
File without changes