@cocreate/users 1.39.4 → 1.40.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.
@@ -1,8 +1,10 @@
1
1
  name: Automated Workflow
2
+
2
3
  on:
3
4
  push:
4
5
  branches:
5
6
  - master
7
+
6
8
  jobs:
7
9
  about:
8
10
  runs-on: ubuntu-latest
@@ -18,26 +20,37 @@ jobs:
18
20
  with:
19
21
  direction: overwrite-github
20
22
  githubToken: "${{ secrets.GITHUB }}"
23
+
21
24
  release:
22
25
  runs-on: ubuntu-latest
23
26
  steps:
24
27
  - name: Checkout
25
28
  uses: actions/checkout@v4
29
+ with:
30
+ fetch-depth: 0 # Required so semantic-release can trace git tags/history
31
+
26
32
  - name: Setup Node.js
27
33
  uses: actions/setup-node@v4
28
34
  with:
29
- node-version: 22 # Required for the latest semantic-release plugins
30
- - name: Semantic Release
31
- uses: cycjimmy/semantic-release-action@v4 # Update to v4 for better Node 20+ support
32
- id: semantic
33
- with:
34
- extra_plugins: |
35
- @semantic-release/changelog
35
+ node-version: 22
36
+
37
+ - name: Install Semantic Release & Plugins
38
+ # Installs semantic-release and its plugins on the runner
39
+ run: |
40
+ npm install -g semantic-release \
41
+ @semantic-release/changelog \
42
+ @semantic-release/npm \
43
+ @semantic-release/github \
36
44
  @semantic-release/git
37
- @semantic-release/github
45
+
46
+ - name: Run Semantic Release (Native)
47
+ id: semantic
48
+ # This will automatically pick up your export default config file in the repository root
49
+ run: npx semantic-release
38
50
  env:
39
- GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" # Use the built-in token if possible
51
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
40
52
  NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
53
+
41
54
  outputs:
42
55
  new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
43
- new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
56
+ new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
@@ -14,8 +14,7 @@ jobs:
14
14
  env:
15
15
  DRY_RUN: ${{ github.event.inputs.dry_run }}
16
16
  GITHUB_TOKEN: "${{ secrets.GITHUB }}"
17
- NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
18
-
17
+
19
18
  steps:
20
19
  - name: Checkout
21
20
  uses: actions/checkout@v3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ # [1.40.0](https://github.com/CoCreate-app/CoCreate-users/compare/v1.39.5...v1.40.0) (2026-07-17)
2
+
3
+
4
+ ### Features
5
+
6
+ * update automated workflow and release configuration for improved semantic release handling ([1b70088](https://github.com/CoCreate-app/CoCreate-users/commit/1b700884006163d9ad293307932b713978f207e6))
7
+
8
+ ## [1.39.5](https://github.com/CoCreate-app/CoCreate-users/compare/v1.39.4...v1.39.5) (2026-07-14)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * bump package versions ([5a13416](https://github.com/CoCreate-app/CoCreate-users/commit/5a1341674d2743422443d6702d475f6db4fdc322))
14
+ * remove unnecessary console logs in init function for cleaner output ([4e50944](https://github.com/CoCreate-app/CoCreate-users/commit/4e509445cc8eb972afe7cb15065bc34aeda68440))
15
+ * removed post install and add add packages to apprved list ([4ca4805](https://github.com/CoCreate-app/CoCreate-users/commit/4ca480518e6fa4320d04a77a22344e444b4c0fb0))
16
+ * semantic version handling ([faaf8be](https://github.com/CoCreate-app/CoCreate-users/commit/faaf8beced63fbbd31b709b35d0de88916cf5bd0))
17
+ * update dependencies and integrate @cocreate/config for user management ([810ca32](https://github.com/CoCreate-app/CoCreate-users/commit/810ca3290a2005a28fb9eda5ef0b9f9180b7df0f))
18
+ * update module export to ES6 syntax in release.config.js ([b3b0ba3](https://github.com/CoCreate-app/CoCreate-users/commit/b3b0ba3a99441bec2f5481013d88b9578a346df3))
19
+ * update package.json to use ESM and restructure entry points ([7da48f2](https://github.com/CoCreate-app/CoCreate-users/commit/7da48f2eb2630eb91df496977885e9880cd5b09d))
20
+ * update user creation to avoid conflicts and ensure correct array targeting ([4a5117f](https://github.com/CoCreate-app/CoCreate-users/commit/4a5117f4a24c1b9a8bacfb1cda9eba47b5cda6ac))
21
+
1
22
  ## [1.39.4](https://github.com/CoCreate-app/CoCreate-users/compare/v1.39.3...v1.39.4) (2026-04-04)
2
23
 
3
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/users",
3
- "version": "1.39.4",
3
+ "version": "1.40.0",
4
4
  "description": "A simple users component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "users",
@@ -18,8 +18,7 @@
18
18
  "scripts": {
19
19
  "start": "npx webpack --config webpack.config.js",
20
20
  "build": "npx webpack --mode=production --config webpack.config.js",
21
- "dev": "npx webpack --config webpack.config.js --watch",
22
- "postinstall": "node -e \"const { execSync } = require('child_process'); try { execSync('coc --version', { stdio: 'ignore' }); } catch (error) { try { execSync('npm install -g @cocreate/cli', { stdio: 'inherit' }); console.log('Installed \"@cocreate/cli\" globally.'); } catch (error) { console.error('Failed to install \"@cocreate/cli\" globally:', error); } }\""
21
+ "dev": "npx webpack --config webpack.config.js --watch"
23
22
  },
24
23
  "repository": {
25
24
  "type": "git",
@@ -35,22 +34,45 @@
35
34
  "type": "GitHub Sponsors ❤",
36
35
  "url": "https://github.com/sponsors/CoCreate-app"
37
36
  },
38
- "main": "./src/index.js",
39
- "devDependencies": {
40
- "css-loader": "^5.1.3",
41
- "esbuild": "^0.25.2",
42
- "esbuild-loader": "^4.3.0",
43
- "mini-css-extract-plugin": "^1.5.0",
44
- "webpack": "^5.24.4",
45
- "webpack-cli": "^4.5.0",
46
- "webpack-log": "^3.0.1"
37
+ "type": "module",
38
+ "main": "./src/server.js",
39
+ "browser": "./src/client.js",
40
+ "exports": {
41
+ ".": {
42
+ "node": "./src/server.js",
43
+ "deno": "./src/server.js",
44
+ "browser": "./src/client.js",
45
+ "default": "./src/server.js"
46
+ }
47
47
  },
48
48
  "dependencies": {
49
- "@cocreate/actions": "^1.21.1",
50
- "@cocreate/crud-client": "^1.34.2",
51
- "@cocreate/element-prototype": "^1.29.1",
52
- "@cocreate/elements": "^1.42.1",
53
- "@cocreate/local-storage": "^1.16.2",
54
- "@cocreate/render": "^1.45.2"
49
+ "@cocreate/actions": "^1.21.4",
50
+ "@cocreate/config": "^1.13.4",
51
+ "@cocreate/crud-client": "^1.34.6",
52
+ "@cocreate/element-prototype": "^1.31.4",
53
+ "@cocreate/elements": "^1.42.9",
54
+ "@cocreate/local-storage": "^1.16.5",
55
+ "@cocreate/render": "^1.46.1"
56
+ },
57
+ "devDependencies": {
58
+ "@cocreate/webpack": "^1.4.3"
59
+ },
60
+ "allowScripts": {
61
+ "@cocreate/actions@1.21.4": true,
62
+ "@cocreate/api@1.22.5": true,
63
+ "@cocreate/config@1.13.4": true,
64
+ "@cocreate/crud-client@1.34.6": true,
65
+ "@cocreate/element-prototype@1.31.4": true,
66
+ "@cocreate/elements@1.42.9": true,
67
+ "@cocreate/filter@1.33.6": true,
68
+ "@cocreate/indexeddb@1.23.4": true,
69
+ "@cocreate/local-storage@1.16.5": true,
70
+ "@cocreate/observer@1.19.0": true,
71
+ "@cocreate/organizations@1.30.1": true,
72
+ "@cocreate/render@1.46.1": true,
73
+ "@cocreate/socket-client@1.40.5": true,
74
+ "@cocreate/utils@1.42.2": true,
75
+ "@cocreate/uuid@1.12.4": true,
76
+ "@cocreate/webpack@1.4.3": true
55
77
  }
56
78
  }
package/release.config.js CHANGED
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  dryRun: false,
3
3
  branches: ["master"],
4
4
  plugins: [
@@ -10,12 +10,20 @@ module.exports = {
10
10
  changelogFile: "CHANGELOG.md",
11
11
  },
12
12
  ],
13
- "@semantic-release/npm",
14
- "@semantic-release/github",
13
+ "@semantic-release/npm",
15
14
  [
16
- "@semantic-release/git",
15
+ "@semantic-release/github",
17
16
  {
17
+ successComment: false,
18
+ failTitle: false,
19
+ },
20
+ ],
21
+ [
22
+ "@semantic-release/git",
23
+ {
24
+ // Only stage and commit the changelog and package.json
18
25
  assets: ["CHANGELOG.md", "package.json"],
26
+ message: "chore(release): ${nextRelease.version} [skip ci]",
19
27
  },
20
28
  ],
21
29
  ],
package/src/client.js CHANGED
@@ -9,6 +9,7 @@ import "./index.css";
9
9
 
10
10
  // TODO: Replace with @cocreate/config.
11
11
  import localStorage from "@cocreate/local-storage";
12
+ import Config from "@cocreate/config";
12
13
 
13
14
  const CoCreateUser = {
14
15
  organization_id: async () => {
@@ -177,10 +178,15 @@ const CoCreateUser = {
177
178
 
178
179
  },
179
180
 
180
- signOut: (action) => {
181
- self = this;
182
- localStorage.removeItem("user_id");
181
+ signOut: function (action) {
182
+ // Remove user_id via Config to clear cookies and CoCreateConfig
183
+ Config.remove("user_id");
184
+ // token can remain in localStorage removal
183
185
  localStorage.removeItem("token");
186
+ if (Crud && Crud.socket) {
187
+ Crud.socket.user_id = null;
188
+ if (Crud.socket.token) Crud.socket.token = null;
189
+ }
184
190
 
185
191
  render({
186
192
  selector: "[template*='signOut']",
@@ -193,7 +199,6 @@ const CoCreateUser = {
193
199
  ]
194
200
  });
195
201
 
196
- // TODO: replace with Custom event system
197
202
  action.element.dispatchEvent(new CustomEvent("signOut"));
198
203
  },
199
204
 
@@ -236,8 +241,9 @@ const CoCreateUser = {
236
241
  let redirectLink = redirectTag.getAttribute("href");
237
242
  if (redirectLink) {
238
243
  if (userStatus == "offline") {
239
- localStorage.removeItem("user_id");
244
+ Config.removeItem("user_id");
240
245
  localStorage.removeItem("token");
246
+ if (Crud && Crud.socket) Crud.socket.user_id = null;
241
247
  }
242
248
 
243
249
  // Normalize both URLs to compare paths in a uniform way