Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move library structure to single entry-point dynamical loading #149

Merged
merged 35 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f81e6d5
General improvements (#108)
TylerVigario Jun 4, 2023
0c8dc34
Bump version to 1.16.2 (#110)
TylerVigario Jun 4, 2023
5c14006
Add CommonJS & Web testing (#111)
TylerVigario Jun 5, 2023
8e767ac
Add typings (#112)
TylerVigario Jun 7, 2023
98ac953
Bump to v1.16.3 (#113)
TylerVigario Jun 7, 2023
38774da
Fix issue with typings (#114)
TylerVigario Jun 7, 2023
0044cc2
General improvements (#115)
TylerVigario Jun 13, 2023
d69244d
Convert `ar` to BigInt (#116)
TylerVigario Jun 16, 2023
7718216
Expose `feminine` option in `ar` (#118)
TylerVigario Jun 22, 2023
e5cf3e7
Update dependencies & add some code documentation (#120)
TylerVigario Jul 1, 2023
ab74750
Resolve vulnerabilities (#121)
TylerVigario Jul 11, 2023
77b3cbe
Bump dependencies & fix extra zero (#125)
TylerVigario Aug 27, 2023
4ecab65
Bump to v1.16.5
forzagreen Aug 28, 2023
ced2d10
Bump to v1.17.0
forzagreen Aug 28, 2023
743fdf6
feat: add support for fr-BE (#126)
victortaleb Sep 15, 2023
fffa96f
Bump to v1.18.0
forzagreen Sep 15, 2023
1b0c0db
Bump dependencies (#128)
TylerVigario Oct 11, 2023
4359c97
Bump dependencies & requirements (#129)
TylerVigario Dec 20, 2023
e21496d
Bump dependencies (#130)
TylerVigario Feb 8, 2024
0ec8d63
Bump to 1.19 (#131)
TylerVigario Feb 8, 2024
5092172
Bump package-lock and switch to nodenext for typings generation (#132)
TylerVigario Feb 10, 2024
ab47694
Fix issue with extra leading zeros if decimal portion had zeros in va…
TylerVigario Feb 17, 2024
cca276e
Improvements to AbstractLanguage comments and logic (#135)
TylerVigario Feb 18, 2024
ec37966
Add bigint to code doc & bump version (#136)
TylerVigario Feb 18, 2024
ee45900
Fix: fix & improve AR (#137)
forzagreen Apr 14, 2024
0e606b7
Bump to 1.20.0 (#138)
forzagreen Apr 14, 2024
0e7bc54
Node 22, bump dependencies, & ESLint upgrade (#139)
TylerVigario Apr 27, 2024
c51e5f3
ESLint pass (#140)
TylerVigario May 9, 2024
0defd3c
Small fixes (#142)
TylerVigario May 10, 2024
8cb059f
ESLint second pass (#143)
TylerVigario May 21, 2024
b9f343b
Allow selecting individual languages for jsDelivr (#144)
TylerVigario Jun 15, 2024
2c92495
Drop Node 21 & benchmark workflow (#145)
TylerVigario Jun 15, 2024
ead471c
Bump to v1.21 (#146)
TylerVigario Jun 15, 2024
47d0393
Lint markdown & bump dependencies (#147)
TylerVigario Jul 4, 2024
6bccd3a
Improvements to local scripts and generated code docs (#148)
TylerVigario Jul 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 0 additions & 86 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Automatically convert to native line endings
# Automatically convert to native line endings, in case people don't have core.autocrlf set
* text=auto

# Force Unix (LF) line endings
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/benchmark.yml

This file was deleted.

28 changes: 15 additions & 13 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js v19
uses: actions/setup-node@v3
with:
node-version: 19
registry-url: 'https://registry.npmjs.org'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'

- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm ci
- run: npm run build
- run: npm run build:types

- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
63 changes: 35 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,51 @@
name: Test

on: [push, pull_request]
on:
push:
tags-ignore:
- v*
pull_request:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node: [16, 18, 19, 20]
node: [18, 20, 22]

steps:
- uses: actions/checkout@v3

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm run coverage

- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{ matrix.node }}
parallel: true

- run: npm publish --dry-run
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm run coverage

- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{ matrix.node }}
parallel: true

- run: npm publish --dry-run

finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: '18,20,22'
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
dist
dist/

# Generated typing files
*.d.ts

# Logs
logs
Expand Down Expand Up @@ -60,7 +63,10 @@ typings/
.env

# next.js build output
.next
.next/

# VSCode project config
.vscode
.vscode/

# JSDoc
docs/
3 changes: 3 additions & 0 deletions .markdownlint.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
line_length: false,
};
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2023 Wael TELLAT
Copyright (c) 2018-2024 Wael TELLAT

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Coverage Status](https://coveralls.io/repos/github/forzagreen/n2words/badge.svg?branch=master)](https://coveralls.io/github/forzagreen/n2words?branch=master)
[![npm](https://img.shields.io/npm/v/n2words.svg)](https://npmjs.com/package/n2words)
[![npm](https://img.shields.io/npm/dw/n2words)](https://npmjs.com/package/n2words)
[![](https://data.jsdelivr.com/v1/package/npm/n2words/badge)](https://www.jsdelivr.com/package/npm/n2words)
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/n2words/badge)](https://www.jsdelivr.com/package/npm/n2words)

__n2words__ converts numerical numbers into written ones, supports [27 languages](https://github.com/forzagreen/n2words#supported-languages), and has zero dependencies.

Expand Down Expand Up @@ -38,9 +38,8 @@ import n2words from 'n2words'
### CommonJS ([dynamic import](https://nodejs.org/api/esm.html#import-expressions))

```js
import('n2words').then(n2words => {
// Available via "default" method
n2words.default(100)
import('n2words').then(({default: n2words}) => {
n2words(100)
})
```

Expand All @@ -65,6 +64,7 @@ n2words is also available on [jsDelivr](https://www.jsdelivr.com/package/npm/n2w
- `de` (German)
- `es` (Spanish)
- `fr` (French)
- `fr-BE` (French (Belgium))
- `fa` (Farsi)
- `he` (Hebrew)
- `hr` (Croatian)
Expand All @@ -87,7 +87,7 @@ n2words is also available on [jsDelivr](https://www.jsdelivr.com/package/npm/n2w

## Contributing

__This library is in active development.__ We are looking to improve the design and process for language contributors and to add more languages. Bug reports and feature requests are also extremely helpful!
__This library is in active development.__ We want to improve the design and process for language contributors and add more languages. Bug reports and feature requests are also beneficial!

## License

Expand Down
Loading
Loading