Skip to content

Commit 7799a36

Browse files
Merge pull request #92 from smarty/max/esmodules
Max/esmodules
2 parents 79833f7 + 3a8c81f commit 7799a36

File tree

10 files changed

+3842
-1486
lines changed

10 files changed

+3842
-1486
lines changed

.github/workflows/node-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
node-version: [14.x, 16.x, 18.x, 20.x]
16+
node-version: [16.x, 18.x, 20.x]
1717

1818
steps:
1919
- uses: actions/checkout@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ __MACOSX
44
/.idea/
55
/node_modules/
66
/dist/
7+
.env

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ test: node_modules
1010
node_modules:
1111
npm install
1212

13-
publish: test version upload unversion
13+
build:
14+
npm run build
15+
16+
publish: test version build upload unversion
1417
tagit -p
1518
git push origin --tags
1619

index.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

index.mjs

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/**
2+
* this files is the entry point for rollup to bundle the library
3+
* it exports all the classes and functions as named exports
4+
*/
5+
import Batch from "./src/Batch.js";
6+
import ClientBuilder from "./src/ClientBuilder.js";
7+
import buildClient from "./src/util/buildClients.js";
8+
import SharedCredentials from "./src/SharedCredentials.js";
9+
import StaticCredentials from "./src/StaticCredentials.js";
10+
import Errors from "./src/Errors.js";
11+
12+
import LookupUSStreet from "./src/us_street/Lookup.js";
13+
import CandidateUSStreet from "./src/us_street/Candidate.js";
14+
15+
import LookupUSZipcode from "./src/us_zipcode/Lookup.js";
16+
import ResultUSZipcode from "./src/us_zipcode/Result.js";
17+
18+
import LookupUSAutocompletePro from "./src/us_autocomplete_pro/Lookup.js";
19+
import SuggestionUSAutocompletePro from "./src/us_autocomplete_pro/Suggestion.js";
20+
21+
import LookupUSExtract from "./src/us_extract/Lookup.js";
22+
import ResultUSExtract from "./src/us_extract/Result.js";
23+
24+
import LookupInternationalStreet from "./src/international_street/Lookup.js";
25+
import CandidateInternationalStreet from "./src/international_street/Candidate.js";
26+
27+
import LookupUSReverseGeo from "./src/us_reverse_geo/Lookup.js";
28+
29+
import LookupInternationalAddressAutocomplete from "./src/international_address_autocomplete/Lookup.js";
30+
import SuggestionInternationalAddressAutocomplete from "./src/international_address_autocomplete/Suggestion.js";
31+
32+
import LookupUSEnrichment from "./src/us_enrichment/Lookup.js";
33+
import ResponseUSEnrichment from "./src/us_enrichment/Response.js";
34+
35+
export const core = {
36+
Batch,
37+
ClientBuilder,
38+
buildClient,
39+
SharedCredentials,
40+
StaticCredentials,
41+
Errors,
42+
};
43+
44+
export const usStreet = {
45+
Lookup: LookupUSStreet,
46+
Candidate: CandidateUSStreet,
47+
};
48+
49+
export const usZipcode = {
50+
Lookup: LookupUSZipcode,
51+
Result: ResultUSZipcode,
52+
};
53+
54+
export const usAutocompletePro = {
55+
Lookup: LookupUSAutocompletePro,
56+
Suggestion: SuggestionUSAutocompletePro,
57+
};
58+
59+
export const usExtract = {
60+
Lookup: LookupUSExtract,
61+
Result: ResultUSExtract,
62+
};
63+
64+
export const internationalStreet = {
65+
Lookup: LookupInternationalStreet,
66+
Candidate: CandidateInternationalStreet,
67+
};
68+
69+
export const usReverseGeo = {
70+
Lookup: LookupUSReverseGeo,
71+
};
72+
73+
export const internationalAddressAutocomplete = {
74+
Lookup: LookupInternationalAddressAutocomplete,
75+
Suggestion: SuggestionInternationalAddressAutocomplete,
76+
};
77+
78+
export const usEnrichment = {
79+
Lookup: LookupUSEnrichment,
80+
Response: ResponseUSEnrichment,
81+
};
82+
83+
export default {
84+
core,
85+
usStreet,
86+
usZipcode,
87+
usAutocompletePro,
88+
usExtract,
89+
internationalStreet,
90+
usReverseGeo,
91+
internationalAddressAutocomplete,
92+
usEnrichment,
93+
};

0 commit comments

Comments
 (0)