@lowentry/utils 1.2.1 → 1.3.1

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,30 @@
1
+ name: on push to master
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+
7
+ concurrency:
8
+ group: ${{ github.event_name }}
9
+
10
+ jobs:
11
+ deploy:
12
+ name: "Increase version and deploy"
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ contents: write
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: actions/setup-node@v4
19
+ with:
20
+ node-version: 'lts/*'
21
+ registry-url: 'https://registry.npmjs.org'
22
+ #- run: npm ci
23
+ - run: npm test
24
+ - run: git config --global user.name "github-actions[bot]"
25
+ - run: git config --global user.email "github-actions[bot]@users.noreply.github.com"
26
+ - run: npm version patch -m "Upgrade to %s [skip ci]"
27
+ - run: git push && git push --tags
28
+ - run: npm publish --access public
29
+ env:
30
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/LeUtils.js CHANGED
@@ -2279,6 +2279,10 @@ export const LeUtils = {
2279
2279
 
2280
2280
  return () =>
2281
2281
  {
2282
+ if(typeof window === 'undefined')
2283
+ {
2284
+ return false; // server-side rendering, who knows to who it is being served to, assume it's public
2285
+ }
2282
2286
  const hostname = window.location.hostname;
2283
2287
  if(lastHostname === hostname)
2284
2288
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowentry/utils",
3
- "version": "1.2.1",
3
+ "version": "1.3.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Provides utilities for general JavaScript development.",
@@ -11,10 +11,10 @@
11
11
  "utility",
12
12
  "utilities"
13
13
  ],
14
- "homepage": "https://bitbucket.org/lowentry/plugin_javascript_leutils/src",
14
+ "homepage": "https://github.com/patrickvane/lowentry-js-utils",
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "https://bitbucket.org/lowentry/plugin_javascript_leutils/src"
17
+ "url": "git+https://github.com/patrickvane/lowentry-js-utils.git"
18
18
  },
19
19
  "scripts": {
20
20
  "test": "node --check index.js"
@@ -1,20 +0,0 @@
1
- image: node:lts
2
-
3
- pipelines:
4
- branches:
5
- master:
6
- - step:
7
- name: Build and Test
8
- script:
9
- - npm install
10
- - npm test
11
- - step:
12
- name: Publish
13
- deployment: production
14
- script:
15
- - npm version patch -m "Upgrade to %s [skip ci]"
16
- - git push && git push --tags
17
- - pipe: atlassian/npm-publish:1.1.0
18
- variables:
19
- NPM_TOKEN: $NPM_TOKEN
20
- EXTRA_ARGS: "--access public"