Skip to content

Commit fcfda6f

Browse files
docs: add comprehensive changelog and update README
- Add CHANGELOG.md following Keep a Changelog format - Document all changes from v0.1.0 to v0.2.0 - Update README.md with better documentation - Add usage examples and feature highlights - Include emojis for better visual organization - Reference changelog from README
1 parent cb1adc5 commit fcfda6f

2 files changed

Lines changed: 115 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.2.0] - 2025-10-28
11+
12+
### Added
13+
- **New Operation**: "Get State by Code" - Get detailed information about a specific state/province
14+
- Uses `State.getStateByCodeAndCountry(stateCode, countryCode)` method
15+
- Returns state name, ISO code, country code, latitude, and longitude
16+
- Examples: California (US,CA), São Paulo (BR,SP), Ontario (CA,ON)
17+
18+
### Changed
19+
- **Enhanced UI/UX**: Improved operation descriptions and field labels
20+
- **Better placeholders**: Added helpful examples for Country Code (`"e.g., US, BR, CA"`) and State Code (`"e.g., CA, NY, SP"`)
21+
- **Detailed descriptions**: Each operation now includes clear, descriptive help text
22+
23+
### Technical
24+
- Updated TypeScript compilation targets
25+
- Improved error handling and validation
26+
- Enhanced code documentation
27+
28+
## [0.1.0] - 2025-10-28
29+
30+
### Added
31+
- **Initial release** of n8n Country State City node
32+
- **Core Operations**:
33+
- `Get Country by Code` - Retrieve country details by ISO code
34+
- `Get States by Country` - List all states/provinces in a country
35+
- `Get Cities by State` - List all cities in a state/province
36+
- **Features**:
37+
- Built for n8n workflow automation platform
38+
- Uses offline `country-state-city` library v3.1.2
39+
- No API keys required - works completely offline
40+
- Fast, reliable geographical data access
41+
- Support for all ISO country codes and state codes
42+
43+
### Technical
44+
- TypeScript implementation with proper type definitions
45+
- CommonJS module support for n8n compatibility
46+
- Proper n8n node structure following community standards
47+
- Comprehensive error handling and input validation
48+
- Complete build pipeline with TypeScript compilation
49+
50+
### Fixed
51+
- **Node loading issues**: Fixed "Class could not be found" error
52+
- **Export structure**: Changed from `export default` to named exports
53+
- **Package configuration**: Updated package.json to follow n8n-nodes-starter pattern
54+
- **Dependencies**: Configured proper peer dependencies for n8n-workflow
55+
- **Imports**: Fixed country-state-city library imports for CommonJS compatibility
56+
57+
## [Links]
58+
- [0.2.0]: https://github.com/mimirtechco/n8n-nodes-country-state-city/releases/tag/v0.2.0
59+
- [0.1.0]: https://github.com/mimirtechco/n8n-nodes-country-state-city/releases/tag/v0.1.0
60+
- [Unreleased]: https://github.com/mimirtechco/n8n-nodes-country-state-city/compare/v0.2.0...HEAD

README.md

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,63 @@ Este é um pacote de node n8n que fornece funcionalidade para consultar informa
66

77
Siga as instruções na [documentação do n8n](https://docs.n8n.io/integrations/community-nodes/installation/) para instalar nodes da comunidade.
88

9+
```bash
10+
npm install n8n-nodes-country-state-city
11+
```
12+
913
## Operações
1014

11-
* **Get Country by Code**: Retorna os detalhes de um país com base no seu código ISO 2.
12-
* **Get States by Country**: Retorna uma lista de todos os estados/províncias de um determinado país.
13-
* **Get Cities by State**: Retorna uma lista de todas as cidades de um determinado estado/província.
15+
### 🌍 Get Country by Code
16+
Retorna os detalhes de um país com base no seu código ISO 2.
17+
- **Input**: Country Code (ex: `US`, `BR`, `CA`)
18+
- **Output**: Nome, código ISO, coordenadas, etc.
19+
20+
### 🏛️ Get States by Country
21+
Retorna uma lista de todos os estados/províncias de um determinado país.
22+
- **Input**: Country Code (ex: `US`, `BR`, `CA`)
23+
- **Output**: Array com todos os estados/províncias
24+
25+
### 🏢 Get State by Code
26+
Retorna informações detalhadas de um estado específico.
27+
- **Input**: Country Code + State Code (ex: `US` + `CA`, `BR` + `SP`)
28+
- **Output**: Nome do estado, código ISO, coordenadas, etc.
29+
30+
### 🏙️ Get Cities by State
31+
Retorna uma lista de todas as cidades de um determinado estado/província.
32+
- **Input**: Country Code + State Code (ex: `US` + `CA`)
33+
- **Output**: Array com todas as cidades
34+
35+
## Características
36+
37+
-**Sem API Keys**: Funciona completamente offline
38+
-**Rápido e Confiável**: Base de dados local, sem dependência de internet
39+
-**Dados Atualizados**: Usa a biblioteca country-state-city mantida ativamente
40+
-**Fácil de Usar**: Interface intuitiva no n8n
41+
-**Completo**: Suporte a todos os códigos ISO de países e estados
42+
43+
## Exemplos de Uso
44+
45+
### Obter informações do Brasil
46+
- Operation: `Get Country by Code`
47+
- Country Code: `BR`
48+
49+
### Listar estados do Brasil
50+
- Operation: `Get States by Country`
51+
- Country Code: `BR`
52+
53+
### Obter informações de São Paulo
54+
- Operation: `Get State by Code`
55+
- Country Code: `BR`
56+
- State Code: `SP`
57+
58+
### Listar cidades de São Paulo
59+
- Operation: `Get Cities by State`
60+
- Country Code: `BR`
61+
- State Code: `SP`
62+
63+
## Changelog
64+
65+
Veja [CHANGELOG.md](CHANGELOG.md) para o histórico completo de mudanças.
1466

1567
## Licença
1668

0 commit comments

Comments
 (0)