Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving latest changes to my little corner #268

Merged
merged 33 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
52ac68c
Merge pull request #252 from remix-pwa/feat/misc
ShafSpecs Aug 11, 2024
e198139
chore(release): @remix-pwa/cli@1.2.5-dev.1 [skip ci]
semantic-release-bot Aug 11, 2024
9d2ea85
chore(release): @remix-pwa/dev@3.1.0-dev.1 [skip ci]
semantic-release-bot Aug 11, 2024
3a0835a
chore(release): @remix-pwa/sw@3.0.9-dev.1 [skip ci]
semantic-release-bot Aug 11, 2024
319f0af
chore(release): @remix-pwa/worker-runtime@2.1.4-dev.1 [skip ci]
semantic-release-bot Aug 11, 2024
fb90711
chore(release): @remix-pwa/sync@3.0.4-dev.1 [skip ci]
semantic-release-bot Aug 11, 2024
58ab54b
Merge pull request #253 from remix-pwa/dev
ShafSpecs Aug 11, 2024
4d65ac5
chore(release): @remix-pwa/cli@1.2.5 [skip ci]
semantic-release-bot Aug 11, 2024
38a82d0
chore(release): @remix-pwa/dev@3.1.0 [skip ci]
semantic-release-bot Aug 11, 2024
4e4c8f4
chore(release): @remix-pwa/sw@3.0.9 [skip ci]
semantic-release-bot Aug 11, 2024
7a2e9f8
chore(release): @remix-pwa/worker-runtime@2.1.4 [skip ci]
semantic-release-bot Aug 11, 2024
dda9d68
chore(release): @remix-pwa/sync@3.0.4 [skip ci]
semantic-release-bot Aug 11, 2024
9cf2978
fix: stop useNetworkConnectivity from causing hydration errors.
martin-wahlberg Aug 19, 2024
a377627
add
eranhirsch Aug 21, 2024
dec144d
Merge pull request #255 from martin-wahlberg/fix_hydration_errors_for…
ShafSpecs Aug 23, 2024
43c4987
chore(release): @remix-pwa/client@3.0.7-dev.1 [skip ci]
semantic-release-bot Aug 23, 2024
e98e28c
Merge pull request #257 from eranhirsch/eranhirsch/formFactor
ShafSpecs Aug 24, 2024
7528a69
Add crossOrigin to ManifestLink to be able to fix CORS issues
serafimsanvol Sep 4, 2024
570216f
Merge pull request #258 from serafimsanvol/feat/cross-origin-for-mani…
ShafSpecs Sep 4, 2024
f2deead
Merge pull request #263 from remix-pwa/feat/misc-1
ShafSpecs Sep 24, 2024
f9eb035
Merge branch 'dev' into feat/misc
ShafSpecs Sep 24, 2024
edd0c95
Merge pull request #264 from remix-pwa/feat/misc
ShafSpecs Sep 24, 2024
70a2044
chore(release): @remix-pwa/sw@3.0.10-dev.1 [skip ci]
semantic-release-bot Sep 24, 2024
cfefe4f
chore(release): @remix-pwa/sync@3.0.5-dev.1 [skip ci]
semantic-release-bot Sep 24, 2024
8c8c07f
Merge pull request #265 from remix-pwa/dev
ShafSpecs Sep 24, 2024
7ef3a9d
chore(release): @remix-pwa/client@3.0.7 [skip ci]
semantic-release-bot Sep 24, 2024
2006dae
chore(release): @remix-pwa/sw@3.0.10 [skip ci]
semantic-release-bot Sep 24, 2024
1a391a5
chore(release): @remix-pwa/sync@3.0.5 [skip ci]
semantic-release-bot Sep 24, 2024
71146f1
chore: added `pkg-pr-new`
ShafSpecs Sep 24, 2024
b50ecad
chore: upgradedsandbox packages
ShafSpecs Sep 24, 2024
5c044b1
ci: 🌿 experimental `pkg-pr-new` publish workflow
ShafSpecs Sep 24, 2024
3004f72
Merge pull request #266 from remix-pwa/pkg-pr
ShafSpecs Sep 24, 2024
6fa72a5
Merge pull request #267 from remix-pwa/dev
ShafSpecs Sep 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/pkg-pr-new.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish Approved PRs
on:
pull_request_review:
types: [submitted]

jobs:
approved:
if: github.event.review.state == 'APPROVED'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
cache: npm
node-version: 20

- name: Sync sandbox
run: npm run preinstall -w @remix-pwa/playground

- name: Install dependencies
run: npm clean-install

- name: Publish PR
run: npm run publish:pr
999 changes: 609 additions & 390 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"lint": "turbo lint -- --fix",
"format": "turbo format -- --write",
"postclone": "npm install && npm run test && npm run build",
"publish:pr": "npx pkg-pr-new publish './packages/*'",
"test": "turbo test -- --coverage"
},
"devDependencies": {
Expand All @@ -41,6 +42,7 @@
"husky": "^9.1.1",
"lint-staged": "^15.2.2",
"npm-run-all": "^4.1.5",
"pkg-pr-new": "^0.0.25",
"prettier": "^3.3.3",
"prettier-plugin-organize-imports": "^4.0.0",
"semver": "^7.6.3",
Expand Down
14 changes: 14 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## @remix-pwa/cli 1.2.5 (2024-08-11)


### Bug Fixes

* **cli:** added new `--dev` flag to the `upgrade` command - for updating to latest `dev` candidate d4f4414

## @remix-pwa/cli 1.2.5-dev.1 (2024-08-11)


### Bug Fixes

* **cli:** added new `--dev` flag to the `upgrade` command - for updating to latest `dev` candidate d4f4414

## @remix-pwa/cli 1.2.4 (2024-07-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-pwa/cli",
"version": "1.2.4",
"version": "1.2.5",
"description": "An elegant CLI for everything Remix PWA 💖",
"repository": {
"type": "git",
Expand Down
14 changes: 14 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## @remix-pwa/client 3.0.7 (2024-09-24)


### Bug Fixes

* stop useNetworkConnectivity from causing hydration errors. 9cf2978

## @remix-pwa/client 3.0.7-dev.1 (2024-08-23)


### Bug Fixes

* stop useNetworkConnectivity from causing hydration errors. 9cf2978

## @remix-pwa/client 3.0.6 (2024-07-21)


Expand Down
45 changes: 23 additions & 22 deletions packages/client/hooks/useNetworkConnectivity.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
/* eslint-disable n/no-callback-literal */
import { useEffect, useState } from 'react';
import { useEffect, useSyncExternalStore } from 'react';

import { isWindowAvailable } from '../lib/user-agent.js';
const subscribeToNetworkConnectivity = (callback: () => void) => {
window.addEventListener('online', callback);
window.addEventListener('offline', callback);
return () => {
window.removeEventListener('online', callback);
window.removeEventListener('offline', callback);
};
};

const getNetworkConnectivitySnapshot = () => window.navigator.onLine;

const getNetworkConnectivityServerSnapshot = () => false;

export const useNetworkConnectivity = (
options: {
onOnline?: (isOnline: boolean) => void;
onOffline?: (isOnline: boolean) => void;
} = {}
) => {
const [isOnline, setIsOnline] = useState(isWindowAvailable() ? navigator.onLine : false);

const handleOnline = () => {
setIsOnline(true);
options.onOnline && options.onOnline(true);
};

const handleOffline = () => {
setIsOnline(false);
options.onOffline && options.onOffline(false);
};
const isOnline = useSyncExternalStore(
subscribeToNetworkConnectivity,
getNetworkConnectivitySnapshot,
getNetworkConnectivityServerSnapshot
);

useEffect(() => {
if (isWindowAvailable()) {
window.addEventListener('online', handleOnline);
window.addEventListener('offline', handleOffline);

return () => {
window.removeEventListener('online', handleOnline);
window.removeEventListener('offline', handleOffline);
};
if (isOnline) {
options.onOnline && options.onOnline(true);
} else if (options.onOnline) {
options.onOffline && options.onOffline(false);
}
}, []);
}, [isOnline, options]);

return isOnline;
};
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-pwa/client",
"version": "3.0.6",
"version": "3.0.7",
"description": "A set of utilities for client-side development to enhance the native feel of your Remix App",
"repository": {
"type": "git",
Expand Down
24 changes: 24 additions & 0 deletions packages/dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# @remix-pwa/dev 3.1.0 (2024-08-11)


### Bug Fixes

* **dev:** pre-rc-candidate: adding (minimal) global support for Remix SPA mode a035c49


### Features

* **dev:** added injectable vars cac1206

# @remix-pwa/dev 3.1.0-dev.1 (2024-08-11)


### Bug Fixes

* **dev:** pre-rc-candidate: adding (minimal) global support for Remix SPA mode a035c49


### Features

* **dev:** added injectable vars cac1206

## @remix-pwa/dev 3.0.7 (2024-07-21)


Expand Down
1 change: 1 addition & 0 deletions packages/dev/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export interface WebAppManifest {
type?: string;
platform?: string;
label?: string;
form_factor?: 'narrow' | 'wide';
}>;
shortcuts?: Array<{
name?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-pwa/dev",
"version": "3.0.7",
"version": "3.1.0",
"description": "An esbuild compiler for Service Workers in Remix.run",
"repository": {
"type": "git",
Expand Down
28 changes: 28 additions & 0 deletions packages/sw/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## @remix-pwa/sw 3.0.10 (2024-09-24)


### Bug Fixes

* **sw:** changed manifest link `rel` from `manifest` to `webmanifest` 942f76a

## @remix-pwa/sw 3.0.10-dev.1 (2024-09-24)


### Bug Fixes

* **sw:** changed manifest link `rel` from `manifest` to `webmanifest` 942f76a

## @remix-pwa/sw 3.0.9 (2024-08-11)


### Bug Fixes

* **sw:** added `matchOptions` for adding querying options to cache operations c87e507

## @remix-pwa/sw 3.0.9-dev.1 (2024-08-11)


### Bug Fixes

* **sw:** added `matchOptions` for adding querying options to cache operations c87e507

## @remix-pwa/sw 3.0.8 (2024-07-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/sw/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-pwa/sw",
"version": "3.0.8",
"version": "3.0.10",
"description": "Service Worker APIs and utilities for Remix PWA",
"repository": {
"type": "git",
Expand Down
11 changes: 9 additions & 2 deletions packages/sw/src/components/ManifestLink.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import type { LinkHTMLAttributes } from 'react';
import React from 'react';

export const ManifestLink = ({ manifestUrl = '/manifest.webmanifest' }: { manifestUrl?: string }) => {
return <link rel="webmanifest" href={manifestUrl} />;
export const ManifestLink = ({
crossOrigin,
manifestUrl = '/manifest.webmanifest',
}: {
manifestUrl?: string;
crossOrigin?: LinkHTMLAttributes<HTMLLinkElement>['crossOrigin'];
}) => {
return <link rel="webmanifest" href={manifestUrl} crossOrigin={crossOrigin} />;
};
40 changes: 40 additions & 0 deletions packages/sync/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
## @remix-pwa/sync 3.0.5 (2024-09-24)





### Dependencies

* **@remix-pwa/sw:** upgraded to 3.0.10

## @remix-pwa/sync 3.0.5-dev.1 (2024-09-24)





### Dependencies

* **@remix-pwa/sw:** upgraded to 3.0.10-dev.1

## @remix-pwa/sync 3.0.4 (2024-08-11)





### Dependencies

* **@remix-pwa/sw:** upgraded to 3.0.9

## @remix-pwa/sync 3.0.4-dev.1 (2024-08-11)





### Dependencies

* **@remix-pwa/sw:** upgraded to 3.0.9-dev.1

## @remix-pwa/sync 3.0.3 (2024-07-21)


Expand Down
4 changes: 2 additions & 2 deletions packages/sync/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-pwa/sync",
"version": "3.0.3",
"version": "3.0.5",
"description": "A Background Sync addon for Remix PWA",
"repository": {
"type": "git",
Expand Down Expand Up @@ -34,7 +34,7 @@
"rimraf": "^6.0.1"
},
"dependencies": {
"@remix-pwa/sw": "^3.0.8",
"@remix-pwa/sw": "^3.0.10",
"idb": "^8.0.0"
}
}
14 changes: 14 additions & 0 deletions packages/worker-runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## @remix-pwa/worker-runtime 2.1.4 (2024-08-11)


### Bug Fixes

* **worker-runtime:** added minimal support for runtimes in Remix SPA mode 6dd95e6

## @remix-pwa/worker-runtime 2.1.4-dev.1 (2024-08-11)


### Bug Fixes

* **worker-runtime:** added minimal support for runtimes in Remix SPA mode 6dd95e6

## @remix-pwa/worker-runtime 2.1.3 (2024-07-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/worker-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-pwa/worker-runtime",
"version": "2.1.3",
"version": "2.1.4",
"description": "A vanilla JavaScript worker runtime for Remix service workers",
"license": "MIT",
"sideEffects": false,
Expand Down
10 changes: 5 additions & 5 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
"build:remix": "remix build"
},
"dependencies": {
"@remix-pwa/client": "3.0.6",
"@remix-pwa/client": "3.0.7",
"@remix-pwa/push": "2.10.3",
"@remix-pwa/sw": "3.0.8",
"@remix-pwa/sync": "3.0.3",
"@remix-pwa/worker-runtime": "2.1.3",
"@remix-pwa/sw": "3.0.10",
"@remix-pwa/sync": "3.0.5",
"@remix-pwa/worker-runtime": "2.1.4",
"@remix-run/node": "^2.8.1",
"@remix-run/react": "^2.8.1",
"@remix-run/serve": "^2.8.1",
Expand All @@ -37,7 +37,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@remix-pwa/dev": "3.0.7",
"@remix-pwa/dev": "3.1.0",
"@remix-run/dev": "^2.8.1",
"@remix-run/eslint-config": "^2.8.1",
"@types/react": "^18.2.22",
Expand Down
Loading