@ubidots/react-html-canvas 0.2.1 → 0.2.12

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.
package/README.md CHANGED
@@ -184,34 +184,49 @@ Runs on every PR and push to main/develop branches:
184
184
 
185
185
  #### Deployment Pipeline (`.github/workflows/deploy.yml`)
186
186
 
187
- Manual deployment workflow with the following features:
188
-
189
- - **Manual Trigger**: Only runs when manually triggered from GitHub Actions
190
- - **Version Selection**: Choose patch, minor, or major version bump
191
- - **Pre-release Support**: Optional tag for beta/alpha releases
192
- - **Quality Checks**: Full linting, testing, and build verification
193
- - **Automated Versioning**: Bumps version and creates git tags
194
- - **NPM Publishing**: Publishes to NPM with appropriate tags
187
+ Automated deployment workflow triggered when version changes are merged to main:
188
+
189
+ - **Automatic Trigger**: Runs when package.json changes are pushed to main
190
+ - **Pre-release Detection**: Auto-detects pre-release tags from version format
191
+ - **Quality Checks**: Full linting, testing, and build verification before publish
192
+ - **NPM Publishing**: Uses OIDC trusted publishing with provenance attestation
195
193
  - **GitHub Release**: Creates release with installation instructions
196
194
 
197
195
  ### How to Deploy
198
196
 
199
197
  To deploy a new version:
200
198
 
201
- 1. Go to the **Actions** tab in GitHub
202
- 2. Select the **Deploy** workflow
203
- 3. Click **Run workflow**
204
- 4. Choose the version bump type (patch/minor/major)
205
- 5. Optionally add a pre-release tag (e.g., "beta")
206
- 6. Click **Run workflow**
199
+ 1. **Update version in your PR**:
200
+
201
+ ```bash
202
+ # For stable releases
203
+ npm version patch # or minor, major
204
+
205
+ # For pre-releases
206
+ npm version prerelease --preid=beta
207
+ ```
208
+
209
+ 2. **Commit and create PR**:
210
+
211
+ ```bash
212
+ git add package.json
213
+ git commit -m "chore: bump version to vX.Y.Z"
214
+ git push
215
+ ```
216
+
217
+ 3. **Merge to main**:
218
+ - Ensure all PR checks pass
219
+ - Merge the PR
220
+
221
+ 4. **Automatic deployment**:
222
+ - Workflow automatically publishes to npm
223
+ - GitHub release created automatically
207
224
 
208
- The deployment will:
225
+ #### Version Formats
209
226
 
210
- - Run all quality checks
211
- - Bump the version in package.json
212
- - Create a git tag
213
- - Publish to NPM
214
- - Create a GitHub release
227
+ - `1.0.0` npm tag: `latest`
228
+ - `1.0.0-beta.1` npm tag: `beta`
229
+ - `1.0.0-alpha.1` npm tag: `alpha`
215
230
 
216
231
  ## License
217
232
 
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubidots/react-html-canvas",
3
- "version": "0.2.1",
3
+ "version": "0.2.12",
4
4
  "description": "React library to interact with Ubidots Dashboards from HTML Canvas widgets (Provider + hooks + actions)",
5
5
  "license": "MIT",
6
6
  "author": "Ubidots",
@@ -19,6 +19,31 @@
19
19
  "files": [
20
20
  "dist"
21
21
  ],
22
+ "scripts": {
23
+ "build": "vite build",
24
+ "build:watch": "vite build --watch",
25
+ "dev": "vite",
26
+ "serve": "python3 -m http.server 8080 --directory dist",
27
+ "serve:tunnel": "pnpm run serve & cloudflared tunnel --url http://localhost:8080",
28
+ "dev:cdn": "concurrently \"pnpm run build:watch\" \"pnpm run serve\"",
29
+ "dev:cdn:tunnel": "concurrently \"pnpm run build:watch\" \"pnpm run serve:tunnel\"",
30
+ "test": "vitest run --reporter=verbose",
31
+ "test:ui": "vitest --ui",
32
+ "test:coverage": "vitest run --coverage",
33
+ "test:coverage:ui": "vitest --coverage --ui",
34
+ "typecheck": "tsc --noEmit",
35
+ "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
36
+ "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
37
+ "format": "prettier --write .",
38
+ "format:check": "prettier --check .",
39
+ "clean": "rimraf dist",
40
+ "prepublishOnly": "pnpm run clean && pnpm run lint && pnpm run format:check && pnpm run build && pnpm run test && pnpm run typecheck",
41
+ "publish:dry": "pnpm publish --dry-run",
42
+ "publish:beta": "pnpm publish --tag beta",
43
+ "version:patch": "npm version patch",
44
+ "version:minor": "npm version minor",
45
+ "version:major": "npm version major"
46
+ },
22
47
  "peerDependencies": {
23
48
  "@ubidots/ubidots-javascript-library": ">=1.2.1",
24
49
  "react": ">=16.8.0",
@@ -34,6 +59,7 @@
34
59
  "@types/react-dom": "^18.2.22",
35
60
  "@ubidots/ubidots-javascript-library": "^1.2.1",
36
61
  "@vitejs/plugin-react": "^5.0.1",
62
+ "@vitest/coverage-v8": "^3.2.4",
37
63
  "concurrently": "9.2.1",
38
64
  "eslint": "9.33.0",
39
65
  "eslint-config-prettier": "10.1.8",
@@ -72,30 +98,14 @@
72
98
  "access": "public",
73
99
  "registry": "https://registry.npmjs.org/"
74
100
  },
101
+ "packageManager": "pnpm@9.0.0",
75
102
  "engines": {
76
103
  "node": ">=16.0.0",
77
104
  "pnpm": ">=8.0.0"
78
105
  },
79
- "scripts": {
80
- "build": "vite build",
81
- "build:watch": "vite build --watch",
82
- "dev": "vite",
83
- "serve": "python3 -m http.server 8080 --directory dist",
84
- "serve:tunnel": "pnpm run serve & cloudflared tunnel --url http://localhost:8080",
85
- "dev:cdn": "concurrently \"pnpm run build:watch\" \"pnpm run serve\"",
86
- "dev:cdn:tunnel": "concurrently \"pnpm run build:watch\" \"pnpm run serve:tunnel\"",
87
- "test": "vitest run --reporter=verbose",
88
- "test:ui": "vitest --ui",
89
- "typecheck": "tsc --noEmit",
90
- "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
91
- "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
92
- "format": "prettier --write .",
93
- "format:check": "prettier --check .",
94
- "clean": "rimraf dist",
95
- "publish:dry": "pnpm publish --dry-run",
96
- "publish:beta": "pnpm publish --tag beta",
97
- "version:patch": "npm version patch",
98
- "version:minor": "npm version minor",
99
- "version:major": "npm version major"
106
+ "pnpm": {
107
+ "overrides": {
108
+ "glob@>=10.2.0 <10.5.0": ">=10.5.0"
109
+ }
100
110
  }
101
- }
111
+ }