Skip to content

Commit

Permalink
Merge branch 'main' into config-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
gioboa authored Nov 16, 2024
2 parents ac7bce9 + d97b27f commit 7c0dcd0
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 32 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4.1.1

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4.0.0

- name: Setup Node
uses: actions/setup-node@v4.0.2
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4.1.1

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4.0.0

- name: Setup Node
uses: actions/setup-node@v4.0.2
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4.1.1

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4.0.0

- name: Setup Node
uses: actions/setup-node@v4.0.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4.1.1

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4.0.0

- name: Setup Node
uses: actions/setup-node@v4.0.2
Expand Down
4 changes: 3 additions & 1 deletion docs/angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ To setup Partytown in an Angular project take the following steps.
Run the command below to install the dependencies

```bash
npm install @builder.io/partytown # or yarn add @builder.io/partytown
npm install @builder.io/partytown
yarn add @builder.io/partytown
pnpm install @builder.io/partytown
```

Add the path to the Partytown JS files into the assets array in your `angular.json` file
Expand Down
4 changes: 3 additions & 1 deletion docs/astro.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ There is a first-class [Astro integration for partytown](https://github.com/with
Astro includes a CLI tool for adding integrations. Using the `astro add` command will automatically install Partytown and configure your project.

```bash
yarn astro add partytown # or npx astro add partytown
npx astro add partytown
yarn astro add partytown
pnpx astro add partytown
```

## Partytown Script
Expand Down
2 changes: 2 additions & 0 deletions docs/gatsby.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ For additional information, please see [How to Add Google Analytics gtag to Gats

```bash
npm install @builder.io/partytown
yarn add @builder.io/partytown
pnpm install @builder.io/partytown
```

## Configure
Expand Down
4 changes: 3 additions & 1 deletion docs/nextjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ The Next.js `<Script/>` component provides an experimental `worker` strategy, wh
## Install

```bash
npm install "@builder.io/partytown"
npm install @builder.io/partytown
yarn add @builder.io/partytown
pnpm install @builder.io/partytown
```

## Configure
Expand Down
4 changes: 3 additions & 1 deletion docs/nuxt.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ There is a first-class [Nuxt integration for partytown](https://github.com/nuxt-
Add `@nuxtjs/partytown` dependency to your project.

```bash
yarn add --dev @nuxtjs/partytown # or npm install --save-dev @nuxtjs/partytown
npm install --save-dev @nuxtjs/partytown
yarn add --dev @nuxtjs/partytown
pnpm install --save-dev @nuxtjs/partytown
```

## Configure
Expand Down
2 changes: 2 additions & 0 deletions docs/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The Partytown NPM package already comes with a React component, which is a thin

```bash
npm install @builder.io/partytown
yarn add @builder.io/partytown
pnpm install @builder.io/partytown
```

## Configure
Expand Down
2 changes: 2 additions & 0 deletions docs/remix.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The Remix setup is largely the same as the [React integration guide](/react), ex

```bash
npm install @builder.io/partytown
yarn add @builder.io/partytown
pnpm install @builder.io/partytown
```

## Configure
Expand Down
2 changes: 2 additions & 0 deletions docs/shopify-hydrogen.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The [Shopify Hydrogen](https://hydrogen.shopify.dev/) setup is largely the same

```bash
npm install @builder.io/partytown
yarn add @builder.io/partytown
pnpm install @builder.io/partytown
```

## Configure
Expand Down
8 changes: 7 additions & 1 deletion docs/solid.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ title: Solid

To setup Partytown in an Solid project take the following steps.

## Installation
## Install

```bash
npm install @builder.io/partytown
yarn add @builder.io/partytown
pnpm install @builder.io/partytown
```

Use your favorite package manager to install `@builder.io/partytown` dependency and
copy the Partytown files to the local filesystem using the Vite plugin.
Expand Down
1 change: 1 addition & 0 deletions src/lib/web-worker/worker-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ export const createWindow = (
patchDocumentElementChild(win.HTMLBodyElement, env);
patchHTMLHtmlElement(win.HTMLHtmlElement, env);
createCSSStyleSheetConstructor(win, 'CSSStyleSheet');
createCSSStyleSheetConstructor(win, 'CSSMediaRule');

definePrototypeNodeType(win.Comment, 8);
definePrototypeNodeType(win.DocumentType, 10);
Expand Down
22 changes: 0 additions & 22 deletions tests/integrations/clarity/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,6 @@
</script>
<script src='/~partytown/debug/partytown.js'></script>

<script>
const observer = new MutationObserver(mutations => {
mutations.forEach(({ addedNodes }) => {
addedNodes.forEach(node => {
// For each added script tag
if (node.nodeType === 1 && node.tagName === 'SCRIPT') {
const src = node.src || '';
if (node.src.includes('clarity.js')) {
node.type = 'text/partytown';
node.src = './clarity.bundle.js';
}
}
});
});
});
// Starts the monitoring
observer.observe(document.documentElement, {
childList: true,
subtree: true,
});
</script>

<style>
body {
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif,
Expand Down
3 changes: 2 additions & 1 deletion tests/integrations/gtm/gtm.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ test('gtm multiple tabs', async ({ page, context }) => {
await page2.bringToFront();
await testPage(page2, []);

expect(pageConsoleErrors.length).toBe(0);
// FIX ME: I'm flaky
// expect(pageConsoleErrors.length).toBe(0);
expect(pageErrors.length).toBe(0);
expect(page2ConsoleErrors.length).toBe(0);
expect(page2Errors.length).toBe(0);
Expand Down

0 comments on commit 7c0dcd0

Please sign in to comment.