Skip to content

Commit

Permalink
feat(angular): build v18
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorrea97 committed Jun 24, 2024
1 parent b5168bb commit c1d1a0a
Show file tree
Hide file tree
Showing 109 changed files with 1,476 additions and 667 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\": \"🚀 **PR Criada com Sucesso 🚀**\\n- Autor: $AUTHOR\\n- Título: $PR_TITLE\\n- Link: $PR_URL\"}" \
$DISCORD_WEBHOOK_URL
lint:

runs-on: ubuntu-20.04
Expand All @@ -46,7 +46,7 @@ jobs:
node-version: 18

# Executa um comando do projeto na máquina virtual
- run: npm i
- run: npm i --force
- run: npm run format:check
- run: npm run lint:storage
- run: npm run lint:sync
Expand All @@ -67,7 +67,7 @@ jobs:
with:
node-version: 18

- run: npm i
- run: npm i --force
- run: npm run build
- run: npm run build:portal:docs
- run: npm run build:portal:prod
Expand All @@ -90,7 +90,7 @@ jobs:
with:
node-version: 18

- run: npm i
- run: npm i --force
- run: npm run test:ui
- run: npm run test:ui:schematics

Expand All @@ -107,7 +107,7 @@ jobs:
with:
node-version: 18

- run: npm i
- run: npm i --force
- run: npm run build:ui:lite
- run: npm run test:templates
- run: npm run test:templates:schematics
Expand All @@ -125,7 +125,7 @@ jobs:
with:
node-version: 18

- run: npm i
- run: npm i --force
- run: npm run test:code-editor
- run: npm run test:code-editor:schematics

Expand All @@ -142,7 +142,7 @@ jobs:
with:
node-version: 18

- run: npm i
- run: npm i --force
- run: npm run test:storage
- run: npm run test:storage:schematics

Expand All @@ -159,7 +159,7 @@ jobs:
with:
node-version: 18

- run: npm i
- run: npm i --force
- run: npm run build:storage:lite
- run: npm run test:sync
- run: npm run test:sync:schematics
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ Biblioteca de componentes de UI para Angular.

### Pré-requisitos

Para começar a utilizar o **PO UI** é pré-requisito ter o `Node.js` instalado (versão 18.13.x ou acima) e o seu gerenciador de pacote favorito na versão mais atual. Caso você ainda não tenha instalado o pacote `@angular/cli`, instale-o via `npm` ou `yarn`.
Para começar a utilizar o **PO UI** é pré-requisito ter o `Node.js` instalado (versão 18.19.x ou acima) e o seu gerenciador de pacote favorito na versão mais atual. Caso você ainda não tenha instalado o pacote `@angular/cli`, instale-o via `npm` ou `yarn`.

Instalando com npm:
```
npm i -g @angular/cli@17
npm i -g @angular/cli@18
```

Caso prefira instalar com o yarn:
```
yarn global add @angular/cli@17
yarn global add @angular/cli@18
```

### Passo 1 - Crie o seu primeiro projeto
Expand All @@ -52,26 +52,27 @@ Antes de executar a instalação ou inserir o **Po** no seu projeto existente,
Veja abaixo a lista de dependências e as versões compatíveis, elas devem ser conferidas e se necessário, ajustadas no seu projeto.

```
"dependencies": {
"@angular/animations": "~17.2.4",
"@angular/common": "~17.2.4",
"@angular/compiler": "~17.2.4",
"@angular/core": "~17.2.4",
"@angular/forms": "~17.2.4",
"@angular/platform-browser": "~17.2.4",
"@angular/platform-browser-dynamic": "~17.2.4",
"@angular/router": "~17.2.4",
"dependencies": {
"@angular/animations": "~18.0.1",
"@angular/common": "~18.0.1",
"@angular/compiler": "~18.0.1",
"@angular/core": "~18.0.1",
"@angular/forms": "~18.0.1",
"@angular/platform-browser": "~18.0.1",
"@angular/platform-browser-dynamic": "~18.0.1",
"@angular/router": "~18.0.1",
"rxjs": "~7.8.1",
"tslib": "^2.6.2",
"zone.js": "~0.14.4"
...
},
"devDependencies": {
"@angular-devkit/build-angular": "~17.2.3",
"@angular/cli": "~17.2.3",
"@angular/compiler-cli": "~17.2.4",
"@angular-devkit/build-angular": "~18.0.2",
"@angular-devkit/schematics": "~18.0.2",
"@angular/cli": "~18.0.2",
"@angular/compiler-cli": "~18.0.1",
...
"typescript": "~5.2.2"
"typescript": "~5.4.5"
}
```

Expand Down
6 changes: 3 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,13 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "2.1mb",
"maximumWarning": "2.4mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "8kb",
"maximumError": "10kb"
"maximumWarning": "10kb",
"maximumError": "12kb"
}
]
}
Expand Down
32 changes: 16 additions & 16 deletions docs/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

### Pré-requisitos

Para começar a utilizar o **PO UI** é pré-requisito ter o `Node.js` instalado (versão 18.13.x ou acima) e o seu gerenciador de pacote favorito na versão mais atual. Caso você ainda não tenha instalado o pacote `@angular/cli`, instale-o via `npm` ou `yarn`.
Para começar a utilizar o **PO UI** é pré-requisito ter o `Node.js` instalado (versão 18.19.x ou acima) e o seu gerenciador de pacote favorito na versão mais atual. Caso você ainda não tenha instalado o pacote `@angular/cli`, instale-o via `npm` ou `yarn`.

Instalando com npm:
```
npm i -g @angular/cli@17
npm i -g @angular/cli@18
```

Caso prefira instalar com o yarn:
```
yarn global add @angular/cli@17
yarn global add @angular/cli@18
```

### Passo 1 - Crie o seu primeiro projeto
Expand All @@ -36,26 +36,26 @@ Veja abaixo a lista de dependências e as versões compatíveis, elas devem ser

```
"dependencies": {
"@angular/animations": "~17.2.4",
"@angular/common": "~17.2.4",
"@angular/compiler": "~17.2.4",
"@angular/core": "~17.2.4",
"@angular/forms": "~17.2.4",
"@angular/platform-browser": "~17.2.4",
"@angular/platform-browser-dynamic": "~17.2.4",
"@angular/router": "~17.2.4",
"@angular/animations": "~18.0.1",
"@angular/common": "~18.0.1",
"@angular/compiler": "~18.0.1",
"@angular/core": "~18.0.1",
"@angular/forms": "~18.0.1",
"@angular/platform-browser": "~18.0.1",
"@angular/platform-browser-dynamic": "~18.0.1",
"@angular/router": "~18.0.1",
"rxjs": "~7.8.1",
"tslib": "^2.6.2",
"zone.js": "~0.14.4"
...
},
"devDependencies": {
"@angular-devkit/build-angular": "~17.2.3",
"@angular-devkit/schematics": "~17.2.3",
"@angular/cli": "~17.2.3",
"@angular/compiler-cli": "~17.2.4",
"@angular-devkit/build-angular": "~18.0.2",
"@angular-devkit/schematics": "~18.0.2",
"@angular/cli": "~18.0.2",
"@angular/compiler-cli": "~18.0.1",
...
"typescript": "~5.2.2"
"typescript": "~5.4.5"
}
```

Expand Down
3 changes: 2 additions & 1 deletion docs/guides/migration-poui.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ng update @angular/cli@<version> @angular/core@<version> --force
Por exemplo:

```
ng update @angular/cli@17 @angular/core@17 --force
ng update @angular/cli@18 @angular/core@18 --force
```

> Para realizar a migração completa e avaliar se não precisa fazer alguma alteração veja o [**Guia de Upgrade do Angular**](https://update.angular.io/).
Expand Down Expand Up @@ -76,6 +76,7 @@ O `ng update` ajudará nas alterações necessárias para seu projeto seguir atu
- `@po-ui/ng-sync`;
- `@po-ui/style`;

Além disso, será realizada uma pergunta para que o usuário decida se quer utilizar a nova biblioteca de ícones. Caso a escolha seja positiva, o processo de update irá substituir classes de ícones do po-ui pelas novas referências.

<a id="sync"></a>
### ng update @po-ui/ng-sync
Expand Down
5 changes: 5 additions & 0 deletions docs/guides/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ Consulte abaixo nossos guias de migração de versão para obter mais informaç
</tr>
</thead>
<tbody>
<tr class="po-table-row">
<td class="po-table-column">18.0.0</td>
<td class="po-table-column">18.0.0</td>
<td class="po-table-column"><a href="guides/migration-poui">Migração do PO UI</a></td>
</tr>
<tr class="po-table-row">
<td class="po-table-column">17.0.0</td>
<td class="po-table-column">17.0.0</td>
Expand Down
53 changes: 27 additions & 26 deletions docs/guides/sync-get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Para maiores detalhes sobre os serviços e métodos utilizados neste tutorial, c
- [Node.js e NPM](https://nodejs.org/en/)
- [Angular CLI](https://cli.angular.io/) (~17.2.2):
- ```shell
npm install -g @angular/cli@17
npm install -g @angular/cli@18
```
- [Ionic](https://ionicframework.com/docs/cli/) (^7.7.0):
- ```shell
npm install -g @ionic/cli@7
npm install -g @ionic/cli@8
```


Expand Down Expand Up @@ -49,31 +49,31 @@ Antes de executar a instalação, é necessário que todas as dependências do p
```typescript
...
"dependencies": {
"@angular/animations": "~17.2.4",
"@angular/common": "~17.2.4",
"@angular/core": "~17.2.4",
"@angular/forms": "~17.2.4",
"@angular/platform-browser": "~17.2.4",
"@angular/platform-browser-dynamic": "~17.2.4",
"@angular/router": "~17.2.4",
"@angular/service-worker": "~17.2.2",
"@ionic/angular": "^7.7.3",
"@capacitor/network": "^5.0.6",
"@capacitor/splash-screen": "^5.0.6",
"@angular/animations": "~18.0.1",
"@angular/common": "~18.0.1",
"@angular/core": "~18.0.1",
"@angular/forms": "~18.0.1",
"@angular/platform-browser": "~18.0.1",
"@angular/platform-browser-dynamic": "~18.0.1",
"@angular/router": "~18.0.1",
"@angular/service-worker": "~18.0.1",
"@ionic/angular": "^8.0.0",
"@capacitor/network": "^6.0.1",
"@capacitor/splash-screen": "^6.0.1",
"rxjs": "~7.8.1",
"tslib": "^2.6.2",
"zone.js": "~0.14.4"
...
},
"devDependencies": {
"@angular-devkit/build-angular": "~17.2.3",
"@angular-devkit/schematics": "~17.2.3",
"@angular/cli": "~17.2.3",
"@angular/compiler": "~17.2.4",
"@angular/compiler-cli": "~17.2.4",
"@angular/language-service": "~17.2.4",
"@ionic/angular-toolkit": "^10.0.0",
"typescript": "~5.2.2"
"@angular-devkit/build-angular": "~18.0.2",
"@angular-devkit/schematics": "~18.0.2",
"@angular/cli": "~18.0.2",
"@angular/compiler": "~18.0.1",
"@angular/compiler-cli": "~18.0.1",
"@angular/language-service": "~18.0.1",
"@ionic/angular-toolkit": "^11.0.1",
"typescript": "~5.4.5"
},
...
```
Expand Down Expand Up @@ -111,7 +111,6 @@ No arquivo `src/app/app.module.ts`, adicione a importação dos módulos do `po-
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { HttpClientModule } from '@angular/common/http';

import { IonicModule, IonicRouteStrategy } from '@ionic/angular';

Expand All @@ -120,6 +119,7 @@ import { PoSyncModule } from '@po-ui/ng-sync';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';

@NgModule({
declarations: [AppComponent],
Expand All @@ -128,12 +128,13 @@ import { AppComponent } from './app.component';
IonicModule.forRoot(),
AppRoutingModule,
PoStorageModule.forRoot(),
HttpClientModule,
PoSyncModule
PoSyncModule,
],
providers: [
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
bootstrap: [AppComponent]
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
provideHttpClient(withInterceptorsFromDi()),
],
bootstrap: [AppComponent],
})
export class AppModule {}
```
Expand Down
Loading

0 comments on commit c1d1a0a

Please sign in to comment.