diff --git a/.github/workflows/close-issue.yml b/.github/workflows/close-issue.yml new file mode 100644 index 000000000..bb0960244 --- /dev/null +++ b/.github/workflows/close-issue.yml @@ -0,0 +1,19 @@ +# CronJob +name: ⏱️ Issue Close Require + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + close-issues: + if: github.repository == 'solidjs/solid-start' + runs-on: ubuntu-latest + steps: + - name: needs reproduction + uses: actions-cool/issues-helper@v3 + with: + actions: "close-issues" + token: ${{ secrets.GITHUB_TOKEN }} + labels: "needs reproduction" + inactive-day: 3 diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml index 29c9cd50a..41daa25cf 100644 --- a/.github/workflows/compliance.yml +++ b/.github/workflows/compliance.yml @@ -27,4 +27,4 @@ jobs: allcontributors[bot] renovate renovate[bot] - ignore-team-members: false + ignore-team-members: true diff --git a/.github/workflows/issue-labelled.yml b/.github/workflows/issue-labelled.yml new file mode 100644 index 000000000..47f0d37e3 --- /dev/null +++ b/.github/workflows/issue-labelled.yml @@ -0,0 +1,30 @@ +name: 🔖 Issue Labelled + +on: + issues: + types: [labeled] + +jobs: + reply-labeled: + if: github.repository == 'vitejs/vite' + runs-on: ubuntu-latest + steps: + - name: contribution welcome + if: github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted' || github.event.label.name == 'good first issue' + uses: actions-cool/issues-helper@v3 + with: + actions: "remove-labels" + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: "pending triage, needs reproduction" + + - name: needs reproduction + if: github.event.label.name == 'needs reproduction' + uses: actions-cool/issues-helper@v3 + with: + actions: "create-comment, remove-labels" + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}. Please provide a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) using a GitHub repository or [StackBlitz](https://stackblitz.com/). Issues marked with `needs reproduction` will be closed if they have no activity within 3 days. + labels: "pending triage" diff --git a/packages/start/CHANGELOG.md b/packages/start/CHANGELOG.md index 69a1f54e4..e2f91c11a 100644 --- a/packages/start/CHANGELOG.md +++ b/packages/start/CHANGELOG.md @@ -1,5 +1,13 @@ # @solidjs/start +## 1.1.1 + +### Patch Changes + +- efd762e: Bump tanstack server functions plugin + This fixes `export const` in top-level `"use server"` files. + The bundler warning for top-level `"use server"` is still there, but still code-removal works. + ## 1.1.0 ### Minor Changes diff --git a/packages/start/package.json b/packages/start/package.json index 6d6db0740..df9234628 100644 --- a/packages/start/package.json +++ b/packages/start/package.json @@ -1,6 +1,6 @@ { "name": "@solidjs/start", - "version": "1.1.0", + "version": "1.1.1", "type": "module", "author": "Ryan Carniato", "license": "MIT", diff --git a/packages/tests/cypress/e2e/server-function.cy.ts b/packages/tests/cypress/e2e/server-function.cy.ts index 638bfb0ee..01cc69b4d 100644 --- a/packages/tests/cypress/e2e/server-function.cy.ts +++ b/packages/tests/cypress/e2e/server-function.cy.ts @@ -7,6 +7,10 @@ describe("server-function", () => { cy.visit("/is-server-nested"); cy.get("#server-fn-test").contains('{"serverFnWithIsServer":true}'); }); + it("should have isServer true in the server function - const", () => { + cy.visit("/is-server-const"); + cy.get("#server-fn-test").contains('{"serverFnWithIsServer":true}'); + }); it("should have an id of type string in the server function meta - nested", () => { cy.visit("/server-function-meta-nested"); cy.get("#server-fn-test").contains('{"serverFnWithMeta":"string"}'); diff --git a/packages/tests/src/app.tsx b/packages/tests/src/app.tsx index bbaae6e51..c3982efe1 100644 --- a/packages/tests/src/app.tsx +++ b/packages/tests/src/app.tsx @@ -17,6 +17,9 @@ export default function App() {
  • isserver (nested)
  • +
  • + isserver (const) +
  • isserver (toplevel)
  • diff --git a/packages/tests/src/functions/use-is-server-const.ts b/packages/tests/src/functions/use-is-server-const.ts new file mode 100644 index 000000000..7e3ccdb28 --- /dev/null +++ b/packages/tests/src/functions/use-is-server-const.ts @@ -0,0 +1,7 @@ +"use server"; + +import { isServer } from "solid-js/web"; + +export const serverFnWithIsServer = async () => { + return isServer; +} diff --git a/packages/tests/src/routes/is-server-const.tsx b/packages/tests/src/routes/is-server-const.tsx new file mode 100644 index 000000000..cfd05ef94 --- /dev/null +++ b/packages/tests/src/routes/is-server-const.tsx @@ -0,0 +1,19 @@ +import { createEffect, createSignal } from "solid-js"; +import { serverFnWithIsServer } from "~/functions/use-is-server-const"; + +export default function App() { + const [output, setOutput] = createSignal<{ serverFnWithIsServer?: boolean }>({}); + + + createEffect(async () => { + const restult = await serverFnWithIsServer(); + setOutput(prev => ({ ...prev, serverFnWithIsServer: restult })); + }); + + + return ( +
    + {JSON.stringify(output())} +
    + ); +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2e5fe6897..983c36392 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5774,7 +5774,7 @@ snapshots: '@babel/helper-annotate-as-pure@7.25.9': dependencies: - '@babel/types': 7.26.7 + '@babel/types': 7.26.9 '@babel/helper-compilation-targets@7.26.5': dependencies: @@ -5792,7 +5792,7 @@ snapshots: '@babel/helper-optimise-call-expression': 7.25.9 '@babel/helper-replace-supers': 7.26.5(@babel/core@7.26.9) '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - '@babel/traverse': 7.26.7 + '@babel/traverse': 7.26.9 semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -5817,8 +5817,8 @@ snapshots: '@babel/helper-member-expression-to-functions@7.25.9': dependencies: - '@babel/traverse': 7.26.7 - '@babel/types': 7.26.7 + '@babel/traverse': 7.26.9 + '@babel/types': 7.26.9 transitivePeerDependencies: - supports-color @@ -5853,7 +5853,7 @@ snapshots: '@babel/helper-optimise-call-expression@7.25.9': dependencies: - '@babel/types': 7.26.7 + '@babel/types': 7.26.9 '@babel/helper-plugin-utils@7.26.5': {} @@ -5862,7 +5862,7 @@ snapshots: '@babel/core': 7.26.9 '@babel/helper-annotate-as-pure': 7.25.9 '@babel/helper-wrap-function': 7.25.9 - '@babel/traverse': 7.26.7 + '@babel/traverse': 7.26.9 transitivePeerDependencies: - supports-color @@ -5871,14 +5871,14 @@ snapshots: '@babel/core': 7.26.9 '@babel/helper-member-expression-to-functions': 7.25.9 '@babel/helper-optimise-call-expression': 7.25.9 - '@babel/traverse': 7.26.7 + '@babel/traverse': 7.26.9 transitivePeerDependencies: - supports-color '@babel/helper-skip-transparent-expression-wrappers@7.25.9': dependencies: - '@babel/traverse': 7.26.7 - '@babel/types': 7.26.7 + '@babel/traverse': 7.26.9 + '@babel/types': 7.26.9 transitivePeerDependencies: - supports-color @@ -5890,9 +5890,9 @@ snapshots: '@babel/helper-wrap-function@7.25.9': dependencies: - '@babel/template': 7.25.9 - '@babel/traverse': 7.26.7 - '@babel/types': 7.26.7 + '@babel/template': 7.26.9 + '@babel/traverse': 7.26.9 + '@babel/types': 7.26.9 transitivePeerDependencies: - supports-color @@ -5918,7 +5918,7 @@ snapshots: dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 - '@babel/traverse': 7.26.7 + '@babel/traverse': 7.26.9 transitivePeerDependencies: - supports-color @@ -5945,7 +5945,7 @@ snapshots: dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 - '@babel/traverse': 7.26.7 + '@babel/traverse': 7.26.9 transitivePeerDependencies: - supports-color @@ -5999,7 +5999,7 @@ snapshots: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.26.9) - '@babel/traverse': 7.26.7 + '@babel/traverse': 7.26.9 transitivePeerDependencies: - supports-color @@ -6045,7 +6045,7 @@ snapshots: '@babel/helper-compilation-targets': 7.26.5 '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-replace-supers': 7.26.5(@babel/core@7.26.9) - '@babel/traverse': 7.26.7 + '@babel/traverse': 7.26.9 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -6054,7 +6054,7 @@ snapshots: dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 - '@babel/template': 7.25.9 + '@babel/template': 7.26.9 '@babel/plugin-transform-destructuring@7.25.9(@babel/core@7.26.9)': dependencies: @@ -6106,7 +6106,7 @@ snapshots: '@babel/core': 7.26.9 '@babel/helper-compilation-targets': 7.26.5 '@babel/helper-plugin-utils': 7.26.5 - '@babel/traverse': 7.26.7 + '@babel/traverse': 7.26.9 transitivePeerDependencies: - supports-color @@ -6152,7 +6152,7 @@ snapshots: '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.9) '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.26.7 + '@babel/traverse': 7.26.9 transitivePeerDependencies: - supports-color @@ -6387,7 +6387,7 @@ snapshots: dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 - '@babel/types': 7.26.7 + '@babel/types': 7.26.9 esutils: 2.0.3 '@babel/runtime@7.26.0': @@ -8069,7 +8069,7 @@ snapshots: babel-dead-code-elimination@1.0.9: dependencies: '@babel/core': 7.26.9 - '@babel/parser': 7.26.7 + '@babel/parser': 7.26.9 '@babel/traverse': 7.26.9 '@babel/types': 7.26.9 transitivePeerDependencies: