Skip to content

Commit

Permalink
Release/v10.2.0 (#1025)
Browse files Browse the repository at this point in the history
* add svg to imageUploader

* Use pnpm version from packageManager

* 10.2.0-0

* 10.2.0-2

* VE-265 ESM & CJS Builds (#1024)

* esm and cjs builds

* 10.2.0-0

* esm default

* 10.2.0-1

* resolve conflicts with latest package file from main

* 10.2.0-3

* label description type should be optional

* 10.2.0-4

* release version prep

---------

Co-authored-by: Petauskas, Áron <67595415+AronPetrauskas@users.noreply.github.com>
Co-authored-by: Matthew Corner <matt.corner@ipg-automotive.com>
Co-authored-by: David Barry <david.barry@ipg-automotive.com>
  • Loading branch information
4 people authored Jan 22, 2025
1 parent 3bb88ba commit 3a97295
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 29 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand Down
17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ipguk/react-ui",
"version": "10.1.0",
"version": "10.2.0",
"description": "React UI component library for IPG web applications",
"author": {
"name": "IPG-Automotive-UK"
Expand All @@ -10,14 +10,23 @@
"type": "git",
"url": "git+https://github.com/IPG-Automotive-UK/react-ui.git"
},
"main": "dist/index",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
}
},
"engines": {
"node": ">=10"
},
"scripts": {
"build": "pnpm run clean && pnpm run copy-files && tsc --project ./tsconfig.production.json",
"build": "pnpm run clean && pnpm run copy-files && pnpm run build:cjs && pnpm run build:esm",
"build:cjs": "tsc --project ./tsconfig.cjs.json",
"build:esm": "tsc --project ./tsconfig.esm.json",
"clean": "rimraf dist",
"copy-files": "copyfiles -e '**/*.test.**' -e '**/*.spec.**' -e '**/*.stories.**' -u 1 src/**/*.html src/**/*.css src/**/*/*.svg dist/",
"copy-files": "copyfiles -e '**/*.test.**' -e '**/*.spec.**' -e '**/*.stories.**' -u 1 src/**/*.html src/**/*.css src/**/*/*.svg dist/esm/ && copyfiles -e '**/*.test.**' -e '**/*.spec.**' -e '**/*.stories.**' -u 1 src/**/*.html src/**/*.css src/**/*/*.svg dist/cjs/",
"prepublishOnly": "pnpm run build",
"start": "microbundle-crl watch --no-compress --format modern,cjs --jsxFragment React.Fragment",
"storybook": "storybook dev -p 6006",
Expand Down
2 changes: 1 addition & 1 deletion src/ImageUploader/ImageUploader.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe("ImageUploader", () => {
// wait for the error message to be displayed
await waitFor(() =>
expect(dropzoneElement).toHaveTextContent(
"File type must be .gif, .jpg, .jpeg, .png, .webp."
"File type must be .gif, .jpg, .jpeg, .png, .svg, .webp."
)
);
});
Expand Down
1 change: 1 addition & 0 deletions src/ImageUploader/ImageUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default function ImageUploader({
"image/gif": [".gif"],
"image/jpeg": [".jpg", ".jpeg"],
"image/png": [".png"],
"image/svg": [".svg"],
"image/webp": [".webp"]
},
filesLimit: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/LabelSelector/Label.types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export type Label = {
_id: string;
color: string;
description: string;
description?: string;
name: string;
};
11 changes: 11 additions & 0 deletions tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./dist/cjs",
"module": "CommonJS",
"moduleResolution": "node",
"target": "ES2017",
"declaration": true,
"declarationMap": true
}
}
10 changes: 10 additions & 0 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./dist/esm",
"module": "ESNext",
"target": "ES6",
"declaration": true,
"declarationMap": true
}
}
21 changes: 16 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,29 @@
"files": ["globals.d.ts"],
"compilerOptions": {
"allowJs": true,
"declaration": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "react-jsx",
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"module": "ESNext",
"moduleResolution": "node",
"module": "ES2022",
"outDir": "dist",
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "ES2019",
"types": ["vitest/globals"]
}
"types": ["vitest/globals"],
"downlevelIteration": true
},
"include": ["src/**/*.tsx", "src/**/*.ts", "src/**/*.jsx", "src/**/*.js"],
"exclude": [
"src/**/*.test.**",
"src/**/*.spec.**",
"src/**/*.stories.**",
"dist",
"vitest-setup.ts",
"vite.config.ts",
"vite.config.ts"
]
}
16 changes: 0 additions & 16 deletions tsconfig.production.json

This file was deleted.

0 comments on commit 3a97295

Please sign in to comment.