Skip to content

Commit 3885b57

Browse files
fix: correct package name from @nfe-io/sdk to nfe-io
The package published on npm is 'nfe-io' (not scoped), continuing the name from v2.0.0. Updated all documentation to reflect correct package name. Changes: ✅ README.md - all import examples and npm install commands ✅ CHANGELOG.md - migration examples and breaking changes section ✅ CONTRIBUTING.md - extension examples and package references ✅ AGENTS.md - project structure and package name references ✅ FILE_CONFIGURATION.md - import examples Correct usage: - npm install nfe-io - import { NfeClient } from 'nfe-io' Repository: https://github.com/nfe/client-nodejs NPM Package: https://www.npmjs.com/package/nfe-io Current version on npm: 2.0.0 Next version: 3.0.0
1 parent 9efd156 commit 3885b57

File tree

5 files changed

+29
-30
lines changed

5 files changed

+29
-30
lines changed

AGENTS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Keep this managed block so 'openspec update' can refresh the instructions.
6868
## 📁 Estrutura de Arquivos Obrigatória
6969

7070
```
71-
client-nodejs/ # @nfe-io/sdk - Core SDK
71+
client-nodejs/ # nfe-io - Core SDK
7272
├── openapi/
7373
│ ├── spec/
7474
│ │ └── nfe-api.json # ⚠️ SOURCE OF TRUTH - OpenAPI spec
@@ -164,7 +164,7 @@ EOF
164164

165165
cat > package.json << 'EOF'
166166
{
167-
"name": "@nfe-io/sdk",
167+
"name": "nfe-io",
168168
"version": "3.0.0-beta.1",
169169
"main": "./dist/index.js",
170170
"types": "./dist/index.d.ts",
@@ -405,7 +405,7 @@ npm run docs # Docs geradas
405405
### package.json Obrigatório
406406
```json
407407
{
408-
"name": "@nfe-io/sdk",
408+
"name": "nfe-io",
409409
"version": "3.0.0-beta.1",
410410
"description": "Official NFe.io SDK for Node.js 18+",
411411
"main": "./dist/index.js",
@@ -642,17 +642,17 @@ O SDK NFE.io v3 foi projetado para ser extensível. As seguintes extensões ofic
642642
**Model Context Protocol Server para integração com LLMs**
643643

644644
- Permite que LLMs (Claude, GPT, etc.) emitam notas fiscais via conversação natural
645-
- Implementa MCP tools usando `@nfe-io/sdk` internamente
645+
- Implementa MCP tools usando `nfe-io` internamente
646646
- Instale: `npm install @nfe-io/mcp-server`
647-
- Depende de: `@nfe-io/sdk` (peer dependency)
647+
- Depende de: `nfe-io` (peer dependency)
648648

649649
### [@nfe-io/n8n-nodes](https://github.com/nfe/n8n-nodes)
650650
**Custom nodes n8n para automação de workflows**
651651

652652
- Permite automação de emissão de notas fiscais em workflows n8n
653653
- Nodes para ServiceInvoices, Companies, Webhooks
654654
- Instale via n8n community nodes ou `npm install @nfe-io/n8n-nodes`
655-
- Depende de: `@nfe-io/sdk` (dependency)
655+
- Depende de: `nfe-io` (dependency)
656656

657657
### Criando Sua Própria Extensão
658658

CHANGELOG.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,14 @@ Version 3.0 is a complete rewrite of the NFE.io SDK with modern TypeScript, zero
8484
### Changed
8585

8686
#### Breaking Changes
87-
- **Package name** changed from `nfe-io` to `@nfe-io/sdk`
8887
- **Node.js requirement** increased from 12+ to 18+
8988
- **API initialization** now uses class constructor instead of factory function
9089
```javascript
9190
// v2
9291
var nfe = require('nfe-io')('api-key');
93-
92+
9493
// v3
95-
import { NfeClient } from '@nfe-io/sdk';
94+
import { NfeClient } from 'nfe-io';
9695
const nfe = new NfeClient({ apiKey: 'api-key' });
9796
```
9897
- **No callback support** - Only async/await and promises
@@ -134,7 +133,7 @@ See [MIGRATION.md](./MIGRATION.md) for detailed migration instructions.
134133

135134
**Quick checklist:**
136135
1. ✅ Upgrade to Node.js 18+
137-
2.Change package name: `npm install @nfe-io/sdk`
136+
2.Install the package: `npm install nfe-io`
138137
3. ✅ Update imports/requires
139138
4. ✅ Convert callbacks to async/await
140139
5. ✅ Update error handling to use error classes

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contribuindo para @nfe-io/sdk
1+
# Contribuindo para nfe-io SDK
22

33
Obrigado por seu interesse em contribuir para o SDK NFE.io! 🎉
44

@@ -117,7 +117,7 @@ O SDK NFE.io v3 é projetado para ser extensível. Se você quer criar uma exten
117117
```
118118
Sua Extensão
119119
↓ usa
120-
@nfe-io/sdk (este repositório)
120+
nfe-io (este repositório)
121121
↓ chama
122122
NFE.io API
123123
```
@@ -126,7 +126,7 @@ NFE.io API
126126

127127
```typescript
128128
// my-nfe-wrapper/src/index.ts
129-
import { NfeClient, type NfeConfig } from '@nfe-io/sdk';
129+
import { NfeClient, type NfeConfig } from 'nfe-io';
130130

131131
export class MyNfeWrapper {
132132
private client: NfeClient;
@@ -159,7 +159,7 @@ export class MyNfeWrapper {
159159
"name": "my-nfe-wrapper",
160160
"version": "1.0.0",
161161
"dependencies": {
162-
"@nfe-io/sdk": "^3.0.0"
162+
"nfe-io": "^3.0.0"
163163
}
164164
}
165165
```
@@ -169,7 +169,7 @@ export class MyNfeWrapper {
169169
1. **Repositório separado**: Crie um novo repositório para sua extensão
170170
2. **Naming**: Use prefixo como `nfe-*` ou `@yourscope/nfe-*`
171171
3. **Documentação**: README explicando o propósito e uso
172-
4. **Peer dependency**: Use `@nfe-io/sdk` como peer ou dependency
172+
4. **Peer dependency**: Use `nfe-io` como peer ou dependency
173173

174174
---
175175

@@ -182,7 +182,7 @@ Extensões mantidas pela equipe NFE.io:
182182

183183
```typescript
184184
// Como a extensão usa o SDK internamente
185-
import { NfeClient } from '@nfe-io/sdk';
185+
import { NfeClient } from 'nfe-io';
186186

187187
export class NfeMcpServer {
188188
private sdk: NfeClient;
@@ -206,7 +206,7 @@ export class NfeMcpServer {
206206

207207
```typescript
208208
// Como o n8n node usa o SDK
209-
import { NfeClient } from '@nfe-io/sdk';
209+
import { NfeClient } from 'nfe-io';
210210
import { IExecuteFunctions } from 'n8n-core';
211211

212212
export class NfeIoNode {
@@ -252,10 +252,10 @@ import {
252252
type Company,
253253
NfeError,
254254
AuthenticationError
255-
} from '@nfe-io/sdk';
255+
} from 'nfe-io';
256256

257257
// ❌ API Interna - NÃO use
258-
import { HttpClient } from '@nfe-io/sdk/dist/core/http/client';
258+
import { HttpClient } from 'nfe-io/dist/core/http/client';
259259
```
260260

261261
---

FILE_CONFIGURATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ cd ../test-project
116116
npm install ../client-nodejs/nfe-io-sdk-3.0.0.tgz
117117

118118
# 3. Verificar imports
119-
node --input-type=module --eval "import { NfeClient } from '@nfe-io/sdk'; console.log('OK');"
119+
node --input-type=module --eval "import { NfeClient } from 'nfe-io'; console.log('OK');"
120120
```
121121

122122
### Verificar arquivos ignorados pelo Git

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NFE.io SDK para Node.js (v3)
22

3-
[![npm version](https://img.shields.io/npm/v/@nfe-io/sdk.svg)](https://www.npmjs.com/package/@nfe-io/sdk)
4-
[![Node.js Version](https://img.shields.io/node/v/@nfe-io/sdk.svg)](https://nodejs.org)
3+
[![npm version](https://img.shields.io/npm/v/nfe-io.svg)](https://www.npmjs.com/package/nfe-io)
4+
[![Node.js Version](https://img.shields.io/node/v/nfe-io.svg)](https://nodejs.org)
55
[![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)](https://www.typescriptlang.org/)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
77

@@ -39,27 +39,27 @@
3939
- TypeScript >= 5.0 (se usar TypeScript)
4040

4141
```bash
42-
npm install @nfe-io/sdk
42+
npm install nfe-io
4343
```
4444

4545
ou
4646

4747
```bash
48-
yarn add @nfe-io/sdk
48+
yarn add nfe-io
4949
```
5050

5151
ou
5252

5353
```bash
54-
pnpm add @nfe-io/sdk
54+
pnpm add nfe-io
5555
```
5656

5757
## 🚀 Início Rápido
5858

5959
### Uso Básico (ESM)
6060

6161
```typescript
62-
import { NfeClient } from '@nfe-io/sdk';
62+
import { NfeClient } from 'nfe-io';
6363

6464
// Inicializar o cliente
6565
const nfe = new NfeClient({
@@ -110,7 +110,7 @@ console.log(`Nota fiscal criada: ${notaFiscal.number}`);
110110
### Uso com CommonJS
111111

112112
```javascript
113-
const { NfeClient } = require('@nfe-io/sdk');
113+
const { NfeClient } = require('nfe-io');
114114

115115
const nfe = new NfeClient({
116116
apiKey: process.env.NFE_API_KEY,
@@ -294,7 +294,7 @@ import {
294294
ValidationError,
295295
NotFoundError,
296296
RateLimitError
297-
} from '@nfe-io/sdk';
297+
} from 'nfe-io';
298298

299299
try {
300300
const notaFiscal = await nfe.serviceInvoices.create(empresaId, dados);
@@ -330,7 +330,7 @@ nfe.serviceInvoices.create('id-empresa', dados, function(err, notaFiscal) {
330330
});
331331

332332
// v3 (async/await + TypeScript)
333-
import { NfeClient } from '@nfe-io/sdk';
333+
import { NfeClient } from 'nfe-io';
334334
const nfe = new NfeClient({ apiKey: 'chave-api' });
335335

336336
try {
@@ -346,7 +346,7 @@ try {
346346
### Fluxo Completo de Emissão de Nota Fiscal
347347

348348
```typescript
349-
import { NfeClient } from '@nfe-io/sdk';
349+
import { NfeClient } from 'nfe-io';
350350

351351
const nfe = new NfeClient({
352352
apiKey: process.env.NFE_API_KEY!,

0 commit comments

Comments
 (0)