Skip to content

Commit

Permalink
Merge branch 'main' into docs/api-route-update
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 27, 2024
2 parents 4f81fa4 + 4f3427b commit 1f75be1
Show file tree
Hide file tree
Showing 36 changed files with 1,287 additions and 523 deletions.
36 changes: 36 additions & 0 deletions .all-contributorsrc
Expand Up @@ -795,6 +795,42 @@
"contributions": [
"code"
]
},
{
"login": "ShPelles",
"name": "ShPelles",
"avatar_url": "https://avatars.githubusercontent.com/u/43875468?v=4",
"profile": "https://github.com/ShPelles",
"contributions": [
"doc"
]
},
{
"login": "pavankjadda",
"name": "Pavan Kumar Jadda",
"avatar_url": "https://avatars.githubusercontent.com/u/17564080?v=4",
"profile": "https://pavankjadda.dev",
"contributions": [
"code"
]
},
{
"login": "monacodelisa",
"name": "Esther White",
"avatar_url": "https://avatars.githubusercontent.com/u/64324417?v=4",
"profile": "https://monacodelisa.com/",
"contributions": [
"code"
]
},
{
"login": "Micha-Richter",
"name": "Michael Richter",
"avatar_url": "https://avatars.githubusercontent.com/u/12509902?v=4",
"profile": "https://github.com/Micha-Richter",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -3,6 +3,7 @@ name: ci
on:
push:
branches:
- beta
- main
pull_request: {}

Expand Down Expand Up @@ -72,10 +73,29 @@ jobs:
- name: Build
run: pnpm build

build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
- run: corepack enable
- run: pnpm --version
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: pnpm build

unit:
runs-on: ubuntu-latest
needs:
- build
- build-windows
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -96,6 +116,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- build
- build-windows
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down Expand Up @@ -147,6 +168,7 @@ jobs:
name: '[Merge] Deploy docs website'
needs:
- build
- build-windows
- unit
- e2e
- docs
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/publish.yml

This file was deleted.

15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- beta
- main

permissions:
contents: read # for checkout
Expand Down Expand Up @@ -34,10 +35,10 @@ jobs:
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
- 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 --dry-run
2 changes: 1 addition & 1 deletion .node-version
@@ -1 +1 @@
18.17.1
18.19.1
61 changes: 60 additions & 1 deletion CHANGELOG.md
@@ -1,4 +1,63 @@
# [1.0.0](https://github.com/analogjs/analog/compare/1.0.0-rc.3...1.0.0) (2024-03-14)
## [1.0.2](https://github.com/analogjs/analog/compare/v1.0.1...v1.0.2) (2024-03-25)

### Bug Fixes

- **create-analog:** improve E2E testing for create-analog ([#955](https://github.com/analogjs/analog/issues/955)) ([72b039d](https://github.com/analogjs/analog/commit/72b039d2fc545f5181267de6296c23d3263ef185))
- **create-analog:** removing unused css ([#958](https://github.com/analogjs/analog/issues/958)) ([2f2bbbe](https://github.com/analogjs/analog/commit/2f2bbbeeceefb0f181c4298eea34d31a6c9f981b))
- **nx-plugin:** rename Vite config and correct Vitest version for Vitest schematic ([#965](https://github.com/analogjs/analog/issues/965)) ([dceb37e](https://github.com/analogjs/analog/commit/dceb37e37bb958c1d21a2797290b52a68f34993d))
- **vite-plugin-angular:** escape breaking characters for codespan ([#953](https://github.com/analogjs/analog/issues/953)) ([bd87e70](https://github.com/analogjs/analog/commit/bd87e708f3d298d2854ad86e69572f5e7c7200b6))
- **vite-plugin-angular:** plugin causing build failures in version migration ([#961](https://github.com/analogjs/analog/issues/961)) ([e020700](https://github.com/analogjs/analog/commit/e020700baf2cc3511e5b7721de1dc095760b9ea4))
- **vite-plugin-angular:** remove numbers from beginning of file name selector ([#952](https://github.com/analogjs/analog/issues/952)) ([528a5d8](https://github.com/analogjs/analog/commit/528a5d8963b1d2a14e5728fae87e2456fb85c5cc))
- **vite-plugin-nitro:** resolve internal runtime files on Windows and add Windows build workflow ([#949](https://github.com/analogjs/analog/issues/949)) ([cf5886a](https://github.com/analogjs/analog/commit/cf5886ad7634093817e18582d8a7dd2b6a5d37dc))

## [1.0.1](https://github.com/analogjs/analog/compare/v1.1.0-beta.1...v1.0.1) (2024-03-19)

### Bug Fixes

- **create-analog:** fixes postcss.config.cjs issue ([#943](https://github.com/analogjs/analog/issues/943)) ([07b2687](https://github.com/analogjs/analog/commit/07b26875823614a9b4a6e3676b9a76b105c8cdda)), closes [#941](https://github.com/analogjs/analog/issues/941)

# [1.1.0-beta.1](https://github.com/analogjs/analog/compare/v1.0.0...v1.1.0-beta.1) (2024-03-15)

# [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))

# [1.0.0](https://github.com/analogjs/analog/compare/1.0.0...v1.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)

Expand Down
8 changes: 7 additions & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

<!-- prettier-ignore-start -->
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-83-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-87-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<!-- prettier-ignore-end -->

Expand Down Expand Up @@ -194,6 +194,12 @@ Thanks goes to these wonderful people for contributing to Analog ([emoji key](ht
<td align="center" valign="top" width="14.28%"><a href="https://alexfriesen.net/"><img src="https://avatars.githubusercontent.com/u/1307706?v=4?s=100" width="100px;" alt="Alex"/><br /><sub><b>Alex</b></sub></a><br /><a href="#infra-alexfriesen" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/analogjs/analog/commits?author=alexfriesen" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/duluca"><img src="https://avatars.githubusercontent.com/u/822159?v=4?s=100" width="100px;" alt="Doguhan Uluca"/><br /><sub><b>Doguhan Uluca</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=duluca" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nckirik"><img src="https://avatars.githubusercontent.com/u/53273233?v=4?s=100" width="100px;" alt="N. Can KIRIK"/><br /><sub><b>N. Can KIRIK</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=nckirik" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ShPelles"><img src="https://avatars.githubusercontent.com/u/43875468?v=4?s=100" width="100px;" alt="ShPelles"/><br /><sub><b>ShPelles</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=ShPelles" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://pavankjadda.dev"><img src="https://avatars.githubusercontent.com/u/17564080?v=4?s=100" width="100px;" alt="Pavan Kumar Jadda"/><br /><sub><b>Pavan Kumar Jadda</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=pavankjadda" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://monacodelisa.com/"><img src="https://avatars.githubusercontent.com/u/64324417?v=4?s=100" width="100px;" alt="Esther White"/><br /><sub><b>Esther White</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=monacodelisa" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Micha-Richter"><img src="https://avatars.githubusercontent.com/u/12509902?v=4?s=100" width="100px;" alt="Michael Richter"/><br /><sub><b>Michael Richter</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=Micha-Richter" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
43 changes: 25 additions & 18 deletions apps/create-analog-e2e/tests/create-analog.spec.ts
@@ -1,9 +1,8 @@
import { checkFilesExist, uniq, runCommandAsync } from '@nx/plugin/testing';
import { readFileSync, writeFileSync, rmdirSync } from 'node:fs';
import fs from 'node:fs';
import path from 'node:path';
import * as fs from 'node:fs';
import * as path from 'node:path';

function copy(src, dest) {
function copy(src: string, dest: string) {
const stat = fs.statSync(src);
if (stat.isDirectory()) {
copyDir(src, dest);
Expand All @@ -16,7 +15,7 @@ function copy(src, dest) {
* @param {string} srcDir
* @param {string} destDir
*/
function copyDir(srcDir, destDir) {
function copyDir(srcDir: string, destDir: string) {
fs.mkdirSync(destDir, { recursive: true });
for (const file of fs.readdirSync(srcDir)) {
const srcFile = path.resolve(srcDir, file);
Expand All @@ -25,7 +24,7 @@ function copyDir(srcDir, destDir) {
}
}

function emptyDir(dir) {
function emptyDir(dir: string) {
if (!fs.existsSync(dir)) {
return;
}
Expand All @@ -40,11 +39,15 @@ describe('create-analog e2e', () => {
const tmpDir = `${process.cwd()}/${project}`;

await runCommandAsync(
`node ./dist/packages/create-analog/index.js ${project} --template angular-v17 --skipTailwind true`,
`node ./dist/packages/create-analog/index.js ${project} --template angular-v17 --skipTailwind`,
{ cwd: process.cwd() }
);

await runCommandAsync(`npm i --legacy-peer-deps`, {
await runCommandAsync(`pnpm i`, {
cwd: tmpDir,
});

await runCommandAsync(`ng config cli.packageManager pnpm`, {
cwd: tmpDir,
});

Expand All @@ -55,21 +58,21 @@ describe('create-analog e2e', () => {
);

const angularJson = JSON.parse(
readFileSync(`${tmpDir}/angular.json`, 'utf-8')
fs.readFileSync(`${tmpDir}/angular.json`, 'utf-8')
);
angularJson.projects['my-app'].root = '.';
writeFileSync(
fs.writeFileSync(
`${tmpDir}/angular.json`,
JSON.stringify(angularJson, null, 2)
);

let viteConfig = readFileSync(`${tmpDir}/vite.config.ts`, 'utf-8');
let viteConfig = fs.readFileSync(`${tmpDir}/vite.config.ts`, 'utf-8');
viteConfig = viteConfig.replace(
'analog()',
`analog({ vite: { tsconfig: '${tmpDir}/tsconfig.spec.json' } })`
);

writeFileSync(`${tmpDir}/vite.config.ts`, viteConfig);
fs.writeFileSync(`${tmpDir}/vite.config.ts`, viteConfig);

await runCommandAsync(`vitest --no-watch`, {
cwd: tmpDir,
Expand All @@ -83,19 +86,23 @@ describe('create-analog e2e', () => {
checkFilesExist(`${tmpDir}/dist/analog/public/index.html`)
).not.toThrow();

rmdirSync(tmpDir, { recursive: true });
fs.rmdirSync(tmpDir, { recursive: true });
}, 120000);

it('should create my-app with the next release', async () => {
const project = uniq('tmpanalogapp');
const tmpDir = `${process.cwd()}/${project}`;

await runCommandAsync(
`node ./dist/packages/create-analog/index.js ${project} --template angular-v17 --skipTailwind true`,
`node ./dist/packages/create-analog/index.js ${project} --template angular-v17 --skipTailwind`,
{ cwd: process.cwd() }
);

await runCommandAsync(`npm i --legacy-peer-deps`, {
await runCommandAsync(`pnpm i`, {
cwd: tmpDir,
});

await runCommandAsync(`ng config cli.packageManager pnpm`, {
cwd: tmpDir,
});

Expand All @@ -112,13 +119,13 @@ describe('create-analog e2e', () => {
`${tmpDir}/node_modules/@analogjs`
);

let viteConfig = readFileSync(`${tmpDir}/vite.config.ts`, 'utf-8');
let viteConfig = fs.readFileSync(`${tmpDir}/vite.config.ts`, 'utf-8');
viteConfig = viteConfig.replace(
'analog()',
`analog({ vite: { tsconfig: '${tmpDir}/tsconfig.spec.json' } })`
);

writeFileSync(`${tmpDir}/vite.config.ts`, viteConfig);
fs.writeFileSync(`${tmpDir}/vite.config.ts`, viteConfig);

await runCommandAsync(`vitest --no-watch`, {
cwd: tmpDir,
Expand All @@ -132,6 +139,6 @@ describe('create-analog e2e', () => {
checkFilesExist(`${tmpDir}/dist/analog/public/index.html`)
).not.toThrow();

rmdirSync(tmpDir, { recursive: true });
fs.rmdirSync(tmpDir, { recursive: true });
}, 120000);
});

0 comments on commit 1f75be1

Please sign in to comment.