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

Release/v1.1 #120

Merged
merged 22 commits into from
May 11, 2022
Merged

Release/v1.1 #120

merged 22 commits into from
May 11, 2022

Conversation

tmeyer2115
Copy link
Contributor

@tmeyer2115 tmeyer2115 commented May 11, 2022

Version 1.1.0

Features

nmanu1 and others added 21 commits January 13, 2022 11:15
Update version of answers-headless and make new beta version of headless-react.
Necessary for source maps to work with create-react-app 5
related: yext/search-headless#79

J=SLAP-1798
TEST=manual

answers-headless-react works with create-react-app 5
bump version to include changes in[ headless pr](yext/search-headless#82)

J=SLAP-1906
TEST=none
for changes in [this headless pr](yext/search-headless#83)

J=SLAP-1906
TEST=none
bump beta version to include rejected promise handling in headless new version

J=SLAP-1907
TEST=none
Passes the `ANSWERS_HEADLESS_REACT` agent as part of the Client-SDK header to Headless through `provideAnswersHeadless`.

J=SLAP-1951
TEST=manual

Hook up locally to the starter app and see that requests send the Headless React, Headless, and Core agents as part of the Client-SDK header. Requests to the universal search endpoint made for entity previews only send the Headless and Core agents because the hook uses `provideAnswersHeadless` directly to get an instance of Headless instead of going through the `AnswersHeadlessProvider` component from Headless React.
adds yext/slapshot as a codeowner
use the new slapshot shared eslint
fixes issues, including non autofixable ones
the non autofixble ones were
- conditionally callint jest.expect
- wrapping react-testing-library calls inside an act() unnecessarily
- tsdoc params expect a hyphen

J=SLAP-2003
TEST=build
Update the github workflows to use the callable workflows in the `slapshot-reusable-workflows` repo.

J=SLAP-2005
TEST=auto

- See that all three workflows run on this PR as expected.
- Test on another branch (`dev/test-reusable-workflows`) and see that third party notices are updated when needed.
Add SSR support by adding "type": "module" and useIsomorphicLayoutEffect

By setting "type": "module", node treats the javascript files within the package as ES modules. Since some of the config files are CJS, we need to indicate that by updating the file extension from '.js' to '.cjs' or else node 16+ will throw an error

J=none
TEST=manual

Connect this to the [ SSR Support ](yext/search-ui-react#125) branch in the component library and smoke test with the Yext Sites starter
This PR adds commonjs support by separating the tsconfig into esm and commonjs versions,
updating our api extractor config, and using conditional exports to provide the right entry point.

At one point, this PR added commonjs support by instead building the library with module: commonjs,
and adding a thin esm wrapper to also support es6 syntax.
This was in order to prevent the dual package hazard documented in
https://nodejs.org/api/packages.html#dual-commonjses-module-packages
and
https://github.com/GeoffreyBooth/dual-package-hazard/blob/master/index.mjs
However, from personal testing vite was not able to tree shake our esm-wrapper.

Furthermore, the dual package hazard is primarily a concern when different plugin-like libraries
are written around some central library, for example if people were to write extensions of
answers-headless-react, and these extensions were written in a mix of only esm and only cjs.
Then, users who tried to use both plugins would find themselves with the dual package hazard.
This scenario is very unlikely because we can expect the vast majority of new code to be written in esm.
As a general trend ESM is the new standard for JS libraries, and is also promoted by typescript.

J=SLAP-2074
TEST=manual

test that the dev command works - I can hook up a local answers-headless-react to a local
project, and changes in answers-headless-react will automatically be reflected in my project

test that answers-headless-react works with yext sites SSR in both prod and dev mode
this was tested using npm pack
use repo scoped token for workflows with EndBug/add-and-commit github action so the automated commit from that action will trigger a rerun of the github actions in the pr.

J=SLAP-2044
TEST=manual

add new dependency to repo. See that third_party_notices_check made an automated commit and reran other github actions.
@coveralls
Copy link

coveralls commented May 11, 2022

Coverage Status

Coverage increased (+0.2%) to 69.725% when pulling c2a80c2 on release/v1.1 into 7f9166a on main.

@tmeyer2115 tmeyer2115 merged commit 7477da0 into main May 11, 2022
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.

6 participants