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

[ci] release v1.x-2022-07 #1048

Merged
merged 1 commit into from
Apr 13, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Apr 6, 2022

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to v1.x-2022-07, this PR will be updated.

Releases

@shopify/hydrogen@0.15.0

Minor Changes

  • #983 52af261b Thanks @jplhomer! - Introduce Suspense-friendly fetchSync API for server and client components.

    When using fetchSync in server components, you provide options for caching and preloading. This is similar to the useQuery hook:

    import {fetchSync, CacheMinutes} from '@shopify/hydrogen';
    import {Suspense} from 'react';
    
    export function MyServerComponent() {
      return (
        <Suspense fallback="Loading...">
          <MyThings />
        </Suspense>
      );
    }
    
    function MyThings() {
      const things = fetchSync('https://3p.api.com/things.json', {
        preload: true,
        cache: CacheMinutes(),
      }).json();
    
      return <h2>{things.title}</h2>;
    }

    When using fetchSync in client components, you cannot provide options for caching and preloading. You must import fetchSync from @shopify/hydrogen/client:

    import {fetchSync} from '@shopify/hydrogen/client';
    import {Suspense} from 'react';
    
    export function MyClientComponent() {
      return (
        <Suspense fallback="Loading...">
          <MyThings />
        </Suspense>
      );
    }
    
    function MyThings() {
      const things = fetchSync('https://3p.api.com/things.json').json();
    
      return <h2>{things.title}</h2>;
    }
  • #890 a4c6d6c4 Thanks @wizardlyhel! - Analytics instrumentation - this provides integration points for both server
    and client side analytics instrumentations

Patch Changes

  • #1061 a4aa3887 Thanks @jplhomer! - Support script tags in index.html that contain line breaks

  • #1057 06d92ddc Thanks @frandiox! - Ability to concatenate requests in API route handlers without leaving the server by returning a new Request instance.

    // src/routes/my-page.server.jsx
    
    export async function api(request) {
      if (request.method === 'POST') {
        // do some work here...
      }
    
      return new Request(request.url, {method: 'GET'});
    }
    
    export default function Page() {
      return (
        <form action="/my-page" method="POST">
          ...
        </form>
      );
    }

    In the previous example, a POST request to /my-page would run the API handler and automatically continue with the server component rendering (GET). This is useful for handling HTML forms without waterfall requests.

  • #1049 b88a885d Thanks @wizardlyhel! - Support sub request cache control header stale-while-revalidate everywhere

  • #1047 5268bf85 Thanks @jplhomer! - Restore scroll position when navigating using the back and forward buttons.

  • #1062 cc172ae7 Thanks @jplhomer! - Fix encoding of quotes in CSS Modules which caused hydration errors

  • #1046 3947d53a Thanks @michenly! - Fixed server Cookie bug where initializing with empty string will resulted in 1 item in the Cookies Map.

  • #1059 401f329d Thanks @frandiox! - Fix link prefetch mismatch due to query-string

  • #1072 47c0c184 Thanks @michenly! - Improve type for ShopifyContextValue to be based on ShopifyConfig.

@github-actions github-actions bot force-pushed the changeset-release/v1.x-2022-07 branch 10 times, most recently from fda16e0 to d664140 Compare April 11, 2022 15:10
@github-actions github-actions bot force-pushed the changeset-release/v1.x-2022-07 branch from d664140 to 815cfbb Compare April 11, 2022 15:21
@github-actions github-actions bot force-pushed the changeset-release/v1.x-2022-07 branch from 815cfbb to 108c5dd Compare April 11, 2022 15:23
@github-actions github-actions bot force-pushed the changeset-release/v1.x-2022-07 branch 7 times, most recently from 6919634 to f725b18 Compare April 12, 2022 21:17
@github-actions github-actions bot force-pushed the changeset-release/v1.x-2022-07 branch from f725b18 to f55c144 Compare April 13, 2022 14:02
@frehner frehner merged commit 3ca0685 into v1.x-2022-07 Apr 13, 2022
@frehner frehner deleted the changeset-release/v1.x-2022-07 branch April 13, 2022 15:33
blittle added a commit that referenced this pull request Apr 19, 2022
* v1.x-2022-07: (37 commits)
  Adds Shopify/hydrogen-cli for development server (#1089)
  Make `useUrl()` reactive for subscribing to navigation events (#1082)
  fix e2e tests
  streaming and suspense draft (#1033)
  [Hydrogen docs]: Restructure and simplify IA (#1079)
  Use new storefront API headers in queryShop API helper (#1075)
  Remove the dep of hydrogen-ui for now until we get it publishing (#1076)
  [ci] release v1.x-2022-07 (#1048)
  Introduce a synchronous-looking version of fetch for server and client (#983)
  improve the current type of ShopifyContextValue to be based on ShopifyConfig (#1072)
  Foundational work to split hydrogen-ui to its own package (#1060)
  Allow returning new requests from API routes (#1057)
  [Hydrogen docs]: Analytics (#962)
  Analytics (#890)
  Allow line breaks inside script tags (#1061)
  Fix encoding of CSS Modules to solve hydration errors (#1062)
  [Hydrogen docs]: Update guidance on troubleshooting third-party dependencies (#1055)
  Update Vite RSC Plugin (#1054)
  Fix link prefetch (#1059)
  Initial devTools component (#998)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant