diff --git a/.all-contributorsrc b/.all-contributorsrc index 9a35e932f..afcef3990 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -774,7 +774,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/1307706?v=4", "profile": "https://alexfriesen.net/", "contributions": [ - "infra" + "infra", + "code" ] }, { @@ -785,6 +786,15 @@ "contributions": [ "doc" ] + }, + { + "login": "nckirik", + "name": "N. Can KIRIK", + "avatar_url": "https://avatars.githubusercontent.com/u/53273233?v=4", + "profile": "https://github.com/nckirik", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..0c75af274 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: Release + +on: + push: + branches: + - beta + +permissions: + contents: read # for checkout + +jobs: + version: + name: Version and Publish + runs-on: ubuntu-latest + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: .node-version + - run: corepack enable + - run: pnpm --version + - name: Install dependencies + uses: actions/setup-node@v3 + with: + cache: 'pnpm' + cache-dependency-path: '**/pnpm-lock.yaml' + - name: Install + run: pnpm install --frozen-lockfile --prefer-offline + # - name: Release + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + # run: | + # TAG="$(${{ github.ref_name == 'main' }} && echo 'latest' || echo '${{ github.ref_name }}')" + # RELEASE_TAG=$TAG npx semantic-release diff --git a/CHANGELOG.md b/CHANGELOG.md index cdb4e56d8..04e146084 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,76 @@ -## [0.2.45](https://github.com/analogjs/analog/compare/0.2.44...0.2.45) (2024-03-08) +# [1.0.0](https://github.com/analogjs/analog/compare/1.0.0-rc.3...1.0.0) (2024-03-14) + +# [1.0.0-rc.3](https://github.com/analogjs/analog/compare/1.0.0-rc.2...1.0.0-rc.3) (2024-03-14) + +### Bug Fixes + +- **nx-plugin:** rename template files and adjust versions ([#936](https://github.com/analogjs/analog/issues/936)) ([e0d4b6b](https://github.com/analogjs/analog/commit/e0d4b6b2cec348482b07f33b666451b724afbabf)) + +# [1.0.0-rc.2](https://github.com/analogjs/analog/compare/1.0.0-rc.1...1.0.0-rc.2) (2024-03-12) + +### Bug Fixes + +- **nx-plugin:** update package versions to 1.0 RC ([#933](https://github.com/analogjs/analog/issues/933)) ([d37a9c2](https://github.com/analogjs/analog/commit/d37a9c2c75d7739d56b4af6942f63c4ff77b8ade)) + +# [1.0.0-rc.1](https://github.com/analogjs/analog/compare/0.2.45...1.0.0-rc.1) (2024-03-08) + +# [1.0.0-rc.0](https://github.com/analogjs/analog/compare/1.0.0-beta.5...1.0.0-rc.0) (2024-03-07) + +# [1.0.0-beta.2](https://github.com/analogjs/analog/compare/0.2.29...1.0.0-beta.2) (2023-12-30) + +# [1.0.0-beta.1](https://github.com/analogjs/analog/compare/1.0.0-beta.0...1.0.0-beta.1) (2023-12-12) + +### Bug Fixes + +- **create-analog:** set app root for Vite/ESM support ([32ab9ce](https://github.com/analogjs/analog/commit/32ab9cecc6dc0d28e166edbc9a27a9071ba22069)) +- **vite-plugin-nitro:** use relative paths for root directory ([989fd6d](https://github.com/analogjs/analog/commit/989fd6d162d4d5a389ab543bead70e4a2188f931)) + +# [1.0.0-beta.0](https://github.com/analogjs/analog/compare/0.2.25...1.0.0-beta.0) (2023-12-12) + +### Bug Fixes + +- add release tag env variable ([379c546](https://github.com/analogjs/analog/commit/379c5466ba054fdf5fc6a9e579f3c17849004c88)) +- only auto-publish [@analogjs](https://github.com/analogjs) packages ([98301dc](https://github.com/analogjs/analog/commit/98301dc08dac3f7cb46dfce3483679005ba0ed60)) +- set beta tag on publish ([c1b8211](https://github.com/analogjs/analog/commit/c1b8211153d5259214a5a5f807fb892f82a28600)) +- use semantic release to publish ([8410660](https://github.com/analogjs/analog/commit/841066058ad83f5ddd190221b3d832a8dddf5497)) + +### Features + +- add npm publish job for packages ([2802c92](https://github.com/analogjs/analog/commit/2802c92cee93cfa7a076421c329383968b5f74a2)) +- update app templates to 1.0.0-beta ([5a23eb0](https://github.com/analogjs/analog/commit/5a23eb08718329ef2ec90135af47beb4a2c96bb7)) + +## [0.2.45](https://github.com/analogjs/analog/compare/1.0.0-rc.0...0.2.45) (2024-03-08) ### Features - **create-analog:** add support for Vite 5.1 to template apps ([#925](https://github.com/analogjs/analog/issues/925)) ([8c6d45f](https://github.com/analogjs/analog/commit/8c6d45fbb181e8203fbf70207d5296788a881027)) - **vite-plugin-angular:** add pipeline to transform analog markdown template ([#875](https://github.com/analogjs/analog/issues/875)) ([789fa06](https://github.com/analogjs/analog/commit/789fa062d6a36bfbe0da6689da3509e78c41e658)) +# [1.0.0-rc.0](https://github.com/analogjs/analog/compare/1.0.0-beta.5...1.0.0-rc.0) (2024-03-07) + +# [1.0.0-beta.2](https://github.com/analogjs/analog/compare/0.2.29...1.0.0-beta.2) (2023-12-30) + +# [1.0.0-beta.1](https://github.com/analogjs/analog/compare/1.0.0-beta.0...1.0.0-beta.1) (2023-12-12) + +### Bug Fixes + +- **create-analog:** set app root for Vite/ESM support ([32ab9ce](https://github.com/analogjs/analog/commit/32ab9cecc6dc0d28e166edbc9a27a9071ba22069)) +- **vite-plugin-nitro:** use relative paths for root directory ([989fd6d](https://github.com/analogjs/analog/commit/989fd6d162d4d5a389ab543bead70e4a2188f931)) + +# [1.0.0-beta.0](https://github.com/analogjs/analog/compare/0.2.25...1.0.0-beta.0) (2023-12-12) + +### Bug Fixes + +- add release tag env variable ([379c546](https://github.com/analogjs/analog/commit/379c5466ba054fdf5fc6a9e579f3c17849004c88)) +- only auto-publish [@analogjs](https://github.com/analogjs) packages ([98301dc](https://github.com/analogjs/analog/commit/98301dc08dac3f7cb46dfce3483679005ba0ed60)) +- set beta tag on publish ([c1b8211](https://github.com/analogjs/analog/commit/c1b8211153d5259214a5a5f807fb892f82a28600)) +- use semantic release to publish ([8410660](https://github.com/analogjs/analog/commit/841066058ad83f5ddd190221b3d832a8dddf5497)) + +### Features + +- add npm publish job for packages ([2802c92](https://github.com/analogjs/analog/commit/2802c92cee93cfa7a076421c329383968b5f74a2)) +- update app templates to 1.0.0-beta ([5a23eb0](https://github.com/analogjs/analog/commit/5a23eb08718329ef2ec90135af47beb4a2c96bb7)) + ## [0.2.44](https://github.com/analogjs/analog/compare/0.2.43...0.2.44) (2024-03-06) ### Bug Fixes @@ -90,7 +156,7 @@ - **vite-plugin-angular:** add include configuration for analog file globs ([#882](https://github.com/analogjs/analog/issues/882)) ([00baaf4](https://github.com/analogjs/analog/commit/00baaf4fb0162a2ec3161410665b21cfd421d864)) -## [0.2.32](https://github.com/analogjs/analog/compare/0.2.31...0.2.32) (2024-02-08) +## [0.2.32](https://github.com/analogjs/analog/compare/1.0.0-beta.3...0.2.32) (2024-02-08) ### Bug Fixes @@ -100,6 +166,29 @@ - **nx-plugin:** add support for nx 18 ([#880](https://github.com/analogjs/analog/issues/880)) ([aa5c4fa](https://github.com/analogjs/analog/commit/aa5c4fa5b064a613b2cabfe3aed97509efbdd06f)) +# [1.0.0-beta.2](https://github.com/analogjs/analog/compare/0.2.29...1.0.0-beta.2) (2023-12-30) + +# [1.0.0-beta.1](https://github.com/analogjs/analog/compare/1.0.0-beta.0...1.0.0-beta.1) (2023-12-12) + +### Bug Fixes + +- **create-analog:** set app root for Vite/ESM support ([32ab9ce](https://github.com/analogjs/analog/commit/32ab9cecc6dc0d28e166edbc9a27a9071ba22069)) +- **vite-plugin-nitro:** use relative paths for root directory ([989fd6d](https://github.com/analogjs/analog/commit/989fd6d162d4d5a389ab543bead70e4a2188f931)) + +# [1.0.0-beta.0](https://github.com/analogjs/analog/compare/0.2.25...1.0.0-beta.0) (2023-12-12) + +### Bug Fixes + +- add release tag env variable ([379c546](https://github.com/analogjs/analog/commit/379c5466ba054fdf5fc6a9e579f3c17849004c88)) +- only auto-publish [@analogjs](https://github.com/analogjs) packages ([98301dc](https://github.com/analogjs/analog/commit/98301dc08dac3f7cb46dfce3483679005ba0ed60)) +- set beta tag on publish ([c1b8211](https://github.com/analogjs/analog/commit/c1b8211153d5259214a5a5f807fb892f82a28600)) +- use semantic release to publish ([8410660](https://github.com/analogjs/analog/commit/841066058ad83f5ddd190221b3d832a8dddf5497)) + +### Features + +- add npm publish job for packages ([2802c92](https://github.com/analogjs/analog/commit/2802c92cee93cfa7a076421c329383968b5f74a2)) +- update app templates to 1.0.0-beta ([5a23eb0](https://github.com/analogjs/analog/commit/5a23eb08718329ef2ec90135af47beb4a2c96bb7)) + ## [0.2.31](https://github.com/analogjs/analog/compare/0.2.31-beta.2...0.2.31) (2024-02-07) ### Features @@ -198,13 +287,39 @@ - **vite-plugin-angular:** add ts-morph as devDependency ([2870b9c](https://github.com/analogjs/analog/commit/2870b9c49eaf85b1400d489cf6eb89dd2b1082cd)) -## [0.2.30-beta.0](https://github.com/analogjs/analog/compare/0.2.29...0.2.30-beta.0) (2024-01-02) +## [0.2.30-beta.0](https://github.com/analogjs/analog/compare/1.0.0-beta.2...0.2.30-beta.0) (2024-01-02) ### Features -- **trpc:** allow install of superjson version 2.2.1 and newer ([#793](https://github.com/analogjs/analog/issues/793)) ([4dffaf3](https://github.com/analogjs/analog/commit/4dffaf37657c0d04eedd16ec3b7262b78ace52c6)) - **vite-plugin-angular:** introduce experimental support for .ng format ([#823](https://github.com/analogjs/analog/issues/823)) ([f12beeb](https://github.com/analogjs/analog/commit/f12beeb2ecc8ab8dc7377981555fa13e8c62f14b)) +# [1.0.0-beta.2](https://github.com/analogjs/analog/compare/0.2.29...1.0.0-beta.2) (2023-12-30) + +### Features + +- **trpc:** allow install of superjson version 2.2.1 and newer ([#793](https://github.com/analogjs/analog/issues/793)) ([4dffaf3](https://github.com/analogjs/analog/commit/4dffaf37657c0d04eedd16ec3b7262b78ace52c6)) + +# [1.0.0-beta.1](https://github.com/analogjs/analog/compare/1.0.0-beta.0...1.0.0-beta.1) (2023-12-12) + +### Bug Fixes + +- **create-analog:** set app root for Vite/ESM support ([32ab9ce](https://github.com/analogjs/analog/commit/32ab9cecc6dc0d28e166edbc9a27a9071ba22069)) +- **vite-plugin-nitro:** use relative paths for root directory ([989fd6d](https://github.com/analogjs/analog/commit/989fd6d162d4d5a389ab543bead70e4a2188f931)) + +# [1.0.0-beta.0](https://github.com/analogjs/analog/compare/0.2.25...1.0.0-beta.0) (2023-12-12) + +### Bug Fixes + +- add release tag env variable ([379c546](https://github.com/analogjs/analog/commit/379c5466ba054fdf5fc6a9e579f3c17849004c88)) +- only auto-publish [@analogjs](https://github.com/analogjs) packages ([98301dc](https://github.com/analogjs/analog/commit/98301dc08dac3f7cb46dfce3483679005ba0ed60)) +- set beta tag on publish ([c1b8211](https://github.com/analogjs/analog/commit/c1b8211153d5259214a5a5f807fb892f82a28600)) +- use semantic release to publish ([8410660](https://github.com/analogjs/analog/commit/841066058ad83f5ddd190221b3d832a8dddf5497)) + +### Features + +- add npm publish job for packages ([2802c92](https://github.com/analogjs/analog/commit/2802c92cee93cfa7a076421c329383968b5f74a2)) +- update app templates to 1.0.0-beta ([5a23eb0](https://github.com/analogjs/analog/commit/5a23eb08718329ef2ec90135af47beb4a2c96bb7)) + ## [0.2.29](https://github.com/analogjs/analog/compare/0.2.28...0.2.29) (2023-12-19) ### Bug Fixes @@ -229,7 +344,7 @@ - **vite-plugin-angular:** improve compatibility with sourcemaps ([#803](https://github.com/analogjs/analog/issues/803)) ([ccc959b](https://github.com/analogjs/analog/commit/ccc959b8978525af3f0bc431924e1744d2c834e3)) - **vite-plugin-angular:** support Windows path for templateUrl and styleUrl ([#799](https://github.com/analogjs/analog/issues/799)) ([c083461](https://github.com/analogjs/analog/commit/c083461dc063e693f41eda42863638556b3c19ef)) -## [0.2.26](https://github.com/analogjs/analog/compare/0.2.25...0.2.26) (2023-12-13) +## [0.2.26](https://github.com/analogjs/analog/compare/1.0.0-beta.1...0.2.26) (2023-12-13) ### Bug Fixes @@ -239,6 +354,27 @@ - **vite-plugin-angular:** only filter to Angular CDK packages for ESM transform ([#796](https://github.com/analogjs/analog/issues/796)) ([d5256a8](https://github.com/analogjs/analog/commit/d5256a83c0aac7009e13ad0b3801e50b26a960ed)) +# [1.0.0-beta.1](https://github.com/analogjs/analog/compare/1.0.0-beta.0...1.0.0-beta.1) (2023-12-12) + +### Bug Fixes + +- **create-analog:** set app root for Vite/ESM support ([32ab9ce](https://github.com/analogjs/analog/commit/32ab9cecc6dc0d28e166edbc9a27a9071ba22069)) +- **vite-plugin-nitro:** use relative paths for root directory ([989fd6d](https://github.com/analogjs/analog/commit/989fd6d162d4d5a389ab543bead70e4a2188f931)) + +# [1.0.0-beta.0](https://github.com/analogjs/analog/compare/0.2.25...1.0.0-beta.0) (2023-12-12) + +### Bug Fixes + +- add release tag env variable ([379c546](https://github.com/analogjs/analog/commit/379c5466ba054fdf5fc6a9e579f3c17849004c88)) +- only auto-publish [@analogjs](https://github.com/analogjs) packages ([98301dc](https://github.com/analogjs/analog/commit/98301dc08dac3f7cb46dfce3483679005ba0ed60)) +- set beta tag on publish ([c1b8211](https://github.com/analogjs/analog/commit/c1b8211153d5259214a5a5f807fb892f82a28600)) +- use semantic release to publish ([8410660](https://github.com/analogjs/analog/commit/841066058ad83f5ddd190221b3d832a8dddf5497)) + +### Features + +- add npm publish job for packages ([2802c92](https://github.com/analogjs/analog/commit/2802c92cee93cfa7a076421c329383968b5f74a2)) +- update app templates to 1.0.0-beta ([5a23eb0](https://github.com/analogjs/analog/commit/5a23eb08718329ef2ec90135af47beb4a2c96bb7)) + ## [0.2.25](https://github.com/analogjs/analog/compare/0.2.24...0.2.25) (2023-12-12) ### Bug Fixes diff --git a/README.md b/README.md index 9aa25ec76..b0e1c7619 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -[![All Contributors](https://img.shields.io/badge/all_contributors-82-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-83-orange.svg?style=flat-square)](#contributors-) @@ -191,8 +191,9 @@ Thanks goes to these wonderful people for contributing to Analog ([emoji key](ht Ilir Beqiri
Ilir Beqiri

πŸ“– MichaΕ‚ Nieruchalski
MichaΕ‚ Nieruchalski

πŸ’» Angel Fraga Parodi
Angel Fraga Parodi

πŸš‡ πŸ’» - Alex
Alex

πŸš‡ + Alex
Alex

πŸš‡ πŸ’» Doguhan Uluca
Doguhan Uluca

πŸ“– + N. Can KIRIK
N. Can KIRIK

πŸ’» diff --git a/apps/analog-app-e2e-cypress/package.json b/apps/analog-app-e2e-cypress/package.json new file mode 100644 index 000000000..6e6b8235e --- /dev/null +++ b/apps/analog-app-e2e-cypress/package.json @@ -0,0 +1,5 @@ +{ + "name": "analog-app-e2e-cypress", + "private": true, + "type": "commonjs" +} diff --git a/apps/analog-app-e2e-playwright/package.json b/apps/analog-app-e2e-playwright/package.json new file mode 100644 index 000000000..8a52a7bc3 --- /dev/null +++ b/apps/analog-app-e2e-playwright/package.json @@ -0,0 +1,5 @@ +{ + "name": "analog-app-e2e-playwright", + "private": true, + "type": "commonjs" +} diff --git a/apps/analog-app-e2e-playwright/vite.config.ts b/apps/analog-app-e2e-playwright/vite.config.ts index 27e6dbed2..8be049b53 100644 --- a/apps/analog-app-e2e-playwright/vite.config.ts +++ b/apps/analog-app-e2e-playwright/vite.config.ts @@ -1,7 +1,6 @@ /// import { defineConfig } from 'vite'; -import { offsetFromRoot } from '@nx/devkit'; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { @@ -13,9 +12,7 @@ export default defineConfig(({ mode }) => { environment: 'node', include: ['**/*.spec.ts'], cache: { - dir: `${offsetFromRoot( - 'apps/analog-app-e2e-playwright' - )}/node_modules/.vitest/analog-app-e2e-playwright`, + dir: `../../node_modules/.vitest`, }, }, define: { diff --git a/apps/analog-preset-e2e/vite.config.ts b/apps/analog-preset-e2e/vite.config.ts index ed39a8bfb..8be049b53 100644 --- a/apps/analog-preset-e2e/vite.config.ts +++ b/apps/analog-preset-e2e/vite.config.ts @@ -1,7 +1,6 @@ /// import { defineConfig } from 'vite'; -import { offsetFromRoot } from '@nx/devkit'; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { @@ -13,9 +12,7 @@ export default defineConfig(({ mode }) => { environment: 'node', include: ['**/*.spec.ts'], cache: { - dir: `${offsetFromRoot( - 'apps/analog-preset-e2e' - )}/node_modules/.vitest/analog-preset-e2e`, + dir: `../../node_modules/.vitest`, }, }, define: { diff --git a/apps/astro-app-e2e-playwright/package.json b/apps/astro-app-e2e-playwright/package.json new file mode 100644 index 000000000..580d1bb88 --- /dev/null +++ b/apps/astro-app-e2e-playwright/package.json @@ -0,0 +1,5 @@ +{ + "name": "astro-app-e2e-playwright", + "private": true, + "type": "commonjs" +} diff --git a/apps/astro-app-e2e-playwright/vite.config.ts b/apps/astro-app-e2e-playwright/vite.config.ts index 5f5651714..8be049b53 100644 --- a/apps/astro-app-e2e-playwright/vite.config.ts +++ b/apps/astro-app-e2e-playwright/vite.config.ts @@ -1,6 +1,5 @@ /// -import { offsetFromRoot } from '@nx/devkit'; import { defineConfig } from 'vite'; // https://vitejs.dev/config/ @@ -13,9 +12,7 @@ export default defineConfig(({ mode }) => { environment: 'node', include: ['**/*.spec.ts'], cache: { - dir: `${offsetFromRoot( - 'packages/astro-app-e2e-playwright' - )}/node_modules/.vitest/astro-app-e2e-playwright`, + dir: `../../node_modules/.vitest`, }, }, define: { diff --git a/apps/blog-app-e2e-cypress/cypress.config.ts b/apps/blog-app-e2e-cypress/cypress.config.ts index 07cd697b4..b71748ecf 100644 --- a/apps/blog-app-e2e-cypress/cypress.config.ts +++ b/apps/blog-app-e2e-cypress/cypress.config.ts @@ -1,5 +1,5 @@ import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset.js'; const cypressJsonConfig = { fileServerFolder: '.', diff --git a/apps/blog-app-e2e-cypress/package.json b/apps/blog-app-e2e-cypress/package.json new file mode 100644 index 000000000..4148088bb --- /dev/null +++ b/apps/blog-app-e2e-cypress/package.json @@ -0,0 +1,5 @@ +{ + "name": "blog-app-e2e-cypress", + "private": true, + "type": "commonjs" +} diff --git a/apps/create-analog-e2e/tests/create-analog.spec.ts b/apps/create-analog-e2e/tests/create-analog.spec.ts index 612a9fa8a..2465cd973 100644 --- a/apps/create-analog-e2e/tests/create-analog.spec.ts +++ b/apps/create-analog-e2e/tests/create-analog.spec.ts @@ -54,6 +54,15 @@ describe('create-analog e2e', () => { `${tmpDir}/node_modules/@analogjs` ); + const angularJson = JSON.parse( + readFileSync(`${tmpDir}/angular.json`, 'utf-8') + ); + angularJson.projects['my-app'].root = '.'; + writeFileSync( + `${tmpDir}/angular.json`, + JSON.stringify(angularJson, null, 2) + ); + let viteConfig = readFileSync(`${tmpDir}/vite.config.ts`, 'utf-8'); viteConfig = viteConfig.replace( 'analog()', diff --git a/apps/create-analog-e2e/vite.config.ts b/apps/create-analog-e2e/vite.config.ts index 7929782fe..8be049b53 100644 --- a/apps/create-analog-e2e/vite.config.ts +++ b/apps/create-analog-e2e/vite.config.ts @@ -1,7 +1,6 @@ /// import { defineConfig } from 'vite'; -import { offsetFromRoot } from '@nx/devkit'; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { @@ -13,9 +12,7 @@ export default defineConfig(({ mode }) => { environment: 'node', include: ['**/*.spec.ts'], cache: { - dir: `${offsetFromRoot( - 'apps/create-analog-e2e' - )}/node_modules/.vitest/create-analog-e2e`, + dir: `../../node_modules/.vitest`, }, }, define: { diff --git a/apps/docs-app/docs/contributors.mdx b/apps/docs-app/docs/contributors.mdx index 17c6689bc..6dca3b86a 100644 --- a/apps/docs-app/docs/contributors.mdx +++ b/apps/docs-app/docs/contributors.mdx @@ -130,8 +130,9 @@ Robin is a fullstack developer working with Angular, Spring and AWS. Ilir Beqiri
Ilir Beqiri

πŸ“– MichaΕ‚ Nieruchalski
MichaΕ‚ Nieruchalski

πŸ’» Angel Fraga Parodi
Angel Fraga Parodi

πŸš‡ πŸ’» - Alex
Alex

πŸš‡ + Alex
Alex

πŸš‡ πŸ’» Doguhan Uluca
Doguhan Uluca

πŸ“– + N. Can KIRIK
N. Can KIRIK

πŸ’» diff --git a/apps/docs-app/i18n/es/docusaurus-plugin-content-docs/current/contributors.mdx b/apps/docs-app/i18n/es/docusaurus-plugin-content-docs/current/contributors.mdx index 3e558e85a..963328a46 100644 --- a/apps/docs-app/i18n/es/docusaurus-plugin-content-docs/current/contributors.mdx +++ b/apps/docs-app/i18n/es/docusaurus-plugin-content-docs/current/contributors.mdx @@ -130,8 +130,9 @@ Robin es un desarrollador fullstack que trabaja con Angular, Spring y AWS. Ilir Beqiri
Ilir Beqiri

πŸ“– MichaΕ‚ Nieruchalski
MichaΕ‚ Nieruchalski

πŸ’» Angel Fraga Parodi
Angel Fraga Parodi

πŸš‡ πŸ’» - Alex
Alex

πŸš‡ + Alex
Alex

πŸš‡ πŸ’» Doguhan Uluca
Doguhan Uluca

πŸ“– + N. Can KIRIK
N. Can KIRIK

πŸ’» diff --git a/apps/nx-plugin-e2e/tests/nx-plugin.spec.ts b/apps/nx-plugin-e2e/tests/nx-plugin.spec.ts index 2408b1cd2..037b914cd 100644 --- a/apps/nx-plugin-e2e/tests/nx-plugin.spec.ts +++ b/apps/nx-plugin-e2e/tests/nx-plugin.spec.ts @@ -4,9 +4,12 @@ import { copyNodeModules, runNxCommandAsync, uniq, + readFile, + updateFile, + renameFile, } from '@nx/plugin/testing'; -describe('nx-plugin e2e', () => { +describe.skip('nx-plugin e2e', () => { // Setting up individual workspaces per // test can cause e2e runs to take a long time. // For this reason, we recommend each suite only @@ -30,6 +33,20 @@ describe('nx-plugin e2e', () => { ); copyNodeModules(['@analogjs']); + const pkJson = JSON.parse(readFile(`package.json`)); + pkJson.type = 'module'; + updateFile(`package.json`, JSON.stringify(pkJson, null, 2)); + renameFile(`${project}/postcss.config.js`, `${project}/postcss.config.cjs`); + renameFile( + `${project}/tailwind.config.js`, + `${project}/tailwind.config.cjs` + ); + const postCssConfig = readFile(`${project}/postcss.config.cjs`); + updateFile( + `${project}/postcss.config.cjs`, + postCssConfig.replace('tailwind.config.js', 'tailwind.config.cjs') + ); + await runNxCommandAsync(`test ${project}`); expect(() => checkFilesExist(`${project}/index.html`)).not.toThrow(); diff --git a/apps/trpc-app-e2e-playwright/vite.config.ts b/apps/trpc-app-e2e-playwright/vite.config.ts index 9460fca29..c6c0c0532 100644 --- a/apps/trpc-app-e2e-playwright/vite.config.ts +++ b/apps/trpc-app-e2e-playwright/vite.config.ts @@ -1,7 +1,6 @@ /// import { defineConfig } from 'vite'; -import { offsetFromRoot } from '@nx/devkit'; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { @@ -13,9 +12,7 @@ export default defineConfig(({ mode }) => { environment: 'node', include: ['**/*.spec.ts'], cache: { - dir: `${offsetFromRoot( - 'apps/trpc-app-e2e-playwright' - )}/node_modules/.vitest/trpc-app-e2e-playwright`, + dir: `../../node_modules/.vitest`, }, }, define: { diff --git a/apps/trpc-app/postcss.config.cjs b/apps/trpc-app/postcss.config.cjs new file mode 100644 index 000000000..c3e8b4783 --- /dev/null +++ b/apps/trpc-app/postcss.config.cjs @@ -0,0 +1,10 @@ +const { join } = require('node:path'); + +module.exports = { + plugins: { + tailwindcss: { + config: join(__dirname, 'tailwind.config.cjs'), + }, + autoprefixer: {}, + }, +}; diff --git a/apps/trpc-app/postcss.config.js b/apps/trpc-app/postcss.config.js deleted file mode 100644 index cbdd9c22c..000000000 --- a/apps/trpc-app/postcss.config.js +++ /dev/null @@ -1,10 +0,0 @@ -const { join } = require('path'); - -module.exports = { - plugins: { - tailwindcss: { - config: join(__dirname, 'tailwind.config.js'), - }, - autoprefixer: {}, - }, -}; diff --git a/apps/trpc-app/tailwind.config.js b/apps/trpc-app/tailwind.config.cjs similarity index 90% rename from apps/trpc-app/tailwind.config.js rename to apps/trpc-app/tailwind.config.cjs index a98e42cfb..47673c23a 100644 --- a/apps/trpc-app/tailwind.config.js +++ b/apps/trpc-app/tailwind.config.cjs @@ -1,5 +1,5 @@ const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); +const { join } = require('node:path'); /** @type {import('tailwindcss').Config} */ module.exports = { diff --git a/commitlint.config.js b/commitlint.config.cjs similarity index 100% rename from commitlint.config.js rename to commitlint.config.cjs diff --git a/libs/top-bar/vite.config.ts b/libs/top-bar/vite.config.ts index c96477f33..a19e0aeeb 100644 --- a/libs/top-bar/vite.config.ts +++ b/libs/top-bar/vite.config.ts @@ -1,7 +1,6 @@ /// import { defineConfig } from 'vite'; -import { offsetFromRoot } from '@nx/devkit'; import angular from '@analogjs/vite-plugin-angular'; // https://vitejs.dev/config/ @@ -16,7 +15,7 @@ export default defineConfig(({ mode }) => { setupFiles: ['src/test-setup.ts'], include: ['**/*.spec.ts'], cache: { - dir: `${offsetFromRoot('libs/top-bar/src')}/node_modules/.vitest`, + dir: `../../node_modules/.vitest`, }, }, define: { diff --git a/package.json b/package.json index d79bd4858..4f6694a6c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "name": "analogjs-platform", - "version": "0.2.45", + "version": "1.0.0", "license": "MIT", + "type": "module", "scripts": { "dev": "nx serve", "ng": "nx", @@ -153,6 +154,7 @@ "prismjs": "^1.29.0", "prompts": "^2.4.2", "rollup-plugin-visualizer": "^5.9.0", + "semantic-release": "^22.0.7", "start-server-and-test": "^1.15.4", "tailwindcss": "^3.0.2", "ts-jest": "29.1.0", diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index 3be7dbafa..d258a85ea 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "0.2.45", + "version": "1.0.0", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -28,7 +28,7 @@ "url": "https://github.com/analogjs/analog.git" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^0.2.45" + "@analogjs/vite-plugin-angular": "^1.0.0" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/astro-angular/src/index.ts b/packages/astro-angular/src/index.ts index 9ed8bfa6a..4b7373de6 100644 --- a/packages/astro-angular/src/index.ts +++ b/packages/astro-angular/src/index.ts @@ -39,7 +39,7 @@ function getViteConfiguration(vite?: PluginOptions) { * */ plugins: [ - (viteAngular as any).default(vite), + viteAngular(vite), { name: '@analogjs/astro-angular-platform-server', transform(code: string, id: string) { diff --git a/packages/content/package.json b/packages/content/package.json index 558971b0f..66c8f66f0 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,7 +1,8 @@ { "name": "@analogjs/content", - "version": "0.2.45", + "version": "1.0.0", "description": "Content Rendering for Analog", + "type": "module", "author": "Brandon Roberts ", "keywords": [ "angular", diff --git a/packages/content/vite.config.ts b/packages/content/vite.config.ts index 407445b35..e6940cd03 100644 --- a/packages/content/vite.config.ts +++ b/packages/content/vite.config.ts @@ -1,7 +1,6 @@ /// import { defineConfig } from 'vite'; -import { offsetFromRoot } from '@nx/devkit'; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { @@ -14,7 +13,7 @@ export default defineConfig(({ mode }) => { setupFiles: ['src/test-setup.ts'], include: ['**/*.spec.ts'], cache: { - dir: `${offsetFromRoot('packages/content/src')}/node_modules/.vitest`, + dir: `../../node_modules/.vitest`, }, }, define: { diff --git a/packages/create-analog/files/postcss.config.js b/packages/create-analog/files/postcss.config.cjs similarity index 100% rename from packages/create-analog/files/postcss.config.js rename to packages/create-analog/files/postcss.config.cjs diff --git a/packages/create-analog/files/tailwind.config.js b/packages/create-analog/files/tailwind.config.cjs similarity index 100% rename from packages/create-analog/files/tailwind.config.js rename to packages/create-analog/files/tailwind.config.cjs diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index 2366ca14a..ce35d74af 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "0.2.74", + "version": "1.0.0", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index ecae515b5..ba6ce5ed1 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -1,6 +1,7 @@ { "name": "my-app", "version": "0.0.0", + "type": "module", "private": true, "engines": { "node": ">=18.13.0" diff --git a/packages/create-analog/template-angular-v17/angular.json b/packages/create-analog/template-angular-v17/angular.json index a47113eb6..bd46cc922 100644 --- a/packages/create-analog/template-angular-v17/angular.json +++ b/packages/create-analog/template-angular-v17/angular.json @@ -5,7 +5,7 @@ "projects": { "my-app": { "projectType": "application", - "root": "", + "root": ".", "sourceRoot": "src", "prefix": "app", "architect": { diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index d41ed850d..64ad1ab14 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -1,6 +1,7 @@ { "name": "my-app", "version": "0.0.0", + "type": "module", "private": true, "engines": { "node": ">=18.13.0" @@ -14,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^0.2.0", - "@analogjs/router": "^0.2.0", + "@analogjs/content": "^1.0.0", + "@analogjs/router": "^1.0.0", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -37,8 +38,8 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^0.2.0", - "@angular-devkit/build-angular": "^17.2.0", + "@analogjs/platform": "^1.0.0", + "@analogjs/vite-plugin-angular": "^1.0.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", "@nx/vite": "~18.0.0", diff --git a/packages/create-analog/template-blog/_gitignore b/packages/create-analog/template-blog/_gitignore index e64aef272..b82045d79 100644 --- a/packages/create-analog/template-blog/_gitignore +++ b/packages/create-analog/template-blog/_gitignore @@ -37,7 +37,6 @@ yarn-error.log /libpeerconnection.log testem.log /typings -/.npmrc # System files .DS_Store diff --git a/packages/create-analog/template-blog/angular.json b/packages/create-analog/template-blog/angular.json index fc278056b..73953009f 100644 --- a/packages/create-analog/template-blog/angular.json +++ b/packages/create-analog/template-blog/angular.json @@ -5,7 +5,7 @@ "projects": { "blog": { "projectType": "application", - "root": "", + "root": ".", "sourceRoot": "src", "prefix": "blog", "architect": { diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index c39cc2f7f..ff436d188 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -1,6 +1,7 @@ { "name": "blog", "version": "0.0.0", + "type": "module", "private": true, "engines": { "node": ">=18.13.0" @@ -14,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^0.2.0", - "@analogjs/router": "^0.2.0", + "@analogjs/content": "^1.0.0", + "@analogjs/router": "^1.0.0", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -37,7 +38,8 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^0.2.0", + "@analogjs/platform": "^1.0.0", + "@analogjs/vite-plugin-angular": "^1.0.0", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-blog/vite.config.ts b/packages/create-analog/template-blog/vite.config.ts index 59692b046..f65b81608 100644 --- a/packages/create-analog/template-blog/vite.config.ts +++ b/packages/create-analog/template-blog/vite.config.ts @@ -24,6 +24,7 @@ export default defineConfig(({ mode }) => ({ environment: 'jsdom', setupFiles: ['src/test.ts'], include: ['**/*.spec.ts'], + reporters: ['default'], }, define: { 'import.meta.vitest': mode !== 'production', diff --git a/packages/nx-plugin/src/generators/app/files/tailwind/postcss.config.cjs__template__ b/packages/nx-plugin/src/generators/app/files/tailwind/postcss.config.cjs__template__ new file mode 100644 index 000000000..a476153b4 --- /dev/null +++ b/packages/nx-plugin/src/generators/app/files/tailwind/postcss.config.cjs__template__ @@ -0,0 +1,10 @@ +const { join } = require('node:path'); + +module.exports = { + plugins: { + tailwindcss: { + config: join(__dirname, 'tailwind.config.cjs') + }, + autoprefixer: {} + } +}; diff --git a/packages/nx-plugin/src/generators/app/files/tailwind/postcss.config.js__template__ b/packages/nx-plugin/src/generators/app/files/tailwind/postcss.config.js__template__ deleted file mode 100644 index b59edd276..000000000 --- a/packages/nx-plugin/src/generators/app/files/tailwind/postcss.config.js__template__ +++ /dev/null @@ -1,10 +0,0 @@ -const { join } = require('path'); - -module.exports = { - plugins: { - tailwindcss: { - config: join(__dirname, 'tailwind.config.js') - }, - autoprefixer: {} - } -}; diff --git a/packages/nx-plugin/src/generators/app/files/tailwind/tailwind.config.js__template__ b/packages/nx-plugin/src/generators/app/files/tailwind/tailwind.config.cjs__template__ similarity index 89% rename from packages/nx-plugin/src/generators/app/files/tailwind/tailwind.config.js__template__ rename to packages/nx-plugin/src/generators/app/files/tailwind/tailwind.config.cjs__template__ index 0e32e3ee7..d3c5b1a1d 100644 --- a/packages/nx-plugin/src/generators/app/files/tailwind/tailwind.config.js__template__ +++ b/packages/nx-plugin/src/generators/app/files/tailwind/tailwind.config.cjs__template__ @@ -1,5 +1,5 @@ const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); +const { join } = require('node:path'); /** @type {import('tailwindcss').Config} */ module.exports = { diff --git a/packages/nx-plugin/src/generators/app/files/template-angular-v17/package.json__template__ b/packages/nx-plugin/src/generators/app/files/template-angular-v17/package.json__template__ new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/nx-plugin/src/generators/app/files/template-angular-v17/package.json__template__ @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/nx-plugin/src/generators/app/files/template-angular-v17/vite.config.ts__template__ b/packages/nx-plugin/src/generators/app/files/template-angular-v17/vite.config.ts__template__ index a500c7c08..0a8829490 100644 --- a/packages/nx-plugin/src/generators/app/files/template-angular-v17/vite.config.ts__template__ +++ b/packages/nx-plugin/src/generators/app/files/template-angular-v17/vite.config.ts__template__ @@ -20,6 +20,11 @@ export default defineConfig(({ mode }) => { commonjsOptions: { transformMixedEsModules: true }, target: ['es2020'], }, + server: { + fs: { + allow: ['.'], + }, + }, plugins: [ <% if (addTRPC) { %> analog({ diff --git a/packages/nx-plugin/src/generators/app/generator.spec.ts b/packages/nx-plugin/src/generators/app/generator.spec.ts index d268b5426..800818366 100644 --- a/packages/nx-plugin/src/generators/app/generator.spec.ts +++ b/packages/nx-plugin/src/generators/app/generator.spec.ts @@ -94,8 +94,8 @@ describe('nx-plugin generator', () => { dependencies: Record, devDependencies: Record ) => { - expect(dependencies['@analogjs/content']).toBe('^0.2.0'); - expect(dependencies['@analogjs/router']).toBe('^0.2.0'); + expect(dependencies['@analogjs/content']).toBe('^1.0.0-rc.0'); + expect(dependencies['@analogjs/router']).toBe('^1.0.0-rc.0'); expect(dependencies['@angular/platform-server']).toBe( dependencies['@angular/core'] ); @@ -111,8 +111,10 @@ describe('nx-plugin generator', () => { // we just check for truthy because @nx/eslint generator // will install the correct version based on Nx version expect(devDependencies['@nx/eslint']).toBeTruthy(); - expect(devDependencies['@analogjs/platform']).toBe('^0.2.0'); - expect(devDependencies['@analogjs/vite-plugin-angular']).toBe('^0.2.0'); + expect(devDependencies['@analogjs/platform']).toBe('^1.0.0-rc.0'); + expect(devDependencies['@analogjs/vite-plugin-angular']).toBe( + '^1.0.0-rc.0' + ); expect(devDependencies['@nx/vite']).toBe('^17.0.0'); expect(devDependencies['jsdom']).toBe('^22.0.0'); expect(devDependencies['vite']).toBe('^4.4.8'); @@ -124,8 +126,8 @@ describe('nx-plugin generator', () => { dependencies: Record, devDependencies: Record ) => { - expect(dependencies['@analogjs/content']).toBe('^0.2.0'); - expect(dependencies['@analogjs/router']).toBe('^0.2.0'); + expect(dependencies['@analogjs/content']).toBe('^1.0.0-rc.0'); + expect(dependencies['@analogjs/router']).toBe('^1.0.0-rc.0'); expect(dependencies['@angular/platform-server']).toBe( dependencies['@angular/core'] ); @@ -141,13 +143,15 @@ describe('nx-plugin generator', () => { // we just check for truthy because @nx/eslint generator // will install the correct version based on Nx version expect(devDependencies['@nx/eslint']).toBeTruthy(); - expect(devDependencies['@analogjs/platform']).toBe('^0.2.0'); - expect(devDependencies['@analogjs/vite-plugin-angular']).toBe('^0.2.0'); + expect(devDependencies['@analogjs/platform']).toBe('^1.0.0-rc.0'); + expect(devDependencies['@analogjs/vite-plugin-angular']).toBe( + '^1.0.0-rc.0' + ); expect(devDependencies['@nx/vite']).toBe('^18.0.0'); expect(devDependencies['jsdom']).toBe('^22.1.0'); - expect(devDependencies['vite']).toBe('~5.0.0'); + expect(devDependencies['vite']).toBe('^5.0.0'); expect(devDependencies['vite-tsconfig-paths']).toBe('^4.2.0'); - expect(devDependencies['vitest']).toBe('^1.0.4'); + expect(devDependencies['vitest']).toBe('^1.3.1'); }; const verifyConfig = ( @@ -207,10 +211,10 @@ describe('nx-plugin generator', () => { ) => { expect(devDependencies['tailwindcss']).toBeDefined(); const hasTailwindConfigFile = tree.exists( - 'apps/tailwind-app/tailwind.config.js' + 'apps/tailwind-app/tailwind.config.cjs' ); const hasPostCSSConfigFile = tree.exists( - 'apps/tailwind-app/postcss.config.js' + 'apps/tailwind-app/postcss.config.cjs' ); expect(hasTailwindConfigFile).toBeTruthy(); expect(hasPostCSSConfigFile).toBeTruthy(); diff --git a/packages/nx-plugin/src/generators/app/lib/add-files.ts b/packages/nx-plugin/src/generators/app/lib/add-files.ts index 5fda0d4d7..bb32424e8 100644 --- a/packages/nx-plugin/src/generators/app/lib/add-files.ts +++ b/packages/nx-plugin/src/generators/app/lib/add-files.ts @@ -1,5 +1,5 @@ import { generateFiles, Tree } from '@nx/devkit'; -import * as path from 'path'; +import { join } from 'node:path'; import { NormalizedOptions } from '../generator'; export function addFiles( @@ -13,12 +13,7 @@ export function addFiles( }; generateFiles( tree, - path.join( - __dirname, - '..', - 'files', - 'template-angular-v' + majorAngularVersion - ), + join(__dirname, '..', 'files', 'template-angular-v' + majorAngularVersion), options.projectRoot, templateOptions ); @@ -26,7 +21,7 @@ export function addFiles( if (!tree.read('/tsconfig.base.json')) { generateFiles( tree, - path.join(__dirname, '..', 'files', 'root'), + join(__dirname, '..', 'files', 'root'), '.', templateOptions ); diff --git a/packages/nx-plugin/src/generators/app/lib/add-home-page.ts b/packages/nx-plugin/src/generators/app/lib/add-home-page.ts index fdf39aaac..95d2a6c45 100644 --- a/packages/nx-plugin/src/generators/app/lib/add-home-page.ts +++ b/packages/nx-plugin/src/generators/app/lib/add-home-page.ts @@ -1,5 +1,5 @@ import { generateFiles, Tree } from '@nx/devkit'; -import * as path from 'path'; +import { join } from 'node:path'; import { NormalizedOptions } from '../generator'; export function addHomePage(tree: Tree, options: NormalizedOptions) { @@ -10,7 +10,7 @@ export function addHomePage(tree: Tree, options: NormalizedOptions) { generateFiles( tree, - path.join(__dirname, '..', 'files', 'index-page'), + join(__dirname, '..', 'files', 'index-page'), options.projectRoot, templateOptions ); @@ -22,7 +22,7 @@ export function addHomePage(tree: Tree, options: NormalizedOptions) { generateFiles( tree, - path.join(__dirname, '..', 'files', 'welcome-components', pageDirectory), + join(__dirname, '..', 'files', 'welcome-components', pageDirectory), options.projectRoot, templateOptions ); diff --git a/packages/nx-plugin/src/generators/app/lib/add-tailwind-helpers.ts b/packages/nx-plugin/src/generators/app/lib/add-tailwind-helpers.ts index eaf82acc2..13dacc42a 100644 --- a/packages/nx-plugin/src/generators/app/lib/add-tailwind-helpers.ts +++ b/packages/nx-plugin/src/generators/app/lib/add-tailwind-helpers.ts @@ -16,7 +16,7 @@ import { GeneratorOptions, NormalizedGeneratorOptions, } from './add-tailwind-config'; -import { relative } from 'path'; +import { relative } from 'node:path'; export function normalizeOptions( options: GeneratorOptions diff --git a/packages/nx-plugin/src/generators/app/lib/add-trpc.ts b/packages/nx-plugin/src/generators/app/lib/add-trpc.ts index 4c84cadef..945c408e7 100644 --- a/packages/nx-plugin/src/generators/app/lib/add-trpc.ts +++ b/packages/nx-plugin/src/generators/app/lib/add-trpc.ts @@ -1,5 +1,5 @@ import { addDependenciesToPackageJson, generateFiles, Tree } from '@nx/devkit'; -import * as path from 'path'; +import { join } from 'node:path'; import { NormalizedOptions } from '../generator'; import { getTrpcDependencies } from '../versions/trpc-dependencies'; @@ -18,7 +18,7 @@ export async function addTrpc( }; generateFiles( tree, - path.join(__dirname, '..', 'files', 'trpc'), + join(__dirname, '..', 'files', 'trpc'), projectRoot, templateOptions ); diff --git a/packages/nx-plugin/src/generators/app/versions/nx_17_X/versions.ts b/packages/nx-plugin/src/generators/app/versions/nx_17_X/versions.ts index c455d1af9..62a08e58f 100644 --- a/packages/nx-plugin/src/generators/app/versions/nx_17_X/versions.ts +++ b/packages/nx-plugin/src/generators/app/versions/nx_17_X/versions.ts @@ -2,10 +2,10 @@ // dependencies export const V17_X_NX_DEVKIT = '^17.0.0'; export const V17_X_NX_ANGULAR = '^17.0.0'; -export const V17_X_ANALOG_JS_CONTENT = '^0.2.0'; -export const V17_X_ANALOG_JS_ROUTER = '^0.2.0'; -export const V17_X_ANALOG_JS_TRPC = '^0.2.0'; -export const V17_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^0.2.0'; +export const V17_X_ANALOG_JS_CONTENT = '^1.0.0-rc.0'; +export const V17_X_ANALOG_JS_ROUTER = '^1.0.0-rc.0'; +export const V17_X_ANALOG_JS_TRPC = '^1.0.0-rc.0'; +export const V17_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^1.0.0-rc.0'; export const V17_X_TRPC_CLIENT = '^10.25.0'; export const V17_X_TRPC_SERVER = '^10.25.0'; export const V17_X_ISOMORPHIC_FETCH = '^3.0.0'; @@ -21,7 +21,7 @@ export const V17_X_POSTCSS = '^8.4.5'; export const V17_X_AUTOPREFIXER = '^10.4.0'; // devDependencies -export const V17_X_ANALOG_JS_PLATFORM = '^0.2.0'; +export const V17_X_ANALOG_JS_PLATFORM = '^1.0.0-rc.0'; export const V17_X_NX_VITE = '^17.0.0'; export const V17_X_NX_LINTER = '^17.0.0'; export const V17_X_JSDOM = '^22.0.0'; diff --git a/packages/nx-plugin/src/generators/app/versions/nx_18_X/versions.ts b/packages/nx-plugin/src/generators/app/versions/nx_18_X/versions.ts index 16d06dad5..e965f57a1 100644 --- a/packages/nx-plugin/src/generators/app/versions/nx_18_X/versions.ts +++ b/packages/nx-plugin/src/generators/app/versions/nx_18_X/versions.ts @@ -2,10 +2,10 @@ // dependencies export const V18_X_NX_DEVKIT = '^18.0.0'; export const V18_X_NX_ANGULAR = '^18.0.0'; -export const V18_X_ANALOG_JS_CONTENT = '^0.2.0'; -export const V18_X_ANALOG_JS_ROUTER = '^0.2.0'; -export const V18_X_ANALOG_JS_TRPC = '^0.2.0'; -export const V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^0.2.0'; +export const V18_X_ANALOG_JS_CONTENT = '^1.0.0-rc.0'; +export const V18_X_ANALOG_JS_ROUTER = '^1.0.0-rc.0'; +export const V18_X_ANALOG_JS_TRPC = '~0.2.45'; +export const V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^1.0.0-rc.0'; export const V18_X_TRPC_CLIENT = '^10.25.0'; export const V18_X_TRPC_SERVER = '^10.25.0'; export const V18_X_ISOMORPHIC_FETCH = '^3.0.0'; @@ -21,11 +21,11 @@ export const V18_X_POSTCSS = '^8.4.5'; export const V18_X_AUTOPREFIXER = '^10.4.0'; // devDependencies -export const V18_X_ANALOG_JS_PLATFORM = '^0.2.0'; +export const V18_X_ANALOG_JS_PLATFORM = '^1.0.0-rc.0'; export const V18_X_NX_VITE = '^18.0.0'; export const V18_X_NX_LINTER = '^18.0.0'; export const V18_X_JSDOM = '^22.1.0'; -export const V18_X_VITE = '~5.0.0'; +export const V18_X_VITE = '^5.0.0'; export const V18_X_VITE_TSCONFIG_PATHS = '^4.2.0'; -export const V18_X_VITEST = '^1.0.4'; +export const V18_X_VITEST = '^1.3.1'; export const V18_X_ZOD = '^3.21.4'; diff --git a/packages/nx-plugin/src/generators/page/generator.ts b/packages/nx-plugin/src/generators/page/generator.ts index 190eebdab..f3fc1e8b0 100644 --- a/packages/nx-plugin/src/generators/page/generator.ts +++ b/packages/nx-plugin/src/generators/page/generator.ts @@ -8,7 +8,7 @@ import { stripIndents, Tree, } from '@nx/devkit'; -import * as path from 'path'; +import { join } from 'node:path'; import { AnalogPageGeneratorSchema, NormalizedSchema } from './schema'; function normalizeOptions( @@ -51,13 +51,9 @@ function addFiles(tree: Tree, options: NormalizedSchema) { }; const pageFolders = options.pathname.split('/').slice(0, -1); - const pageDir = path.join( - options.projectRoot, - 'src/app/pages', - ...pageFolders - ); + const pageDir = join(options.projectRoot, 'src/app/pages', ...pageFolders); - generateFiles(tree, path.join(__dirname, 'files'), pageDir, templateOptions); + generateFiles(tree, join(__dirname, 'files'), pageDir, templateOptions); } export async function analogPageGenerator( diff --git a/packages/nx-plugin/src/generators/setup-vitest/generator.ts b/packages/nx-plugin/src/generators/setup-vitest/generator.ts index 1ebc0995b..192d562f5 100644 --- a/packages/nx-plugin/src/generators/setup-vitest/generator.ts +++ b/packages/nx-plugin/src/generators/setup-vitest/generator.ts @@ -5,7 +5,7 @@ import { installPackagesTask, Tree, } from '@nx/devkit'; -import * as path from 'path'; +import { join } from 'node:path'; import { getInstalledPackageVersion } from '../../utils/version-utils'; import { addAnalogDependencies } from './lib/add-analog-dependencies'; @@ -25,7 +25,7 @@ function addFiles(tree: Tree, options: SetupVitestGeneratorSchema) { generateFiles( tree, - path.join(__dirname, 'files'), + join(__dirname, 'files'), projectConfig.root || '.', templateOptions ); diff --git a/packages/nx-plugin/src/generators/setup-vitest/versions/ng_17_X/versions.ts b/packages/nx-plugin/src/generators/setup-vitest/versions/ng_17_X/versions.ts index 20b89f164..602298cb4 100644 --- a/packages/nx-plugin/src/generators/setup-vitest/versions/ng_17_X/versions.ts +++ b/packages/nx-plugin/src/generators/setup-vitest/versions/ng_17_X/versions.ts @@ -1,8 +1,8 @@ // V17_X // devDependencies -export const V17_X_ANALOG_JS_PLATFORM = '^0.2.0'; -export const V17_X_NX_VITE = '^17.0.0'; +export const V17_X_ANALOG_JS_PLATFORM = '^1.0.0-rc.0'; +export const V17_X_NX_VITE = '^18.0.0'; export const V17_X_JSDOM = '^22.0.0'; export const V17_X_VITE_TSCONFIG_PATHS = '^4.2.0'; -export const V17_X_VITEST = '^0.34.0'; +export const V17_X_VITEST = '^1.31.1'; diff --git a/packages/nx-plugin/vite.config.ts b/packages/nx-plugin/vite.config.ts index c948b9b5c..f89116bfd 100644 --- a/packages/nx-plugin/vite.config.ts +++ b/packages/nx-plugin/vite.config.ts @@ -1,7 +1,6 @@ /// import { defineConfig } from 'vite'; -import { offsetFromRoot } from '@nx/devkit'; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { @@ -13,7 +12,7 @@ export default defineConfig(({ mode }) => { include: ['**/*.spec.ts'], exclude: ['**/files/**/*.spec.ts'], cache: { - dir: `${offsetFromRoot('packages/nx-plugin/src')}/node_modules/.vitest`, + dir: `../../node_modules/.vitest`, }, }, define: { diff --git a/packages/platform/package.json b/packages/platform/package.json index a0da29e1d..ab7416b1a 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,8 +1,8 @@ { "name": "@analogjs/platform", - "version": "0.2.45", - "type": "commonjs", + "version": "1.0.0", "description": "The fullstack meta-framework for Angular", + "type": "module", "author": "Brandon Roberts ", "exports": { ".": "./src/index.js", @@ -25,8 +25,8 @@ }, "dependencies": { "nitropack": "^2.6.0", - "@analogjs/vite-plugin-angular": "^0.2.45", - "@analogjs/vite-plugin-nitro": "^0.2.45" + "@analogjs/vite-plugin-angular": "^1.0.0", + "@analogjs/vite-plugin-nitro": "^1.0.0" }, "peerDependencies": { "@nx/devkit": "^16.0.0 || ^17.0.0 || ^18.0.0", diff --git a/packages/platform/src/index.ts b/packages/platform/src/index.ts index 37a1fca75..6708d0802 100644 --- a/packages/platform/src/index.ts +++ b/packages/platform/src/index.ts @@ -1,4 +1,4 @@ -import { platformPlugin } from './lib/platform-plugin'; +import { platformPlugin } from './lib/platform-plugin.js'; export { Options, PrerenderContentFile } from './lib/options'; export default platformPlugin; diff --git a/packages/platform/src/lib/content-plugin.spec.ts b/packages/platform/src/lib/content-plugin.spec.ts index 228415c02..4bd553763 100644 --- a/packages/platform/src/lib/content-plugin.spec.ts +++ b/packages/platform/src/lib/content-plugin.spec.ts @@ -1,5 +1,5 @@ import { describe, expect } from 'vitest'; -import * as fs from 'fs'; +import * as fs from 'node:fs'; vi.mock('fs'); diff --git a/packages/platform/src/lib/content-plugin.ts b/packages/platform/src/lib/content-plugin.ts index 850c0ca6d..16bc955f4 100644 --- a/packages/platform/src/lib/content-plugin.ts +++ b/packages/platform/src/lib/content-plugin.ts @@ -1,5 +1,5 @@ import { Plugin } from 'vite'; -import * as fs from 'fs'; +import { readFileSync } from 'node:fs'; interface Content { code: string; @@ -32,7 +32,7 @@ export function contentPlugin(): Plugin[] { // when running unit tests. It's safe to retrieve `default` first, since we still // fallback to the original implementation. const frontmatter = fm.default || fm; - const fileContents = fs.readFileSync(id.split('?')[0], 'utf8'); + const fileContents = readFileSync(id.split('?')[0], 'utf8'); const { attributes } = frontmatter(fileContents); const content = { code, diff --git a/packages/platform/src/lib/options.ts b/packages/platform/src/lib/options.ts index bbd463fa3..be9083752 100644 --- a/packages/platform/src/lib/options.ts +++ b/packages/platform/src/lib/options.ts @@ -1,6 +1,6 @@ import type { PluginOptions } from '@analogjs/vite-plugin-angular'; import type { NitroConfig, PrerenderRoute } from 'nitropack'; -import { SitemapConfig } from '@analogjs/vite-plugin-nitro'; +import type { SitemapConfig } from '@analogjs/vite-plugin-nitro'; export interface PrerenderOptions { /** diff --git a/packages/platform/src/lib/platform-plugin.spec.ts b/packages/platform/src/lib/platform-plugin.spec.ts index 1163b3b2f..c1b8c532c 100644 --- a/packages/platform/src/lib/platform-plugin.spec.ts +++ b/packages/platform/src/lib/platform-plugin.spec.ts @@ -1,5 +1,5 @@ import { describe, expect } from 'vitest'; -import { platformPlugin } from './platform-plugin'; +import { platformPlugin } from './platform-plugin.js'; vi.mock('@analogjs/vite-plugin-nitro'); vi.mock('./ssr/ssr-build-plugin'); diff --git a/packages/platform/src/lib/platform-plugin.ts b/packages/platform/src/lib/platform-plugin.ts index fac8863ae..89f82e9a8 100644 --- a/packages/platform/src/lib/platform-plugin.ts +++ b/packages/platform/src/lib/platform-plugin.ts @@ -2,12 +2,12 @@ import { Plugin } from 'vite'; import viteNitroPlugin from '@analogjs/vite-plugin-nitro'; import angular from '@analogjs/vite-plugin-angular'; -import { Options } from './options'; -import { routerPlugin } from './router-plugin'; -import { ssrBuildPlugin } from './ssr/ssr-build-plugin'; -import { contentPlugin } from './content-plugin'; -import { clearClientPageEndpointsPlugin } from './clear-client-page-endpoint'; -import { ssrXhrBuildPlugin } from './ssr/ssr-xhr-plugin'; +import { Options } from './options.js'; +import { routerPlugin } from './router-plugin.js'; +import { ssrBuildPlugin } from './ssr/ssr-build-plugin.js'; +import { contentPlugin } from './content-plugin.js'; +import { clearClientPageEndpointsPlugin } from './clear-client-page-endpoint.js'; +import { ssrXhrBuildPlugin } from './ssr/ssr-xhr-plugin.js'; export function platformPlugin(opts: Options = {}): Plugin[] { const { apiPrefix, ...platformOptions } = { diff --git a/packages/platform/tsconfig.lib.json b/packages/platform/tsconfig.lib.json index a697547f2..d51801992 100644 --- a/packages/platform/tsconfig.lib.json +++ b/packages/platform/tsconfig.lib.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "module": "commonjs", + "module": "es2020", "outDir": "../../dist/out-tsc", "inlineSourceMap": true, "sourceMap": false, diff --git a/packages/platform/vite.config.ts b/packages/platform/vite.config.ts index 400521ab3..8a79326ea 100644 --- a/packages/platform/vite.config.ts +++ b/packages/platform/vite.config.ts @@ -1,6 +1,5 @@ /// -import { offsetFromRoot } from '@nx/devkit'; import { defineConfig } from 'vite'; // https://vitejs.dev/config/ @@ -14,7 +13,7 @@ export default defineConfig(({ mode }) => { setupFiles: ['src/test-setup.ts'], include: ['**/*.spec.ts'], cache: { - dir: `${offsetFromRoot('packages/platform/src')}/node_modules/.vitest`, + dir: `../../node_modules/.vitest`, }, }, define: { diff --git a/packages/router/package.json b/packages/router/package.json index 1dcc2204f..5f32d706f 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,7 +1,8 @@ { "name": "@analogjs/router", - "version": "0.2.45", + "version": "1.0.0", "description": "Filesystem-based routing for Angular", + "type": "module", "author": "Brandon Roberts ", "keywords": [ "angular", @@ -23,7 +24,7 @@ "@angular/router": "^15.0.0 || >=16.0.0" }, "optionalDependencies": { - "@analogjs/content": "^0.2.45" + "@analogjs/content": "^1.0.0" }, "dependencies": { "tslib": "^2.0.0" diff --git a/packages/router/vite.config.ts b/packages/router/vite.config.ts index 45dae4a61..e6940cd03 100644 --- a/packages/router/vite.config.ts +++ b/packages/router/vite.config.ts @@ -1,7 +1,6 @@ /// import { defineConfig } from 'vite'; -import { offsetFromRoot } from '@nx/devkit'; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { @@ -14,7 +13,7 @@ export default defineConfig(({ mode }) => { setupFiles: ['src/test-setup.ts'], include: ['**/*.spec.ts'], cache: { - dir: `${offsetFromRoot('packages/router/src')}/node_modules/.vitest`, + dir: `../../node_modules/.vitest`, }, }, define: { diff --git a/packages/trpc/package.json b/packages/trpc/package.json index 4fd41b47f..06b9fa280 100644 --- a/packages/trpc/package.json +++ b/packages/trpc/package.json @@ -2,6 +2,7 @@ "name": "@analogjs/trpc", "version": "0.2.45", "description": "Angular/Nitro-based tRPC integration", + "type": "module", "author": "Brandon Roberts ", "keywords": [ "angular", diff --git a/packages/trpc/vite.config.ts b/packages/trpc/vite.config.ts index ca5fb3929..80680be28 100644 --- a/packages/trpc/vite.config.ts +++ b/packages/trpc/vite.config.ts @@ -1,7 +1,6 @@ /// import { defineConfig } from 'vite'; -import { offsetFromRoot } from '@nx/devkit'; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { @@ -15,7 +14,7 @@ export default defineConfig(({ mode }) => { setupFiles: ['src/test-setup.ts'], include: ['**/*.spec.ts'], cache: { - dir: `${offsetFromRoot('packages/trpc/src')}/node_modules/.vitest`, + dir: `../../node_modules/.vitest`, }, }, define: { diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index 76d8324c3..af615ba40 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,7 +1,8 @@ { "name": "@analogjs/vite-plugin-angular", + "version": "1.0.0", "description": "Vite Plugin for Angular", - "version": "0.2.45", + "type": "module", "keywords": [ "vite", "vitest", diff --git a/packages/vite-plugin-angular/src/index.ts b/packages/vite-plugin-angular/src/index.ts index 0b20eefe9..4b1c538bf 100644 --- a/packages/vite-plugin-angular/src/index.ts +++ b/packages/vite-plugin-angular/src/index.ts @@ -1,9 +1,9 @@ -import { angular } from './lib/angular-vite-plugin'; -export { PluginOptions } from './lib/angular-vite-plugin'; -export { compileAnalogFile } from './lib/authoring/analog'; +import { angular } from './lib/angular-vite-plugin.js'; +export { PluginOptions } from './lib/angular-vite-plugin.js'; +export { compileAnalogFile } from './lib/authoring/analog.js'; export { MarkdownTemplateTransform, defaultMarkdownTemplateTransforms, -} from './lib/authoring/markdown-transform'; +} from './lib/authoring/markdown-transform.js'; export default angular; diff --git a/packages/vite-plugin-angular/src/lib/angular-build-optimizer-plugin.ts b/packages/vite-plugin-angular/src/lib/angular-build-optimizer-plugin.ts index 7cb38837a..4a66cd96a 100644 --- a/packages/vite-plugin-angular/src/lib/angular-build-optimizer-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/angular-build-optimizer-plugin.ts @@ -1,10 +1,8 @@ import { Plugin } from 'vite'; import { transformAsync } from '@babel/core'; -import { - angularApplicationPreset, - loadEsmModule, - requiresLinking, -} from './utils/devkit'; +import { createEs2015LinkerPlugin as linkerPluginCreator } from '@angular/compiler-cli/linker/babel'; + +import { angularApplicationPreset, requiresLinking } from './utils/devkit.js'; export function buildOptimizerPlugin({ isProd, @@ -48,13 +46,6 @@ export function buildOptimizerPlugin({ async transform(code, id) { if (/\.[cm]?js$/.test(id)) { const angularPackage = /[\\/]node_modules[\\/]@angular[\\/]/.test(id); - - const linkerPluginCreator = ( - await loadEsmModule< - typeof import('@angular/compiler-cli/linker/babel') - >('@angular/compiler-cli/linker/babel') - ).createEs2015LinkerPlugin; - const forceAsyncTransformation = !/[\\/][_f]?esm2015[\\/]/.test(id) && /for\s+await\s*\(|async\s+function\s*\*/.test(code); diff --git a/packages/vite-plugin-angular/src/lib/angular-jit-plugin.ts b/packages/vite-plugin-angular/src/lib/angular-jit-plugin.ts index 7d5e75ec6..733302759 100644 --- a/packages/vite-plugin-angular/src/lib/angular-jit-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/angular-jit-plugin.ts @@ -1,5 +1,4 @@ import { Plugin, PluginContainer, ViteDevServer } from 'vite'; -import { readFileSync } from 'fs'; export function jitPlugin({ inlineStylesExtension, diff --git a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts index 5e6720065..b56cdb699 100644 --- a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts @@ -1,8 +1,10 @@ import { CompilerHost, NgtscProgram } from '@angular/compiler-cli'; import { transformAsync } from '@babel/core'; -import * as path from 'path'; +import { resolve } from 'node:path'; +import * as compilerCli from '@angular/compiler-cli'; import * as ts from 'typescript'; +import { createRequire } from 'node:module'; import { ModuleNode, normalizePath, @@ -11,24 +13,30 @@ import { UserConfig, ViteDevServer, } from 'vite'; -import { buildOptimizerPlugin } from './angular-build-optimizer-plugin'; -import { jitPlugin } from './angular-jit-plugin'; -import { angularVitestPlugin } from './angular-vitest-plugin'; -import { createCompilerPlugin } from './compiler-plugin'; -import { StyleUrlsResolver, TemplateUrlsResolver } from './component-resolvers'; -import { augmentHostWithResources } from './host'; +import { createCompilerPlugin } from './compiler-plugin.js'; +import { + StyleUrlsResolver, + TemplateUrlsResolver, +} from './component-resolvers.js'; +import { augmentHostWithResources } from './host.js'; +import { jitPlugin } from './angular-jit-plugin.js'; +import { buildOptimizerPlugin } from './angular-build-optimizer-plugin.js'; + import { angularApplicationPreset, createJitResourceTransformer, - loadEsmModule, SourceFileCache, -} from './utils/devkit'; -import { getFrontmatterMetadata } from './authoring/frontmatter'; +} from './utils/devkit.js'; +import { angularVitestPlugin } from './angular-vitest-plugin.js'; + +const require = createRequire(import.meta.url); + +import { getFrontmatterMetadata } from './authoring/frontmatter.js'; import { defaultMarkdownTemplateTransforms, MarkdownTemplateTransform, -} from './authoring/markdown-transform'; +} from './authoring/markdown-transform.js'; export interface PluginOptions { tsconfig?: string; @@ -61,8 +69,8 @@ interface EmitFileResult { map?: string; dependencies: readonly string[]; hash?: Uint8Array; - errors: string[]; - warnings: string[]; + errors: (string | ts.DiagnosticMessageChain)[]; + warnings: (string | ts.DiagnosticMessageChain)[]; } type FileEmitter = (file: string) => Promise; @@ -114,8 +122,9 @@ export function angular(options?: PluginOptions): Plugin[] { augmentProgramWithVersioning, augmentHostWithCaching, } = require('@ngtools/webpack/src/ivy/host'); + const ts = require('typescript'); - let compilerCli: typeof import('@angular/compiler-cli'); + // let compilerCli: typeof import('@angular/compiler-cli'); let userConfig: UserConfig; let rootNames: string[]; let host: ts.CompilerHost; @@ -143,17 +152,13 @@ export function angular(options?: PluginOptions): Plugin[] { pluginOptions.tsconfig = options?.tsconfig ?? - path.resolve( + resolve( config.root || '.', process.env['NODE_ENV'] === 'test' ? './tsconfig.spec.json' : './tsconfig.app.json' ); - compilerCli = await loadEsmModule< - typeof import('@angular/compiler-cli') - >('@angular/compiler-cli'); - return { optimizeDeps: { include: ['rxjs/operators', 'rxjs'], @@ -451,11 +456,9 @@ export function angular(options?: PluginOptions): Plugin[] { const fg = require('fast-glob'); const appRoot = normalizePath( - path.resolve(pluginOptions.workspaceRoot, config.root || '.') - ); - const workspaceRoot = normalizePath( - path.resolve(pluginOptions.workspaceRoot) + resolve(pluginOptions.workspaceRoot, config.root || '.') ); + const workspaceRoot = normalizePath(resolve(pluginOptions.workspaceRoot)); const globs = [ `${appRoot}/**/*.{analog,agx}`, diff --git a/packages/vite-plugin-angular/src/lib/authoring/analog.ts b/packages/vite-plugin-angular/src/lib/authoring/analog.ts index 74281ae95..3a8256481 100644 --- a/packages/vite-plugin-angular/src/lib/authoring/analog.ts +++ b/packages/vite-plugin-angular/src/lib/authoring/analog.ts @@ -29,7 +29,11 @@ import { SIGNALS_MAP, STYLE_TAG_REGEX, TEMPLATE_TAG_REGEX, -} from './constants'; +} from './constants.js'; + +import { createRequire } from 'node:module'; + +const require = createRequire(import.meta.url); export function compileAnalogFile( filePath: string, diff --git a/packages/vite-plugin-angular/src/lib/authoring/markdown-transform.ts b/packages/vite-plugin-angular/src/lib/authoring/markdown-transform.ts index 4eb61f19a..ade35a322 100644 --- a/packages/vite-plugin-angular/src/lib/authoring/markdown-transform.ts +++ b/packages/vite-plugin-angular/src/lib/authoring/markdown-transform.ts @@ -5,7 +5,7 @@ export type MarkdownTemplateTransform = ( export const defaultMarkdownTemplateTransform: MarkdownTemplateTransform = async (content: string) => { - const { MarkedSetupService } = await import('./marked-setup.service'); + const { MarkedSetupService } = await import('./marked-setup.service.js'); // read template sections, parse markdown const markedSetupService = new MarkedSetupService(); diff --git a/packages/vite-plugin-angular/src/lib/authoring/marked-setup.service.ts b/packages/vite-plugin-angular/src/lib/authoring/marked-setup.service.ts index 8ed94f539..e4330f4b3 100644 --- a/packages/vite-plugin-angular/src/lib/authoring/marked-setup.service.ts +++ b/packages/vite-plugin-angular/src/lib/authoring/marked-setup.service.ts @@ -7,14 +7,14 @@ import { gfmHeadingId } from 'marked-gfm-heading-id'; import { markedHighlight } from 'marked-highlight'; import 'prismjs'; -import 'prismjs/components/prism-bash'; -import 'prismjs/components/prism-css'; -import 'prismjs/components/prism-javascript'; -import 'prismjs/components/prism-json'; -import 'prismjs/components/prism-markup'; -import 'prismjs/components/prism-typescript'; -import 'prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard'; -import 'prismjs/plugins/toolbar/prism-toolbar'; +import 'prismjs/components/prism-bash.js'; +import 'prismjs/components/prism-css.js'; +import 'prismjs/components/prism-javascript.js'; +import 'prismjs/components/prism-json.js'; +import 'prismjs/components/prism-markup.js'; +import 'prismjs/components/prism-typescript.js'; +import 'prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard.js'; +import 'prismjs/plugins/toolbar/prism-toolbar.js'; // import './prism/angular'; declare const Prism: typeof import('prismjs'); diff --git a/packages/vite-plugin-angular/src/lib/compiler-plugin.ts b/packages/vite-plugin-angular/src/lib/compiler-plugin.ts index 3e7c696a3..0c451f8f6 100644 --- a/packages/vite-plugin-angular/src/lib/compiler-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/compiler-plugin.ts @@ -8,7 +8,10 @@ import type { DepOptimizationConfig } from 'vite'; -import { CompilerPluginOptions, JavaScriptTransformer } from './utils/devkit'; +import { + CompilerPluginOptions, + JavaScriptTransformer, +} from './utils/devkit.js'; type EsbuildOptions = NonNullable; type EsbuildPlugin = NonNullable[number]; diff --git a/packages/vite-plugin-angular/src/lib/component-resolvers.spec.ts b/packages/vite-plugin-angular/src/lib/component-resolvers.spec.ts index aaf26dc58..4344bb451 100644 --- a/packages/vite-plugin-angular/src/lib/component-resolvers.spec.ts +++ b/packages/vite-plugin-angular/src/lib/component-resolvers.spec.ts @@ -2,7 +2,7 @@ import { describe, it, expect } from 'vitest'; import { StyleUrlsResolver, TemplateUrlsResolver } from './component-resolvers'; import { normalizePath } from 'vite'; -import { relative } from 'path'; +import { relative } from 'node:path'; // array version of normalizePath const normalizePaths = (paths: string[]) => diff --git a/packages/vite-plugin-angular/src/lib/component-resolvers.ts b/packages/vite-plugin-angular/src/lib/component-resolvers.ts index 77771735f..3b38a23c7 100644 --- a/packages/vite-plugin-angular/src/lib/component-resolvers.ts +++ b/packages/vite-plugin-angular/src/lib/component-resolvers.ts @@ -1,4 +1,4 @@ -import { dirname, resolve } from 'path'; +import { dirname, resolve } from 'node:path'; import { ArrayLiteralExpression, Project, diff --git a/packages/vite-plugin-angular/src/lib/host.ts b/packages/vite-plugin-angular/src/lib/host.ts index f9bbaf59e..05062018e 100644 --- a/packages/vite-plugin-angular/src/lib/host.ts +++ b/packages/vite-plugin-angular/src/lib/host.ts @@ -1,10 +1,14 @@ import { CompilerHost } from '@angular/compiler-cli'; -import { normalizePath } from '@ngtools/webpack/src/ivy/paths'; +import { normalizePath } from '@ngtools/webpack/src/ivy/paths.js'; import { readFileSync } from 'node:fs'; import * as ts from 'typescript'; -import { compileAnalogFile } from './authoring/analog'; -import { TEMPLATE_TAG_REGEX } from './authoring/constants'; -import { MarkdownTemplateTransform } from './authoring/markdown-transform'; +import { compileAnalogFile } from './authoring/analog.js'; +import { TEMPLATE_TAG_REGEX } from './authoring/constants.js'; +import { MarkdownTemplateTransform } from './authoring/markdown-transform.js'; + +import { createRequire } from 'node:module'; + +const require = createRequire(import.meta.url); export function augmentHostWithResources( host: ts.CompilerHost, @@ -25,6 +29,7 @@ export function augmentHostWithResources( markdownTemplateTransforms?: MarkdownTemplateTransform[]; } = {} ) { + const ts = require('typescript'); const resourceHost = host as CompilerHost; const baseGetSourceFile = ( resourceHost as ts.CompilerHost diff --git a/packages/vite-plugin-angular/src/lib/utils/devkit.ts b/packages/vite-plugin-angular/src/lib/utils/devkit.ts index a2c2b5191..3f3904679 100644 --- a/packages/vite-plugin-angular/src/lib/utils/devkit.ts +++ b/packages/vite-plugin-angular/src/lib/utils/devkit.ts @@ -1,6 +1,7 @@ -import * as wbl from '@angular-devkit/build-angular/src/tools/babel/webpack-loader'; -import * as app from '@angular-devkit/build-angular/src/tools/babel/presets/application'; -import * as cp from '@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin'; +import * as wbl from '@angular-devkit/build-angular/src/tools/babel/webpack-loader.js'; +import * as app from '@angular-devkit/build-angular/src/tools/babel/presets/application.js'; +import * as cp from '@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin.js'; +import * as sfc from './source-file-cache.js'; let requiresLinking: Function; /** @@ -19,20 +20,16 @@ let sourceFileCache: any; if (typeof (cp as any)['SourceFileCache'] !== 'undefined') { sourceFileCache = (cp as any).SourceFileCache; } else { - const sfc = require('@angular-devkit/build-angular/src/tools/esbuild/angular/source-file-cache'); sourceFileCache = sfc.SourceFileCache; } const angularApplicationPreset = app.default; -import { createJitResourceTransformer } from '@angular-devkit/build-angular/src/tools/esbuild/angular/jit-resource-transformer'; -import { CompilerPluginOptions } from '@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin'; -import { JavaScriptTransformer } from '@angular-devkit/build-angular/src/tools/esbuild/javascript-transformer'; - -import { loadEsmModule } from '@angular-devkit/build-angular/src/utils/load-esm'; +import { createJitResourceTransformer } from '@angular-devkit/build-angular/src/tools/esbuild/angular/jit-resource-transformer.js'; +import { CompilerPluginOptions } from '@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin.js'; +import { JavaScriptTransformer } from '@angular-devkit/build-angular/src/tools/esbuild/javascript-transformer.js'; export { requiresLinking, - loadEsmModule, angularApplicationPreset, createJitResourceTransformer, CompilerPluginOptions, diff --git a/packages/vite-plugin-angular/src/lib/utils/source-file-cache.ts b/packages/vite-plugin-angular/src/lib/utils/source-file-cache.ts new file mode 100644 index 000000000..3285029ee --- /dev/null +++ b/packages/vite-plugin-angular/src/lib/utils/source-file-cache.ts @@ -0,0 +1,45 @@ +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { platform } from 'node:os'; +import * as path from 'node:path'; +import { pathToFileURL } from 'node:url'; +import type ts from 'typescript'; + +const USING_WINDOWS = platform() === 'win32'; +const WINDOWS_SEP_REGEXP = new RegExp(`\\${path.win32.sep}`, 'g'); + +export class SourceFileCache extends Map { + readonly modifiedFiles = new Set(); + readonly babelFileCache = new Map(); + readonly typeScriptFileCache = new Map(); + + referencedFiles?: readonly string[]; + + constructor(readonly persistentCachePath?: string) { + super(); + } + + invalidate(files: Iterable): void { + if (files !== this.modifiedFiles) { + this.modifiedFiles.clear(); + } + for (let file of files) { + this.babelFileCache.delete(file); + this.typeScriptFileCache.delete(pathToFileURL(file).href); + + // Normalize separators to allow matching TypeScript Host paths + if (USING_WINDOWS) { + file = file.replace(WINDOWS_SEP_REGEXP, path.posix.sep); + } + + this.delete(file); + this.modifiedFiles.add(file); + } + } +} diff --git a/packages/vite-plugin-angular/tsconfig.json b/packages/vite-plugin-angular/tsconfig.json index f5b85657a..a93d2cdb6 100644 --- a/packages/vite-plugin-angular/tsconfig.json +++ b/packages/vite-plugin-angular/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "module": "commonjs", + "module": "es2020", "forceConsistentCasingInFileNames": true, "strict": true, "noImplicitOverride": true, diff --git a/packages/vite-plugin-angular/tsconfig.lib.json b/packages/vite-plugin-angular/tsconfig.lib.json index 29d778dc7..146680af8 100644 --- a/packages/vite-plugin-angular/tsconfig.lib.json +++ b/packages/vite-plugin-angular/tsconfig.lib.json @@ -1,11 +1,17 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "module": "commonjs", + "module": "es2020", "outDir": "../../dist/out-tsc", "declaration": true, - "types": [] + "types": [], + "allowSyntheticDefaultImports": true }, "include": ["**/*.ts"], - "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"] + "exclude": [ + "jest.config.ts", + "**/*.spec.ts", + "**/*.test.ts", + "src/test-setup.ts" + ] } diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index 1030fa870..0914e0830 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,8 +1,8 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "0.2.45", - "type": "commonjs", + "version": "1.0.0", "description": "A Vite plugin for adding a nitro API server", + "type": "module", "author": "Brandon Roberts ", "exports": { ".": "./src/index.js", diff --git a/packages/vite-plugin-nitro/project.json b/packages/vite-plugin-nitro/project.json index d617393e2..d8d44a766 100644 --- a/packages/vite-plugin-nitro/project.json +++ b/packages/vite-plugin-nitro/project.json @@ -13,7 +13,7 @@ "tsConfig": "packages/vite-plugin-nitro/tsconfig.lib.json", "assets": [ "packages/vite-plugin-nitro/*.md", - "packages/vite-plugin-nitro/src/lib/runtime/*.js", + "packages/vite-plugin-nitro/src/lib/runtime/*.ts", "packages/vite-plugin-nitro/migrations/migration.json" ], "updateBuildableProjectDepsInPackageJson": false diff --git a/packages/vite-plugin-nitro/src/index.ts b/packages/vite-plugin-nitro/src/index.ts index 792ded404..8fe9c2fe7 100644 --- a/packages/vite-plugin-nitro/src/index.ts +++ b/packages/vite-plugin-nitro/src/index.ts @@ -1,4 +1,4 @@ -import { nitro } from './lib/vite-plugin-nitro'; -export { Options, SitemapConfig } from './lib/options'; +import { nitro } from './lib/vite-plugin-nitro.js'; +export { Options, SitemapConfig } from './lib/options.js'; export default nitro; diff --git a/packages/vite-plugin-nitro/src/lib/build-server.ts b/packages/vite-plugin-nitro/src/lib/build-server.ts index 12e1522ee..632d9d69c 100644 --- a/packages/vite-plugin-nitro/src/lib/build-server.ts +++ b/packages/vite-plugin-nitro/src/lib/build-server.ts @@ -1,17 +1,14 @@ -import { NitroConfig } from 'nitropack'; -import * as fs from 'fs'; +import { NitroConfig, copyPublicAssets, prerender } from 'nitropack'; +import { createNitro, build, prepare } from 'nitropack'; +import { existsSync, unlinkSync } from 'node:fs'; -import { Options } from './options'; -import { addPostRenderingHooks } from './hooks/post-rendering-hook'; -import { loadEsmModule } from './utils/load-esm'; +import { Options } from './options.js'; +import { addPostRenderingHooks } from './hooks/post-rendering-hook.js'; export async function buildServer( options?: Options, nitroConfig?: NitroConfig ) { - const { createNitro, build, prepare, copyPublicAssets, prerender } = - await loadEsmModule('nitropack'); - const nitro = await createNitro({ dev: false, preset: process.env['BUILD_PRESET'], @@ -30,8 +27,8 @@ export async function buildServer( nitroConfig?.prerender?.routes.find((route) => route === '/') ) { // Remove the root index.html so it can be replaced with the prerendered version - if (fs.existsSync(`${nitroConfig?.output?.publicDir}/index.html`)) { - fs.unlinkSync(`${nitroConfig?.output?.publicDir}/index.html`); + if (existsSync(`${nitroConfig?.output?.publicDir}/index.html`)) { + unlinkSync(`${nitroConfig?.output?.publicDir}/index.html`); } } diff --git a/packages/vite-plugin-nitro/src/lib/build-sitemap.spec.ts b/packages/vite-plugin-nitro/src/lib/build-sitemap.spec.ts index 9e8f8e855..2beac4478 100644 --- a/packages/vite-plugin-nitro/src/lib/build-sitemap.spec.ts +++ b/packages/vite-plugin-nitro/src/lib/build-sitemap.spec.ts @@ -1,5 +1,5 @@ import { buildSitemap } from './build-sitemap'; -import * as fs from 'fs'; +import * as fs from 'node:fs'; describe('build sitemap', () => { const config = { root: 'root' }; diff --git a/packages/vite-plugin-nitro/src/lib/build-sitemap.ts b/packages/vite-plugin-nitro/src/lib/build-sitemap.ts index ad059c7fa..ed9a43768 100644 --- a/packages/vite-plugin-nitro/src/lib/build-sitemap.ts +++ b/packages/vite-plugin-nitro/src/lib/build-sitemap.ts @@ -1,8 +1,8 @@ -import * as fs from 'fs'; +import { writeFileSync } from 'node:fs'; import { XMLBuilder } from 'xmlbuilder2/lib/interfaces'; import { create } from 'xmlbuilder2'; import { UserConfig } from 'vite'; -import * as path from 'path'; +import { resolve } from 'node:path'; import { SitemapConfig } from './options'; export type PagesJson = { @@ -33,10 +33,10 @@ export async function buildSitemap( page.ele('lastmod').txt(item.lastMod); } - const mapPath = `${path.resolve(outputDir)}/sitemap.xml`; + const mapPath = `${resolve(outputDir)}/sitemap.xml`; try { console.log(`Writing sitemap at ${mapPath}`); - fs.writeFileSync(mapPath, sitemap.end({ prettyPrint: true })); + writeFileSync(mapPath, sitemap.end({ prettyPrint: true })); } catch (e) { console.error(`Unable to write file at ${mapPath}`, e); } diff --git a/packages/vite-plugin-nitro/src/lib/build-ssr.ts b/packages/vite-plugin-nitro/src/lib/build-ssr.ts index 99795bb89..aa6f9ac3f 100644 --- a/packages/vite-plugin-nitro/src/lib/build-ssr.ts +++ b/packages/vite-plugin-nitro/src/lib/build-ssr.ts @@ -1,18 +1,18 @@ import { build, mergeConfig, UserConfig } from 'vite'; -import * as path from 'path'; +import { relative, resolve } from 'node:path'; -import { Options } from './options'; +import { Options } from './options.js'; export async function buildSSRApp(config: UserConfig, options?: Options) { - const rootDir = path.relative(process.cwd(), config.root || '.') || '.'; + const workspaceRoot = options?.workspaceRoot ?? process.cwd(); + const rootDir = relative(workspaceRoot, config.root || '.') || '.'; const ssrBuildConfig = mergeConfig(config, { build: { ssr: true, rollupOptions: { - input: - options?.entryServer || path.resolve(rootDir, './src/main.server.ts'), + input: options?.entryServer || resolve(rootDir, './src/main.server.ts'), }, - outDir: options?.ssrBuildDir || path.resolve('dist', rootDir, 'ssr'), + outDir: options?.ssrBuildDir || resolve('dist', rootDir, 'ssr'), }, }); diff --git a/packages/vite-plugin-nitro/src/lib/plugins/dev-server-plugin.ts b/packages/vite-plugin-nitro/src/lib/plugins/dev-server-plugin.ts index b6d316276..d39f03b7c 100644 --- a/packages/vite-plugin-nitro/src/lib/plugins/dev-server-plugin.ts +++ b/packages/vite-plugin-nitro/src/lib/plugins/dev-server-plugin.ts @@ -2,8 +2,8 @@ // https://github.com/solidjs/solid-start/blob/main/packages/start/dev/server.js import { Connect, Plugin, ViteDevServer } from 'vite'; -import * as path from 'path'; -import * as fs from 'fs'; +import { resolve } from 'node:path'; +import { readFileSync } from 'node:fs'; interface ServerOptions { index?: string; @@ -29,8 +29,8 @@ export function devServerPlugin(options: ServerOptions): Plugin { return async () => { remove_html_middlewares(viteServer.middlewares); viteServer.middlewares.use(async (req, res) => { - let template = fs.readFileSync( - path.resolve(viteServer.config.root, index), + let template = readFileSync( + resolve(viteServer.config.root, index), 'utf-8' ); diff --git a/packages/vite-plugin-nitro/src/lib/runtime/api-middleware.js b/packages/vite-plugin-nitro/src/lib/runtime/api-middleware.ts similarity index 96% rename from packages/vite-plugin-nitro/src/lib/runtime/api-middleware.js rename to packages/vite-plugin-nitro/src/lib/runtime/api-middleware.ts index 84e440e34..cd7363ecc 100644 --- a/packages/vite-plugin-nitro/src/lib/runtime/api-middleware.js +++ b/packages/vite-plugin-nitro/src/lib/runtime/api-middleware.ts @@ -9,6 +9,7 @@ import { eventHandler, proxyRequest } from 'h3'; export default eventHandler(async (event) => { + // @ts-ignore const apiPrefix = `/${import.meta.env.RUNTIME_CONFIG?.apiPrefix ?? 'api'}`; if (event.node.req.url?.startsWith(apiPrefix)) { const reqUrl = event.node.req.url?.replace(apiPrefix, ''); @@ -23,6 +24,7 @@ export default eventHandler(async (event) => { } return proxyRequest(event, reqUrl, { + // @ts-ignore fetch: $fetch.native, }); } diff --git a/packages/vite-plugin-nitro/src/lib/runtime/renderer.ts b/packages/vite-plugin-nitro/src/lib/runtime/renderer.ts new file mode 100644 index 000000000..a096d8f62 --- /dev/null +++ b/packages/vite-plugin-nitro/src/lib/runtime/renderer.ts @@ -0,0 +1,31 @@ +/** + * This file is written in JavaScript + * because it is used by Nitro to build + * the renderer for SSR. + * + * The package is shipped as commonjs + * which won't be parsed by Nitro correctly. + */ +import { eventHandler } from 'h3'; +/** + * This file is written in JavaScript + * because it is used by Nitro to build + * the renderer for SSR. + * + * The package is shipped as commonjs + * which won't be parsed by Nitro correctly. + */ +// @ts-ignore +// import { eventHandler } from 'h3'; + +// Nitro aliases for the SSR renderer and client index.html template +// @ts-ignore +import render from '#analog/ssr'; +// @ts-ignore +import template from '#analog/index'; + +export default eventHandler(async (event) => { + const html = await render(event.req.url, template); + + return html; +}); diff --git a/packages/vite-plugin-nitro/src/lib/utils/get-content-files.ts b/packages/vite-plugin-nitro/src/lib/utils/get-content-files.ts index 6709aca1c..483a21798 100644 --- a/packages/vite-plugin-nitro/src/lib/utils/get-content-files.ts +++ b/packages/vite-plugin-nitro/src/lib/utils/get-content-files.ts @@ -1,9 +1,12 @@ -import * as fs from 'fs'; -import * as path from 'path'; +import { readFileSync } from 'node:fs'; +import { join, relative, resolve } from 'node:path'; import { normalizePath } from 'vite'; +import { createRequire } from 'node:module'; import { PrerenderContentFile } from '../options'; +const require = createRequire(import.meta.url); + export function getMatchingContentFilesWithFrontMatter( workspaceRoot: string, rootDir: string, @@ -13,15 +16,15 @@ export function getMatchingContentFilesWithFrontMatter( const fg = require('fast-glob'); // eslint-disable-next-line @typescript-eslint/no-var-requires const fm = require('front-matter'); - const root = normalizePath(path.resolve(workspaceRoot, rootDir)); + const root = normalizePath(resolve(workspaceRoot, rootDir)); - const resolvedDir = normalizePath(path.relative(root, path.join(root, glob))); + const resolvedDir = normalizePath(relative(root, join(root, glob))); const contentFiles: string[] = fg.sync([`${root}/${resolvedDir}/*`], { dot: true, }); const mappedFilesWithFm: PrerenderContentFile[] = contentFiles.map((f) => { - const fileContents = fs.readFileSync(f, 'utf8'); + const fileContents = readFileSync(f, 'utf8'); const raw = fm(fileContents); const filepath = f.replace(root, ''); diff --git a/packages/vite-plugin-nitro/src/lib/utils/get-page-handlers.ts b/packages/vite-plugin-nitro/src/lib/utils/get-page-handlers.ts index 00c25cc95..70795f8f5 100644 --- a/packages/vite-plugin-nitro/src/lib/utils/get-page-handlers.ts +++ b/packages/vite-plugin-nitro/src/lib/utils/get-page-handlers.ts @@ -1,4 +1,5 @@ -import * as path from 'path'; +import { resolve } from 'node:path'; +import fg from 'fast-glob'; import { NitroEventHandler } from 'nitropack'; import { normalizePath } from 'vite'; @@ -9,8 +10,7 @@ type GetHandlersArgs = { }; export function getPageHandlers({ workspaceRoot, rootDir }: GetHandlersArgs) { - const fg = require('fast-glob'); - const root = normalizePath(path.resolve(workspaceRoot, rootDir)); + const root = normalizePath(resolve(workspaceRoot, rootDir)); const endpointFiles: string[] = fg.sync( [`${root}/src/app/pages/**/*.server.ts`], @@ -19,10 +19,7 @@ export function getPageHandlers({ workspaceRoot, rootDir }: GetHandlersArgs) { const handlers: NitroEventHandler[] = endpointFiles.map((endpointFile) => { const route = endpointFile - .replace( - normalizePath(path.resolve(workspaceRoot, rootDir, 'src/app')), - '' - ) + .replace(normalizePath(resolve(workspaceRoot, rootDir, 'src/app')), '') .replace(/\.server\.ts$/, '') .replace(/\[\.{3}(.+)\]/g, '**:$1') .replace(/\[\.{3}(\w+)\]/g, '**:$1') diff --git a/packages/vite-plugin-nitro/src/lib/utils/load-esm.ts b/packages/vite-plugin-nitro/src/lib/utils/load-esm.ts index 32082f269..6e107588b 100644 --- a/packages/vite-plugin-nitro/src/lib/utils/load-esm.ts +++ b/packages/vite-plugin-nitro/src/lib/utils/load-esm.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import { URL } from 'url'; +import { URL } from 'node:url'; /** * This uses a dynamic import to load a module which may be ESM. diff --git a/packages/vite-plugin-nitro/src/lib/vite-nitro-plugin.spec.data.ts b/packages/vite-plugin-nitro/src/lib/vite-nitro-plugin.spec.data.ts index 798ca9553..e6703e97e 100644 --- a/packages/vite-plugin-nitro/src/lib/vite-nitro-plugin.spec.data.ts +++ b/packages/vite-plugin-nitro/src/lib/vite-nitro-plugin.spec.data.ts @@ -1,7 +1,7 @@ import { NitroConfig } from 'nitropack'; import { ConfigEnv, UserConfig, Plugin } from 'vite'; import { Mock, vi } from 'vitest'; -import * as path from 'path'; +import { resolve } from 'node:path'; export const mockViteDevServer = { middlewares: { @@ -11,12 +11,12 @@ export const mockViteDevServer = { }; export const mockNitroConfig: NitroConfig = { - buildDir: path.resolve('./dist/.nitro'), + buildDir: resolve('./dist/.nitro'), handlers: [], logLevel: 0, output: { - dir: path.resolve('dist/analog'), - publicDir: path.resolve('dist/analog/public'), + dir: resolve('dist/analog'), + publicDir: resolve('dist/analog/public'), }, rootDir: '.', runtimeConfig: {}, diff --git a/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.spec.ts b/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.spec.ts index cb666a29f..91b6ad833 100644 --- a/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.spec.ts +++ b/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.spec.ts @@ -293,8 +293,9 @@ describe('nitro', () => { { workspaceRoot: '/custom-root-directory' }, expect.objectContaining({ output: { - dir: '/custom-root-directory/dist/analog', - publicDir: '/custom-root-directory/dist/analog/public', + dir: '/custom-root-directory/some-other-root-directory/analog', + publicDir: + '/custom-root-directory/some-other-root-directory/analog/public', }, }) ); diff --git a/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts b/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts index fdfae266e..011ba742f 100644 --- a/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts +++ b/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts @@ -1,24 +1,28 @@ -import type { NitroConfig } from 'nitropack'; +import { NitroConfig, build, createDevServer, createNitro } from 'nitropack'; import { App, toNodeListener } from 'h3'; -import type { Plugin, UserConfig } from 'vite'; -import { normalizePath, ViteDevServer } from 'vite'; -import * as path from 'path'; +import type { Plugin, UserConfig, ViteDevServer } from 'vite'; +import { normalizePath } from 'vite'; +import { dirname, relative, resolve } from 'node:path'; import { platform } from 'node:os'; -import { buildServer } from './build-server'; -import { buildSSRApp } from './build-ssr'; - -import { PrerenderContentFile, Options, PrerenderContentDir } from './options'; -import { pageEndpointsPlugin } from './plugins/page-endpoints'; -import { getPageHandlers } from './utils/get-page-handlers'; -import { buildSitemap } from './build-sitemap'; -import { devServerPlugin } from './plugins/dev-server-plugin'; -import { loadEsmModule } from './utils/load-esm'; -import { getMatchingContentFilesWithFrontMatter } from './utils/get-content-files'; +import { buildServer } from './build-server.js'; +import { buildSSRApp } from './build-ssr.js'; +import { + Options, + PrerenderContentDir, + PrerenderContentFile, +} from './options.js'; +import { pageEndpointsPlugin } from './plugins/page-endpoints.js'; +import { getPageHandlers } from './utils/get-page-handlers.js'; +import { buildSitemap } from './build-sitemap.js'; +import { devServerPlugin } from './plugins/dev-server-plugin.js'; +import { getMatchingContentFilesWithFrontMatter } from './utils/get-content-files.js'; const isWindows = platform() === 'win32'; let clientOutputPath = ''; +const __dirname = dirname(new URL(import.meta.url).pathname); + export function nitro(options?: Options, nitroOptions?: NitroConfig): Plugin[] { const workspaceRoot = options?.workspaceRoot ?? process.cwd(); const isTest = process.env['NODE_ENV'] === 'test' || !!process.env['VITEST']; @@ -44,7 +48,7 @@ export function nitro(options?: Options, nitroOptions?: NitroConfig): Plugin[] { isBuild = command === 'build'; ssrBuild = _config.build?.ssr === true; config = _config; - const rootDir = path.relative(process.cwd(), config.root || '.') || '.'; + const rootDir = relative(workspaceRoot, config.root || '.') || '.'; const buildPreset = process.env['BUILD_PRESET'] ?? (nitroOptions?.preset as string | undefined); @@ -59,15 +63,15 @@ export function nitro(options?: Options, nitroOptions?: NitroConfig): Plugin[] { scanDirs: [normalizePath(`${rootDir}/src/server`)], output: { dir: normalizePath( - path.resolve(workspaceRoot, 'dist', rootDir, 'analog') + resolve(workspaceRoot, 'dist', rootDir, 'analog') ), publicDir: normalizePath( - path.resolve(workspaceRoot, 'dist', rootDir, 'analog/public') + resolve(workspaceRoot, 'dist', rootDir, 'analog/public') ), ...nitroOptions?.output, }, buildDir: normalizePath( - path.resolve(workspaceRoot, 'dist', rootDir, '.nitro') + resolve(workspaceRoot, 'dist', rootDir, '.nitro') ), typescript: { generateTsConfig: false, @@ -99,7 +103,7 @@ export function nitro(options?: Options, nitroOptions?: NitroConfig): Plugin[] { if (!ssrBuild && !isTest) { // store the client output path for the SSR build config - clientOutputPath = path.resolve( + clientOutputPath = resolve( rootDir, config.build?.outDir || 'dist/client' ); @@ -110,10 +114,10 @@ export function nitro(options?: Options, nitroOptions?: NitroConfig): Plugin[] { '#analog/ssr': (isWindows ? 'file://' : '') + normalizePath( - path.resolve(workspaceRoot, 'dist', rootDir, 'ssr/main.server') + resolve(workspaceRoot, 'dist', rootDir, 'ssr/main.server') ), '#analog/index': normalizePath( - path.resolve(clientOutputPath, 'index.html') + resolve(clientOutputPath, 'index.html') ), ...nitroOptions?.alias, }; @@ -202,6 +206,7 @@ export function nitro(options?: Options, nitroOptions?: NitroConfig): Plugin[] { }; } } + nitroConfig = { ...nitroConfig, ...nitroOptions, @@ -209,10 +214,6 @@ export function nitro(options?: Options, nitroOptions?: NitroConfig): Plugin[] { }, async configureServer(viteServer: ViteDevServer) { if (isServe && !isTest) { - const { createNitro, createDevServer, build } = await loadEsmModule< - typeof import('nitropack') - >('nitropack'); - const nitro = await createNitro({ dev: true, ...nitroConfig, @@ -295,9 +296,9 @@ const withVercelOutputAPI = ( ...nitroConfig, output: { ...nitroConfig?.output, - dir: normalizePath(path.resolve(workspaceRoot, '.vercel', 'output')), + dir: normalizePath(resolve(workspaceRoot, '.vercel', 'output')), publicDir: normalizePath( - path.resolve(workspaceRoot, '.vercel', 'output/static') + resolve(workspaceRoot, '.vercel', 'output/static') ), }, }); diff --git a/packages/vite-plugin-nitro/tsconfig.json b/packages/vite-plugin-nitro/tsconfig.json index f5b85657a..a93d2cdb6 100644 --- a/packages/vite-plugin-nitro/tsconfig.json +++ b/packages/vite-plugin-nitro/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "module": "commonjs", + "module": "es2020", "forceConsistentCasingInFileNames": true, "strict": true, "noImplicitOverride": true, diff --git a/packages/vite-plugin-nitro/tsconfig.lib.json b/packages/vite-plugin-nitro/tsconfig.lib.json index 2b2673088..af250001d 100644 --- a/packages/vite-plugin-nitro/tsconfig.lib.json +++ b/packages/vite-plugin-nitro/tsconfig.lib.json @@ -1,11 +1,16 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "module": "commonjs", + "esModuleInterop": true, "outDir": "../../dist/out-tsc", "declaration": true, "types": [] }, "include": ["src/**/*.ts"], - "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] + "exclude": [ + "jest.config.ts", + "src/**/*.spec.ts", + "src/**/*.test.ts", + "src/lib/runtime/*.ts" + ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 678797cb6..fc3c8d186 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -67,7 +67,7 @@ importers: version: 10.25.0 ajv-formats: specifier: ^2.1.1 - version: 2.1.1(ajv@8.12.0) + version: 2.1.1(ajv@6.12.6) destr: specifier: ^2.0.1 version: 2.0.1 @@ -333,6 +333,9 @@ importers: rollup-plugin-visualizer: specifier: ^5.9.0 version: 5.9.0 + semantic-release: + specifier: ^22.0.7 + version: 22.0.12(typescript@5.3.3) start-server-and-test: specifier: ^1.15.4 version: 1.15.5 @@ -370,6 +373,14 @@ importers: specifier: ^3.0.2 version: 3.0.2 + apps/analog-app-e2e-cypress: {} + + apps/analog-app-e2e-playwright: {} + + apps/astro-app-e2e-playwright: {} + + apps/blog-app-e2e-cypress: {} + apps/docs-app: dependencies: '@docusaurus/core': @@ -3697,7 +3708,7 @@ packages: resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.5 '@babel/parser': 7.23.0 '@babel/types': 7.23.0 @@ -7662,6 +7673,103 @@ packages: - '@swc/core' - debug + /@octokit/auth-token@4.0.0: + resolution: {integrity: sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==} + engines: {node: '>= 18'} + dev: true + + /@octokit/core@5.1.0: + resolution: {integrity: sha512-BDa2VAMLSh3otEiaMJ/3Y36GU4qf6GI+VivQ/P41NC6GHcdxpKlqV0ikSZ5gdQsmS3ojXeRx5vasgNTinF0Q4g==} + engines: {node: '>= 18'} + dependencies: + '@octokit/auth-token': 4.0.0 + '@octokit/graphql': 7.0.2 + '@octokit/request': 8.1.6 + '@octokit/request-error': 5.0.1 + '@octokit/types': 12.4.0 + before-after-hook: 2.2.3 + universal-user-agent: 6.0.1 + dev: true + + /@octokit/endpoint@9.0.4: + resolution: {integrity: sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==} + engines: {node: '>= 18'} + dependencies: + '@octokit/types': 12.4.0 + universal-user-agent: 6.0.1 + dev: true + + /@octokit/graphql@7.0.2: + resolution: {integrity: sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==} + engines: {node: '>= 18'} + dependencies: + '@octokit/request': 8.1.6 + '@octokit/types': 12.4.0 + universal-user-agent: 6.0.1 + dev: true + + /@octokit/openapi-types@19.1.0: + resolution: {integrity: sha512-6G+ywGClliGQwRsjvqVYpklIfa7oRPA0vyhPQG/1Feh+B+wU0vGH1JiJ5T25d3g1JZYBHzR2qefLi9x8Gt+cpw==} + dev: true + + /@octokit/plugin-paginate-rest@9.1.5(@octokit/core@5.1.0): + resolution: {integrity: sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '>=5' + dependencies: + '@octokit/core': 5.1.0 + '@octokit/types': 12.4.0 + dev: true + + /@octokit/plugin-retry@6.0.1(@octokit/core@5.1.0): + resolution: {integrity: sha512-SKs+Tz9oj0g4p28qkZwl/topGcb0k0qPNX/i7vBKmDsjoeqnVfFUquqrE/O9oJY7+oLzdCtkiWSXLpLjvl6uog==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '>=5' + dependencies: + '@octokit/core': 5.1.0 + '@octokit/request-error': 5.0.1 + '@octokit/types': 12.4.0 + bottleneck: 2.19.5 + dev: true + + /@octokit/plugin-throttling@8.1.3(@octokit/core@5.1.0): + resolution: {integrity: sha512-pfyqaqpc0EXh5Cn4HX9lWYsZ4gGbjnSmUILeu4u2gnuM50K/wIk9s1Pxt3lVeVwekmITgN/nJdoh43Ka+vye8A==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': ^5.0.0 + dependencies: + '@octokit/core': 5.1.0 + '@octokit/types': 12.4.0 + bottleneck: 2.19.5 + dev: true + + /@octokit/request-error@5.0.1: + resolution: {integrity: sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==} + engines: {node: '>= 18'} + dependencies: + '@octokit/types': 12.4.0 + deprecation: 2.3.1 + once: 1.4.0 + dev: true + + /@octokit/request@8.1.6: + resolution: {integrity: sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==} + engines: {node: '>= 18'} + dependencies: + '@octokit/endpoint': 9.0.4 + '@octokit/request-error': 5.0.1 + '@octokit/types': 12.4.0 + universal-user-agent: 6.0.1 + dev: true + + /@octokit/types@12.4.0: + resolution: {integrity: sha512-FLWs/AvZllw/AGVs+nJ+ELCDZZJk+kY0zMen118xhL2zD0s1etIUHm1odgjP7epxYU1ln7SZxEUWYop5bhsdgQ==} + dependencies: + '@octokit/openapi-types': 19.1.0 + dev: true + /@oozcitak/dom@1.15.10: resolution: {integrity: sha512-0JT29/LaxVgRcGKvHmSrUTEvZ8BXvZhGl2LASRUgHqDTC1M5g1pLmVv56IYNyt3bG2CUjDkc67wnyZC14pbQrQ==} engines: {node: '>=8.0'} @@ -7850,14 +7958,12 @@ packages: /@pnpm/config.env-replace@1.1.0: resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} engines: {node: '>=12.22.0'} - dev: false /@pnpm/network.ca-file@1.0.2: resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} engines: {node: '>=12.22.0'} dependencies: graceful-fs: 4.2.10 - dev: false /@pnpm/npm-conf@2.2.2: resolution: {integrity: sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==} @@ -7866,7 +7972,6 @@ packages: '@pnpm/config.env-replace': 1.1.0 '@pnpm/network.ca-file': 1.0.2 config-chain: 1.1.13 - dev: false /@polka/url@1.0.0-next.21: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} @@ -8171,6 +8276,99 @@ packages: transitivePeerDependencies: - chokidar + /@semantic-release/commit-analyzer@11.1.0(semantic-release@22.0.12): + resolution: {integrity: sha512-cXNTbv3nXR2hlzHjAMgbuiQVtvWHTlwwISt60B+4NZv01y/QRY7p2HcJm8Eh2StzcTJoNnflvKjHH/cjFS7d5g==} + engines: {node: ^18.17 || >=20.6.1} + peerDependencies: + semantic-release: '>=20.1.0' + dependencies: + conventional-changelog-angular: 7.0.0 + conventional-commits-filter: 4.0.0 + conventional-commits-parser: 5.0.0 + debug: 4.3.4(supports-color@8.1.1) + import-from-esm: 1.3.3 + lodash-es: 4.17.21 + micromatch: 4.0.5 + semantic-release: 22.0.12(typescript@5.3.3) + transitivePeerDependencies: + - supports-color + dev: true + + /@semantic-release/error@4.0.0: + resolution: {integrity: sha512-mgdxrHTLOjOddRVYIYDo0fR3/v61GNN1YGkfbrjuIKg/uMgCd+Qzo3UAXJ+woLQQpos4pl5Esuw5A7AoNlzjUQ==} + engines: {node: '>=18'} + dev: true + + /@semantic-release/github@9.2.6(semantic-release@22.0.12): + resolution: {integrity: sha512-shi+Lrf6exeNZF+sBhK+P011LSbhmIAoUEgEY6SsxF8irJ+J2stwI5jkyDQ+4gzYyDImzV6LCKdYB9FXnQRWKA==} + engines: {node: '>=18'} + peerDependencies: + semantic-release: '>=20.1.0' + dependencies: + '@octokit/core': 5.1.0 + '@octokit/plugin-paginate-rest': 9.1.5(@octokit/core@5.1.0) + '@octokit/plugin-retry': 6.0.1(@octokit/core@5.1.0) + '@octokit/plugin-throttling': 8.1.3(@octokit/core@5.1.0) + '@semantic-release/error': 4.0.0 + aggregate-error: 5.0.0 + debug: 4.3.4(supports-color@8.1.1) + dir-glob: 3.0.1 + globby: 14.0.0 + http-proxy-agent: 7.0.0 + https-proxy-agent: 7.0.2 + issue-parser: 6.0.0 + lodash-es: 4.17.21 + mime: 4.0.1 + p-filter: 4.1.0 + semantic-release: 22.0.12(typescript@5.3.3) + url-join: 5.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@semantic-release/npm@11.0.2(semantic-release@22.0.12): + resolution: {integrity: sha512-owtf3RjyPvRE63iUKZ5/xO4uqjRpVQDUB9+nnXj0xwfIeM9pRl+cG+zGDzdftR4m3f2s4Wyf3SexW+kF5DFtWA==} + engines: {node: ^18.17 || >=20} + peerDependencies: + semantic-release: '>=20.1.0' + dependencies: + '@semantic-release/error': 4.0.0 + aggregate-error: 5.0.0 + execa: 8.0.1 + fs-extra: 11.1.1 + lodash-es: 4.17.21 + nerf-dart: 1.0.0 + normalize-url: 8.0.0 + npm: 10.4.0 + rc: 1.2.8 + read-pkg: 9.0.1 + registry-auth-token: 5.0.2 + semantic-release: 22.0.12(typescript@5.3.3) + semver: 7.5.4 + tempy: 3.1.0 + dev: true + + /@semantic-release/release-notes-generator@12.1.0(semantic-release@22.0.12): + resolution: {integrity: sha512-g6M9AjUKAZUZnxaJZnouNBeDNTCUrJ5Ltj+VJ60gJeDaRRahcHsry9HW8yKrnKkKNkx5lbWiEP1FPMqVNQz8Kg==} + engines: {node: ^18.17 || >=20.6.1} + peerDependencies: + semantic-release: '>=20.1.0' + dependencies: + conventional-changelog-angular: 7.0.0 + conventional-changelog-writer: 7.0.1 + conventional-commits-filter: 4.0.0 + conventional-commits-parser: 5.0.0 + debug: 4.3.4(supports-color@8.1.1) + get-stream: 7.0.1 + import-from-esm: 1.3.3 + into-stream: 7.0.0 + lodash-es: 4.17.21 + read-pkg-up: 11.0.0 + semantic-release: 22.0.12(typescript@5.3.3) + transitivePeerDependencies: + - supports-color + dev: true + /@sideway/address@4.1.4: resolution: {integrity: sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==} dependencies: @@ -8249,6 +8447,11 @@ packages: engines: {node: '>=14.16'} dev: false + /@sindresorhus/merge-streams@1.0.0: + resolution: {integrity: sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==} + engines: {node: '>=18'} + dev: true + /@sinonjs/commons@2.0.0: resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} dependencies: @@ -8912,6 +9115,10 @@ packages: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true + /@types/normalize-package-data@2.4.4: + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + dev: true + /@types/parse-json@4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} @@ -9697,6 +9904,25 @@ packages: indent-string: 5.0.0 dev: true + /aggregate-error@5.0.0: + resolution: {integrity: sha512-gOsf2YwSlleG6IjRYG2A7k0HmBMEo6qVNk9Bp/EaLgAJT5ngH6PXbqa4ItvnEwCm/velL5jAnQgsHsWnjhGmvw==} + engines: {node: '>=18'} + dependencies: + clean-stack: 5.2.0 + indent-string: 5.0.0 + dev: true + + /ajv-formats@2.1.1(ajv@6.12.6): + resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + dependencies: + ajv: 6.12.6 + dev: false + /ajv-formats@2.1.1(ajv@8.12.0): resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} peerDependencies: @@ -9799,6 +10025,13 @@ packages: dependencies: type-fest: 0.21.3 + /ansi-escapes@6.2.0: + resolution: {integrity: sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==} + engines: {node: '>=14.16'} + dependencies: + type-fest: 3.13.1 + dev: true + /ansi-html-community@0.0.8: resolution: {integrity: sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==} engines: {'0': node >= 0.8.0} @@ -9835,6 +10068,10 @@ packages: resolution: {integrity: sha512-3MWBO/XxbkDtc/qpECaUwDM0DQ++ujBjdjs0ElZvChUoPv/P7GOnl3x+R2RF2My5UJHEW5R87q556MiR8U3PLw==} engines: {node: '>=12'} + /ansicolors@0.3.2: + resolution: {integrity: sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==} + dev: true + /anymatch@3.1.2: resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} engines: {node: '>= 8'} @@ -9911,6 +10148,10 @@ packages: /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + /argv-formatter@1.0.0: + resolution: {integrity: sha512-F2+Hkm9xFaRg+GkaNnbwXNDV5O6pnCFEmqyhvfC/Ic5LbgOWjJh3L+mN/s91rxVL3znE7DYVpW0GJFT+4YBgWw==} + dev: true + /aria-query@5.1.3: resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} dependencies: @@ -10379,6 +10620,10 @@ packages: dependencies: tweetnacl: 0.14.5 + /before-after-hook@2.2.3: + resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} + dev: true + /big.js@5.2.2: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} @@ -10467,6 +10712,10 @@ packages: /boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + /bottleneck@2.19.5: + resolution: {integrity: sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==} + dev: true + /boxen@6.2.1: resolution: {integrity: sha512-H4PEsJXfFI/Pt8sjDWbHlQPx4zL/bvSQjcilJmaulGt5mLDorHOHpmdXAJcBcmru7PhYSp/cDMWRko4ZUMFkSw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -10775,6 +11024,14 @@ packages: /caniuse-lite@1.0.30001587: resolution: {integrity: sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==} + /cardinal@2.1.1: + resolution: {integrity: sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==} + hasBin: true + dependencies: + ansicolors: 0.3.2 + redeyed: 2.1.1 + dev: true + /caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -10923,6 +11180,13 @@ packages: escape-string-regexp: 5.0.0 dev: true + /clean-stack@5.2.0: + resolution: {integrity: sha512-TyUIUJgdFnCISzG5zu3291TAsE77ddchd0bepon1VVQrKLGKFED4iXFEDQ24mIPdPBbyE16PK3F8MYE1CmcBEQ==} + engines: {node: '>=14.16'} + dependencies: + escape-string-regexp: 5.0.0 + dev: true + /cli-boxes@3.0.0: resolution: {integrity: sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==} engines: {node: '>=10'} @@ -11219,7 +11483,6 @@ packages: dependencies: ini: 1.3.8 proto-list: 1.2.4 - dev: false /configstore@6.0.0: resolution: {integrity: sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==} @@ -11276,6 +11539,13 @@ packages: q: 1.5.1 dev: true + /conventional-changelog-angular@7.0.0: + resolution: {integrity: sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==} + engines: {node: '>=16'} + dependencies: + compare-func: 2.0.0 + dev: true + /conventional-changelog-atom@2.0.8: resolution: {integrity: sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw==} engines: {node: '>=10'} @@ -11395,6 +11665,19 @@ packages: through2: 4.0.2 dev: true + /conventional-changelog-writer@7.0.1: + resolution: {integrity: sha512-Uo+R9neH3r/foIvQ0MKcsXkX642hdm9odUp7TqgFS7BsalTcjzRlIfWZrZR1gbxOozKucaKt5KAbjW8J8xRSmA==} + engines: {node: '>=16'} + hasBin: true + dependencies: + conventional-commits-filter: 4.0.0 + handlebars: 4.7.7 + json-stringify-safe: 5.0.1 + meow: 12.1.1 + semver: 7.5.4 + split2: 4.2.0 + dev: true + /conventional-changelog@3.1.25: resolution: {integrity: sha512-ryhi3fd1mKf3fSjbLXOfK2D06YwKNic1nC9mWqybBHdObPd8KJ2vjaXZfYj1U23t+V8T8n0d7gwnc9XbIdFbyQ==} engines: {node: '>=10'} @@ -11420,6 +11703,11 @@ packages: modify-values: 1.0.1 dev: true + /conventional-commits-filter@4.0.0: + resolution: {integrity: sha512-rnpnibcSOdFcdclpFwWa+pPlZJhXE7l+XK04zxhbWrhgpR96h33QLz8hITTXbcYICxVr3HZFtbtUAQ+4LdBo9A==} + engines: {node: '>=16'} + dev: true + /conventional-commits-parser@3.2.4: resolution: {integrity: sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==} engines: {node: '>=10'} @@ -11432,6 +11720,17 @@ packages: through2: 4.0.2 dev: true + /conventional-commits-parser@5.0.0: + resolution: {integrity: sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==} + engines: {node: '>=16'} + hasBin: true + dependencies: + JSONStream: 1.3.5 + is-text-path: 2.0.0 + meow: 12.1.1 + split2: 4.2.0 + dev: true + /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} @@ -11606,7 +11905,6 @@ packages: parse-json: 5.2.0 path-type: 4.0.0 typescript: 5.3.3 - dev: false /cosmiconfig@9.0.0(typescript@5.3.3): resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} @@ -11704,7 +12002,6 @@ packages: engines: {node: '>=12'} dependencies: type-fest: 1.4.0 - dev: false /css-blank-pseudo@5.0.0(postcss@8.4.21): resolution: {integrity: sha512-2QwvERc+e7bWoO6Cva1goJR3r/qe2opbizEWpWEtKAxW9KDpEovI2Y8M2UgqoEVQyPAsWJwWnBpSpItqvjveoQ==} @@ -12662,6 +12959,10 @@ packages: resolution: {integrity: sha512-cW3gggJ28HZ/LExwxP2B++aiKxhJXMSIt9K48FOXQkm+vuG5gyatXnLsONRJdzO/7VfjDIiaOOa/bs4l464Lwg==} engines: {node: '>=4'} + /deprecation@2.3.1: + resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} + dev: true + /dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -12868,6 +13169,12 @@ packages: resolution: {integrity: sha512-g/M9sqy3oHe477Ar4voQxWtaPIFw1jTdKZuomOjhCcBx9nHUNn0pu6NopuFFrTh/TRZIKEj+76vLWFu9BNKk+Q==} engines: {node: '>=4'} + /duplexer2@0.1.4: + resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==} + dependencies: + readable-stream: 2.3.7 + dev: true + /duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} @@ -12916,7 +13223,6 @@ packages: /emojilib@2.4.0: resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} - dev: false /emojis-list@3.0.0: resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} @@ -12964,6 +13270,14 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + /env-ci@10.0.0: + resolution: {integrity: sha512-U4xcd/utDYFgMh0yWj07R1H6L5fwhVbmxBCpnL0DbVSDZVnsC82HONw0wxtxNkIAcua3KtbomQvIk5xFZGAQJw==} + engines: {node: ^18.17 || >=20.6.1} + dependencies: + execa: 8.0.1 + java-properties: 1.0.2 + dev: true + /env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -13694,12 +14008,26 @@ packages: xml-js: 1.6.11 dev: false + /figures@2.0.0: + resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} + engines: {node: '>=4'} + dependencies: + escape-string-regexp: 1.0.5 + dev: true + /figures@3.2.0: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} dependencies: escape-string-regexp: 1.0.5 + /figures@6.0.1: + resolution: {integrity: sha512-0oY/olScYD4IhQ8u//gCPA4F3mlTn2dacYmiDm/mbDQvpmLjV4uH+zhsQ5IyXRyvqkvtUkXkNdGvg5OFJTCsuQ==} + engines: {node: '>=18'} + dependencies: + is-unicode-supported: 2.0.0 + dev: true + /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -13789,6 +14117,11 @@ packages: common-path-prefix: 3.0.0 pkg-dir: 7.0.0 + /find-up-simple@1.0.0: + resolution: {integrity: sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==} + engines: {node: '>=18'} + dev: true + /find-up@2.1.0: resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} engines: {node: '>=4'} @@ -13991,6 +14324,13 @@ packages: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} + /from2@2.3.0: + resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} + dependencies: + inherits: 2.0.4 + readable-stream: 2.3.7 + dev: true + /from@0.1.7: resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==} dev: true @@ -14160,6 +14500,11 @@ packages: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} + /get-stream@7.0.1: + resolution: {integrity: sha512-3M8C1EOFN6r8AMUhwUAACIoXZJEOufDU5+0gFFN5uNs6XYOralD2Pqkl7m046va6x77FwposWXbAhPPIOus7mQ==} + engines: {node: '>=16'} + dev: true + /get-stream@8.0.1: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} @@ -14189,6 +14534,17 @@ packages: - supports-color dev: true + /git-log-parser@1.2.0: + resolution: {integrity: sha512-rnCVNfkTL8tdNryFuaY0fYiBWEBcgF748O6ZI61rslBvr2o7U65c2/6npCRqH40vuAhtgtDiqLTJjBVdrejCzA==} + dependencies: + argv-formatter: 1.0.0 + spawn-error-forwarder: 1.0.0 + split2: 1.0.0 + stream-combiner2: 1.1.1 + through2: 2.0.5 + traverse: 0.6.8 + dev: true + /git-raw-commits@2.0.11: resolution: {integrity: sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==} engines: {node: '>=10'} @@ -14363,6 +14719,18 @@ packages: merge2: 1.4.1 slash: 4.0.0 + /globby@14.0.0: + resolution: {integrity: sha512-/1WM/LNHRAOH9lZta77uGbq0dAEQM+XjNesWwhlERDVenqothRbnzTrL3/LrIoEPPjeUHC3vrS6TwoyxeHs7MQ==} + engines: {node: '>=18'} + dependencies: + '@sindresorhus/merge-streams': 1.0.0 + fast-glob: 3.3.2 + ignore: 5.2.4 + path-type: 5.0.0 + slash: 5.1.0 + unicorn-magic: 0.1.0 + dev: true + /globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} dev: true @@ -14786,6 +15154,11 @@ packages: react-is: 16.13.1 dev: false + /hook-std@3.0.0: + resolution: {integrity: sha512-jHRQzjSDzMtFy34AGj1DN+vq54WVuhSvKgrHf0OMiFQTwDD4L/qqofVEWjLOBMTn5+lCD3fPg32W9yOfnEJTTw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /hookable@5.5.3: resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} dev: true @@ -15162,6 +15535,16 @@ packages: parent-module: 1.0.1 resolve-from: 4.0.0 + /import-from-esm@1.3.3: + resolution: {integrity: sha512-U3Qt/CyfFpTUv6LOP2jRTLYjphH6zg3okMfHbyqRa/W2w6hr8OsJWVggNlR4jxuojQy81TgTJTxgSkyoteRGMQ==} + engines: {node: '>=16.20'} + dependencies: + debug: 4.3.4(supports-color@8.1.1) + import-meta-resolve: 4.0.0 + transitivePeerDependencies: + - supports-color + dev: true + /import-lazy@4.0.0: resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} engines: {node: '>=8'} @@ -15177,6 +15560,10 @@ packages: /import-meta-resolve@3.0.0: resolution: {integrity: sha512-4IwhLhNNA8yy445rPjD/lWh++7hMDOml2eHtd58eG7h+qK3EryMuuRbsHGPikCoAgIkkDnckKfWSk2iDla/ejg==} + /import-meta-resolve@4.0.0: + resolution: {integrity: sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==} + dev: true + /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -15190,6 +15577,11 @@ packages: engines: {node: '>=12'} dev: true + /index-to-position@0.1.2: + resolution: {integrity: sha512-MWDKS3AS1bGCHLBA2VLImJz42f7bJh8wQsTGCzI3j519/CASStoDONUBVz2I/VID0MpiX3SGSnbOD2xUalbE5g==} + engines: {node: '>=18'} + dev: true + /infer-owner@1.0.4: resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} dev: true @@ -15283,6 +15675,14 @@ packages: engines: {node: '>= 0.10'} dev: false + /into-stream@7.0.0: + resolution: {integrity: sha512-2dYz766i9HprMBasCMvHMuazJ7u4WzhJwo5kb3iPSiW/iRYV6uPari3zHoqZlnuaR7V1bEiNMxikhp37rdBXbw==} + engines: {node: '>=12'} + dependencies: + from2: 2.3.0 + p-is-promise: 3.0.0 + dev: true + /invariant@2.2.4: resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} dependencies: @@ -15609,6 +16009,13 @@ packages: text-extensions: 1.9.0 dev: true + /is-text-path@2.0.0: + resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==} + engines: {node: '>=8'} + dependencies: + text-extensions: 2.4.0 + dev: true + /is-typed-array@1.1.10: resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} engines: {node: '>= 0.4'} @@ -15631,6 +16038,11 @@ packages: resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} engines: {node: '>=12'} + /is-unicode-supported@2.0.0: + resolution: {integrity: sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==} + engines: {node: '>=18'} + dev: true + /is-weakmap@2.0.1: resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==} dev: true @@ -15702,6 +16114,17 @@ packages: /isstream@0.1.2: resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} + /issue-parser@6.0.0: + resolution: {integrity: sha512-zKa/Dxq2lGsBIXQ7CUZWTHfvxPC2ej0KfO7fIPqLlHB9J2hJ7rGhZ5rilhuufylr4RXYPzJUeFjKxz305OsNlA==} + engines: {node: '>=10.13'} + dependencies: + lodash.capitalize: 4.2.1 + lodash.escaperegexp: 4.1.2 + lodash.isplainobject: 4.0.6 + lodash.isstring: 4.0.1 + lodash.uniqby: 4.7.0 + dev: true + /istanbul-lib-coverage@3.2.0: resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} engines: {node: '>=8'} @@ -15761,6 +16184,11 @@ packages: filelist: 1.0.4 minimatch: 3.1.2 + /java-properties@1.0.2: + resolution: {integrity: sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ==} + engines: {node: '>= 0.6.0'} + dev: true + /jest-changed-files@29.5.0: resolution: {integrity: sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -15961,7 +16389,7 @@ packages: resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.5 '@jest/types': 29.5.0 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -16563,6 +16991,8 @@ packages: peerDependenciesMeta: webpack: optional: true + webpack-sources: + optional: true dependencies: webpack: 5.89.0(@swc/core@1.3.99)(esbuild@0.19.5) webpack-sources: 3.2.3 @@ -16575,6 +17005,8 @@ packages: peerDependenciesMeta: webpack: optional: true + webpack-sources: + optional: true dependencies: webpack: 5.90.1(@swc/core@1.3.99)(esbuild@0.20.0) webpack-sources: 3.2.3 @@ -16762,12 +17194,15 @@ packages: /lodash-es@4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} - dev: false /lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} dev: true + /lodash.capitalize@4.2.1: + resolution: {integrity: sha512-kZzYOKspf8XVX5AvmQF94gQW0lejFVgb80G85bU4ZWzoJ6C03PQg3coYAUpSTpQWelrZELd3XWgHzw4Ck5kaIw==} + dev: true + /lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} @@ -16775,6 +17210,10 @@ packages: resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==} dev: true + /lodash.escaperegexp@4.1.2: + resolution: {integrity: sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==} + dev: true + /lodash.isarguments@3.1.0: resolution: {integrity: sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==} dev: true @@ -16791,6 +17230,10 @@ packages: resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} dev: true + /lodash.isstring@4.0.1: + resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} + dev: true + /lodash.kebabcase@4.1.1: resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==} dev: true @@ -16819,6 +17262,10 @@ packages: /lodash.uniq@4.5.0: resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} + /lodash.uniqby@4.7.0: + resolution: {integrity: sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww==} + dev: true + /lodash.upperfirst@4.3.1: resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} dev: true @@ -17038,11 +17485,32 @@ packages: marked: 5.0.2 dev: false + /marked-terminal@6.2.0(marked@9.1.6): + resolution: {integrity: sha512-ubWhwcBFHnXsjYNsu+Wndpg0zhY4CahSpPlA70PlO0rR9r2sZpkyU+rkCsOWH+KMEkx847UpALON+HWgxowFtw==} + engines: {node: '>=16.0.0'} + peerDependencies: + marked: '>=1 <12' + dependencies: + ansi-escapes: 6.2.0 + cardinal: 2.1.1 + chalk: 5.3.0 + cli-table3: 0.6.3 + marked: 9.1.6 + node-emoji: 2.1.3 + supports-hyperlinks: 3.0.0 + dev: true + /marked@5.0.2: resolution: {integrity: sha512-TXksm9GwqXCRNbFUZmMtqNLvy3K2cQHuWmyBDLOrY1e6i9UvZpOTJXoz7fBjYkJkaUFzV9hBFxMuZSyQt8R6KQ==} engines: {node: '>= 18'} dev: false + /marked@9.1.6: + resolution: {integrity: sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==} + engines: {node: '>= 16'} + hasBin: true + dev: true + /mdast-util-definitions@5.1.1: resolution: {integrity: sha512-rQ+Gv7mHttxHOBx2dkF4HWTg+EE+UR78ptQWDylzPKaQuVGdG4HIoY3SrS/pCp80nZ04greFvXbVFHT+uf0JVQ==} dependencies: @@ -17469,6 +17937,11 @@ packages: yargs-parser: 20.2.9 dev: true + /meow@12.1.1: + resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} + engines: {node: '>=16.10'} + dev: true + /meow@8.1.2: resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} engines: {node: '>=10'} @@ -18202,6 +18675,12 @@ packages: resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} engines: {node: '>=10.0.0'} + /mime@4.0.1: + resolution: {integrity: sha512-5lZ5tyrIfliMXzFtkYyekWbtRXObT9OWa8IwQ5uxTBDHucNNwniRqo0yInflj+iYi5CBa6qxadGzGarDfuEOxA==} + engines: {node: '>=16'} + hasBin: true + dev: true + /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -18501,6 +18980,10 @@ packages: /neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + /nerf-dart@1.0.0: + resolution: {integrity: sha512-EZSPZB70jiVsivaBLYDCyntd5eH8NTSMOn3rB+HxwdmKThGELLdYv8qVIMWvZEFy9w8ZZpW9h9OB32l1rGtj7g==} + dev: true + /nested-error-stacks@2.1.1: resolution: {integrity: sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==} dev: true @@ -18695,7 +19178,6 @@ packages: char-regex: 1.0.2 emojilib: 2.4.0 skin-tone: 2.0.0 - dev: false /node-fetch-native@1.4.0: resolution: {integrity: sha512-F5kfEj95kX8tkDhUCYdV8dg3/8Olx/94zB8+ZNthFs6Bz31UpUi8Xh40TN3thLwXgrwXry1pEg9lJ++tLWTcqA==} @@ -18817,7 +19299,6 @@ packages: /normalize-url@8.0.0: resolution: {integrity: sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==} engines: {node: '>=14.16'} - dev: false /npm-bundled@3.0.0: resolution: {integrity: sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==} @@ -18898,6 +19379,83 @@ packages: dependencies: path-key: 4.0.0 + /npm@10.4.0: + resolution: {integrity: sha512-RS7Mx0OVfXlOcQLRePuDIYdFCVBPCNapWHplDK+mh7GDdP/Tvor4ocuybRRPSvfcRb2vjRJt1fHCqw3cr8qACQ==} + engines: {node: ^18.17.0 || >=20.5.0} + hasBin: true + dev: true + bundledDependencies: + - '@isaacs/string-locale-compare' + - '@npmcli/arborist' + - '@npmcli/config' + - '@npmcli/fs' + - '@npmcli/map-workspaces' + - '@npmcli/package-json' + - '@npmcli/promise-spawn' + - '@npmcli/run-script' + - '@sigstore/tuf' + - abbrev + - archy + - cacache + - chalk + - ci-info + - cli-columns + - cli-table3 + - columnify + - fastest-levenshtein + - fs-minipass + - glob + - graceful-fs + - hosted-git-info + - ini + - init-package-json + - is-cidr + - json-parse-even-better-errors + - libnpmaccess + - libnpmdiff + - libnpmexec + - libnpmfund + - libnpmhook + - libnpmorg + - libnpmpack + - libnpmpublish + - libnpmsearch + - libnpmteam + - libnpmversion + - make-fetch-happen + - minimatch + - minipass + - minipass-pipeline + - ms + - node-gyp + - nopt + - normalize-package-data + - npm-audit-report + - npm-install-checks + - npm-package-arg + - npm-pick-manifest + - npm-profile + - npm-registry-fetch + - npm-user-validate + - npmlog + - p-map + - pacote + - parse-conflict-json + - proc-log + - qrcode-terminal + - read + - semver + - spdx-expression-parse + - ssri + - supports-color + - tar + - text-table + - tiny-relative-date + - treeverse + - validate-npm-package-name + - which + - write-file-atomic + /npmlog@5.0.1: resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} dependencies: @@ -19176,6 +19734,11 @@ packages: engines: {node: '>=12.20'} dev: false + /p-each-series@3.0.0: + resolution: {integrity: sha512-lastgtAdoH9YaLyDa5i5z64q+kzOcQHsQ5SsZJD3q0VEyI8mq872S3geuNbRUQLVAE9siMfgKrpj7MloKFHruw==} + engines: {node: '>=12'} + dev: true + /p-event@4.2.0: resolution: {integrity: sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==} engines: {node: '>=8'} @@ -19190,11 +19753,23 @@ packages: p-map: 5.5.0 dev: true + /p-filter@4.1.0: + resolution: {integrity: sha512-37/tPdZ3oJwHaS3gNJdenCDB3Tz26i9sjhnguBtvN0vYlRIiDNnvTWkuh+0hETV9rLPdJ3rlL3yVOYPIAnM8rw==} + engines: {node: '>=18'} + dependencies: + p-map: 7.0.1 + dev: true + /p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} dev: true + /p-is-promise@3.0.0: + resolution: {integrity: sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==} + engines: {node: '>=8'} + dev: true + /p-limit@1.3.0: resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} engines: {node: '>=4'} @@ -19272,6 +19847,16 @@ packages: aggregate-error: 4.0.1 dev: true + /p-map@7.0.1: + resolution: {integrity: sha512-2wnaR0XL/FDOj+TgpDuRb2KTjLnu3Fma6b1ZUwGY7LcqenMcvP/YFpjpbPKY6WVGsbuJZRuoUz8iPrt8ORnAFw==} + engines: {node: '>=18'} + dev: true + + /p-reduce@3.0.0: + resolution: {integrity: sha512-xsrIUgI0Kn6iyDYm9StOpOeK29XM1aboGji26+QEortiFST1hGZaUQOLhtEbqHErPpGW/aSz6allwK2qcptp0Q==} + engines: {node: '>=12'} + dev: true + /p-retry@4.6.2: resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==} engines: {node: '>=8'} @@ -19373,11 +19958,20 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.5 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 + /parse-json@8.1.0: + resolution: {integrity: sha512-rum1bPifK5SSar35Z6EKZuYPJx85pkNaFrxBK3mwdfSJ1/WKbYrjoW/zTPSjRRamfmVX1ACBIdFAO0VRErW/EA==} + engines: {node: '>=18'} + dependencies: + '@babel/code-frame': 7.23.5 + index-to-position: 0.1.2 + type-fest: 4.10.2 + dev: true + /parse-latin@5.0.0: resolution: {integrity: sha512-Ht+4/+AUySMS5HKGAiQpBmkFsHSoGrj6Y83flLCa5OIBdtsVkO3UD4OtboJ0O0vZiOznH02x8qlwg9KLUVXuNg==} dependencies: @@ -19509,6 +20103,11 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + /path-type@5.0.0: + resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} + engines: {node: '>=12'} + dev: true + /pathe@1.1.1: resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} dev: true @@ -19605,6 +20204,14 @@ packages: optionalDependencies: nice-napi: 1.0.2 + /pkg-conf@2.1.0: + resolution: {integrity: sha512-C+VUP+8jis7EsQZIhDYmS5qlNtjv2yP4SNtjXK9AP1ZcTRlnSfuumaTnRfYZnYgUUYVIKqL0fRvmUGDV2fmp6g==} + engines: {node: '>=4'} + dependencies: + find-up: 2.1.0 + load-json-file: 4.0.0 + dev: true + /pkg-dir@4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} @@ -20982,7 +21589,6 @@ packages: /proto-list@1.2.4: resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} - dev: false /proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} @@ -21302,6 +21908,16 @@ packages: npm-normalize-package-bin: 3.0.0 dev: true + /read-pkg-up@11.0.0: + resolution: {integrity: sha512-LOVbvF1Q0SZdjClSefZ0Nz5z8u+tIE7mV5NibzmE9VYmDe9CaBbAVtz1veOSZbofrdsilxuDAYnFenukZVp8/Q==} + engines: {node: '>=18'} + deprecated: Renamed to read-package-up + dependencies: + find-up-simple: 1.0.0 + read-pkg: 9.0.1 + type-fest: 4.10.2 + dev: true + /read-pkg-up@3.0.0: resolution: {integrity: sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==} engines: {node: '>=4'} @@ -21357,6 +21973,17 @@ packages: type-fest: 1.4.0 dev: true + /read-pkg@9.0.1: + resolution: {integrity: sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==} + engines: {node: '>=18'} + dependencies: + '@types/normalize-package-data': 2.4.4 + normalize-package-data: 6.0.0 + parse-json: 8.1.0 + type-fest: 4.10.2 + unicorn-magic: 0.1.0 + dev: true + /readable-stream@2.3.7: resolution: {integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==} dependencies: @@ -21429,6 +22056,12 @@ packages: strip-indent: 4.0.0 dev: true + /redeyed@2.1.1: + resolution: {integrity: sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==} + dependencies: + esprima: 4.0.1 + dev: true + /redis-errors@1.2.0: resolution: {integrity: sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==} engines: {node: '>=4'} @@ -21493,7 +22126,6 @@ packages: engines: {node: '>=14'} dependencies: '@pnpm/npm-conf': 2.2.2 - dev: false /registry-url@6.0.1: resolution: {integrity: sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==} @@ -22142,12 +22774,50 @@ packages: dependencies: node-forge: 1.3.1 + /semantic-release@22.0.12(typescript@5.3.3): + resolution: {integrity: sha512-0mhiCR/4sZb00RVFJIUlMuiBkW3NMpVIW2Gse7noqEMoFGkvfPPAImEQbkBV8xga4KOPP4FdTRYuLLy32R1fPw==} + engines: {node: ^18.17 || >=20.6.1} + hasBin: true + dependencies: + '@semantic-release/commit-analyzer': 11.1.0(semantic-release@22.0.12) + '@semantic-release/error': 4.0.0 + '@semantic-release/github': 9.2.6(semantic-release@22.0.12) + '@semantic-release/npm': 11.0.2(semantic-release@22.0.12) + '@semantic-release/release-notes-generator': 12.1.0(semantic-release@22.0.12) + aggregate-error: 5.0.0 + cosmiconfig: 8.3.6(typescript@5.3.3) + debug: 4.3.4(supports-color@8.1.1) + env-ci: 10.0.0 + execa: 8.0.1 + figures: 6.0.1 + find-versions: 5.1.0 + get-stream: 6.0.1 + git-log-parser: 1.2.0 + hook-std: 3.0.0 + hosted-git-info: 7.0.1 + import-from-esm: 1.3.3 + lodash-es: 4.17.21 + marked: 9.1.6 + marked-terminal: 6.2.0(marked@9.1.6) + micromatch: 4.0.5 + p-each-series: 3.0.0 + p-reduce: 3.0.0 + read-pkg-up: 11.0.0 + resolve-from: 5.0.0 + semver: 7.5.4 + semver-diff: 4.0.0 + signale: 1.4.0 + yargs: 17.7.2 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /semver-diff@4.0.0: resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==} engines: {node: '>=12'} dependencies: semver: 7.5.4 - dev: false /semver-regex@4.0.5: resolution: {integrity: sha512-hunMQrEy1T6Jr2uEVjrAIqjwWcQTgOAcIM52C8MY1EZSD3DDNft04XzvYKPqjED65bNVVko0YI38nYeEHCX3yw==} @@ -22374,6 +23044,15 @@ packages: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} + /signale@1.4.0: + resolution: {integrity: sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==} + engines: {node: '>=6'} + dependencies: + chalk: 2.4.2 + figures: 2.0.0 + pkg-conf: 2.1.0 + dev: true + /sigstore@2.2.1: resolution: {integrity: sha512-OBBSKvmjr4DCyUb+IC2p7wooOCsCNwaqvCilTJVNPo0y8lJl+LsCrfz4LtMwnw3Gn+8frt816wi1+DWZTUCpBQ==} engines: {node: ^16.14.0 || >=18.0.0} @@ -22443,7 +23122,6 @@ packages: engines: {node: '>=8'} dependencies: unicode-emoji-modifier-base: 1.0.0 - dev: false /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} @@ -22453,6 +23131,11 @@ packages: resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} engines: {node: '>=12'} + /slash@5.1.0: + resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} + engines: {node: '>=14.16'} + dev: true + /slice-ansi@3.0.0: resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} engines: {node: '>=8'} @@ -22597,6 +23280,10 @@ packages: /space-separated-tokens@2.0.1: resolution: {integrity: sha512-ekwEbFp5aqSPKaqeY1PGrlGQxPNaq+Cnx4+bE2D8sciBQrHpbwoBbawqTN2+6jPs9IdWxxiUcN0K2pkczD3zmw==} + /spawn-error-forwarder@1.0.0: + resolution: {integrity: sha512-gRjMgK5uFjbCvdibeGJuy3I5OYz6VLoVdsOJdA6wV0WlfQVLFueoqMxwwYD9RODdgb6oUIvlRlsyFSiQkMKu0g==} + dev: true + /spdx-correct@3.1.1: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} dependencies: @@ -22643,12 +23330,23 @@ packages: transitivePeerDependencies: - supports-color + /split2@1.0.0: + resolution: {integrity: sha512-NKywug4u4pX/AZBB1FCPzZ6/7O+Xhz1qMVbzTvvKvikjO99oPN87SkK08mEY9P63/5lWjK+wgOOgApnTg5r6qg==} + dependencies: + through2: 2.0.5 + dev: true + /split2@3.2.2: resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} dependencies: readable-stream: 3.6.0 dev: true + /split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + dev: true + /split@0.3.3: resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==} dependencies: @@ -22753,6 +23451,13 @@ packages: dependencies: bl: 5.0.0 + /stream-combiner2@1.1.1: + resolution: {integrity: sha512-3PnJbYgS56AeWgtKF5jtJRT6uFJe56Z0Hc5Ngg/6sI6rIt8iiMBTa9cvdyFfpMQjaVHr8dusbNeFGIIonxOvKw==} + dependencies: + duplexer2: 0.1.4 + readable-stream: 2.3.7 + dev: true + /stream-combiner@0.0.4: resolution: {integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==} dependencies: @@ -23030,6 +23735,14 @@ packages: engines: {node: '>=12'} dev: true + /supports-hyperlinks@3.0.0: + resolution: {integrity: sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==} + engines: {node: '>=14.18'} + dependencies: + has-flag: 4.0.0 + supports-color: 7.2.0 + dev: true + /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -23179,6 +23892,11 @@ packages: engines: {node: '>=8'} dev: true + /temp-dir@3.0.0: + resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==} + engines: {node: '>=14.16'} + dev: true + /tempfile@3.0.0: resolution: {integrity: sha512-uNFCg478XovRi85iD42egu+eSFUmmka750Jy7L5tfHI5hQKKtbPnxaSaXAbBqCDYrw3wx4tXjKwci4/QmsZJxw==} engines: {node: '>=8'} @@ -23187,6 +23905,16 @@ packages: uuid: 3.4.0 dev: true + /tempy@3.1.0: + resolution: {integrity: sha512-7jDLIdD2Zp0bDe5r3D2qtkd1QOCacylBuL7oa4udvN6v2pqr4+LcCr67C8DR1zkpaZ8XosF5m1yQSabKAW6f2g==} + engines: {node: '>=14.16'} + dependencies: + is-stream: 3.0.0 + temp-dir: 3.0.0 + type-fest: 2.19.0 + unique-string: 3.0.0 + dev: true + /terser-webpack-plugin@5.3.10(@swc/core@1.3.99)(esbuild@0.19.5)(webpack@5.90.1): resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} engines: {node: '>= 10.13.0'} @@ -23295,6 +24023,11 @@ packages: engines: {node: '>=0.10'} dev: true + /text-extensions@2.4.0: + resolution: {integrity: sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==} + engines: {node: '>=8'} + dev: true + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} @@ -23423,6 +24156,11 @@ packages: punycode: 2.3.0 dev: true + /traverse@0.6.8: + resolution: {integrity: sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==} + engines: {node: '>= 0.4'} + dev: true + /tree-kill@1.2.2: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true @@ -23721,6 +24459,11 @@ packages: engines: {node: '>=14.16'} dev: true + /type-fest@4.10.2: + resolution: {integrity: sha512-anpAG63wSpdEbLwOqH8L84urkL6PiVIov3EMmgIhhThevh9aiMQov+6Btx0wldNcvm4wV+e2/Rt1QdDwKHFbHw==} + engines: {node: '>=16'} + dev: true + /type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -23816,7 +24559,6 @@ packages: /unicode-emoji-modifier-base@1.0.0: resolution: {integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==} engines: {node: '>=4'} - dev: false /unicode-match-property-ecmascript@2.0.0: resolution: {integrity: sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==} @@ -23833,6 +24575,11 @@ packages: resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} engines: {node: '>=4'} + /unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + dev: true + /unified@10.1.2: resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} dependencies: @@ -23910,7 +24657,6 @@ packages: engines: {node: '>=12'} dependencies: crypto-random-string: 4.0.0 - dev: false /unist-builder@3.0.0: resolution: {integrity: sha512-GFxmfEAa0vi9i5sd0R2kcrI9ks0r82NasRq5QHh2ysGngrc6GiqD5CDf1FjPenY4vApmFASBIIlk/jj5J5YbmQ==} @@ -24006,6 +24752,10 @@ packages: unist-util-is: 6.0.0 unist-util-visit-parents: 6.0.1 + /universal-user-agent@6.0.1: + resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==} + dev: true + /universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} @@ -24146,6 +24896,11 @@ packages: /url-join@4.0.1: resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} + /url-join@5.0.0: + resolution: {integrity: sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /url-loader@4.1.1(file-loader@6.2.0)(webpack@5.89.0): resolution: {integrity: sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==} engines: {node: '>= 10.13.0'} diff --git a/release.config.cjs b/release.config.cjs new file mode 100644 index 000000000..9263b945d --- /dev/null +++ b/release.config.cjs @@ -0,0 +1,99 @@ +/** + * @type {import('semantic-release').GlobalConfig} + */ + +const tag = process.env.RELEASE_TAG; + +module.exports = { + branches: ['main', { name: 'beta', prerelease: true }], + plugins: [ + '@semantic-release/commit-analyzer', + '@semantic-release/release-notes-generator', + '@semantic-release/changelog', + [ + '@semantic-release/github', + { + successComment: false, + }, + ], + [ + '@semantic-release/npm', + { + npmPublish: false, + }, + ], + [ + '@semantic-release/npm', + { + npmPublish: false, + pkgRoot: './packages/astro-angular/', + }, + ], + [ + '@semantic-release/npm', + { + npmPublish: false, + pkgRoot: './packages/content/', + }, + ], + [ + '@semantic-release/npm', + { + npmPublish: false, + pkgRoot: './packages/platform/', + }, + ], + [ + '@semantic-release/npm', + { + npmPublish: false, + pkgRoot: './packages/router/', + }, + ], + [ + '@semantic-release/npm', + { + npmPublish: false, + pkgRoot: './packages/trpc/', + }, + ], + [ + '@semantic-release/npm', + { + npmPublish: false, + pkgRoot: './packages/vite-plugin-angular/', + }, + ], + [ + '@semantic-release/npm', + { + npmPublish: false, + pkgRoot: './packages/vite-plugin-nitro/', + }, + ], + [ + '@semantic-release/git', + { + assets: [ + 'CHANGELOG.md', + 'package.json', + 'packages/astro-angular/package.json', + 'packages/content/package.json', + 'packages/platform/package.json', + 'packages/router/package.json', + 'packages/trpc/package.json', + 'packages/vite-plugin-angular/package.json', + 'packages/vite-plugin-nitro/package.json', + ], + message: 'chore: release ${nextRelease.version} [skip ci]', + }, + ], + [ + '@semantic-release/exec', + { + publishCmd: `pnpm build && RELEASE_TAG=${tag} ./tools/publish.sh`, + }, + ], + ], + preset: 'angular', +}; diff --git a/server.mjs b/server.mjs index 60bcace8e..32d4fb1cf 100644 --- a/server.mjs +++ b/server.mjs @@ -1,6 +1,6 @@ -import fs from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import express from 'express'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); diff --git a/tools/publish.sh b/tools/publish.sh index d9e31446a..6a2306fbf 100755 --- a/tools/publish.sh +++ b/tools/publish.sh @@ -1,10 +1,10 @@ #!/bin/bash - -npm publish node_modules/@analogjs/astro-angular --access public -npm publish node_modules/@analogjs/content --access public -npm publish node_modules/@analogjs/platform --access public -npm publish node_modules/@analogjs/router --access public -npm publish node_modules/@analogjs/trpc --access public -npm publish node_modules/@analogjs/vite-plugin-angular --access public -npm publish node_modules/@analogjs/vite-plugin-nitro --access public -npm publish dist/packages/create-analog +echo "Publishing to $RELEASE_TAG" +#npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN +npm publish node_modules/@analogjs/astro-angular --access public --tag $RELEASE_TAG +npm publish node_modules/@analogjs/content --access public --tag $RELEASE_TAG +npm publish node_modules/@analogjs/platform --access public --tag $RELEASE_TAG +npm publish node_modules/@analogjs/router --access public --tag $RELEASE_TAG +npm publish node_modules/@analogjs/vite-plugin-angular --access public --tag $RELEASE_TAG +npm publish node_modules/@analogjs/vite-plugin-nitro --access public --tag $RELEASE_TAG +npm publish dist/packages/create-analog --tag $RELEASE_TAG diff --git a/tools/scripts/publish.mjs b/tools/scripts/publish.mjs index 5e65de362..3e5045a72 100644 --- a/tools/scripts/publish.mjs +++ b/tools/scripts/publish.mjs @@ -8,8 +8,8 @@ */ import { readCachedProjectGraph } from '@nx/devkit'; -import { execSync } from 'child_process'; -import { readFileSync, writeFileSync } from 'fs'; +import { execSync } from 'node:child_process'; +import { readFileSync, writeFileSync } from 'node:fs'; import chalk from 'chalk'; function invariant(condition, message) { diff --git a/tsconfig.base.json b/tsconfig.base.json index 5e97590da..eb5c233a8 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -18,7 +18,10 @@ "@analogjs/astro-angular": ["packages/astro-angular/src/index.ts"], "@analogjs/content": ["packages/content/src/index.ts"], "@analogjs/nx": ["packages/nx-plugin/src/index.ts"], - "@analogjs/platform": ["packages/platform/src/index.ts"], + "@analogjs/platform": [ + "./node_modules/@analogjs/platform", + "packages/platform/src/index.ts" + ], "@analogjs/router": ["packages/router/src/index.ts"], "@analogjs/top-bar": ["libs/top-bar/src/index.ts"], "@analogjs/trpc": ["packages/trpc/src/index.ts"],