Skip to content

Commit

Permalink
v2.0.1: Update Typescript definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmhtr committed Aug 23, 2021
2 parents 0936069 + 1463c6c commit fd683f5
Show file tree
Hide file tree
Showing 8 changed files with 331 additions and 305 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

## [2.0.1] - 2021-08-23
### Fixed
- Update TS definition file

## [2.0.0] - 2021-06-12
### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Añade el siguiente script a tu proyecto:
<script src="https://cdn.jsdelivr.net/gh/manuelmhtr/validate-rfc@latest/dist/index.js" type="text/javascript"></script>

<!-- O especifica una versión -->
<script src="https://cdn.jsdelivr.net/gh/manuelmhtr/[email protected].0/dist/index.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/gh/manuelmhtr/[email protected].1/dist/index.js" type="text/javascript"></script>

<!-- Esto va a exportar una función "validateRfc": -->
<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "validate-rfc",
"version": "2.0.0",
"version": "2.0.1",
"description": "A simple library to validate mexican RFCs",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -37,16 +37,16 @@
"bail": true
},
"devDependencies": {
"@babel/cli": "^7.14.5",
"@babel/core": "^7.14.5",
"@babel/preset-env": "^7.14.5",
"@babel/cli": "^7.14.8",
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-json": "^4.1.0",
"chai": "^4.3.4",
"mocha": "^9.0.0",
"rollup": "^2.51.2",
"rollup-plugin-uglify": "^6.0.4"
"mocha": "^9.1.0",
"rollup": "^2.56.3",
"rollup-plugin-terser": "^7.0.2"
},
"dependencies": {}
}
4 changes: 2 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import babel from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import { uglify } from "rollup-plugin-uglify";
import { terser } from 'rollup-plugin-terser';

export default {
input: 'src/index.js',
Expand All @@ -18,6 +18,6 @@ export default {
babelHelpers: 'bundled',
presets: ['@babel/env']
}),
uglify()
terser()
],
};
4 changes: 2 additions & 2 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default function validateRfc(rfc: string, options?: { strict?: boolean }): {
export default function validateRfc<T extends string>(rfc: T, options?: { omitVerificationDigit?: boolean }): {
isValid: boolean,
type?: 'company' | 'person' | 'foreign' | 'generic',
rfc?: string,
rfc?: T,
errors?: ('INVALID_FORMAT' | 'INVALID_DATE' | 'INVALID_VERIFICATION_DIGIT' | 'FORBIDDEN_WORD')[]
};
Loading

0 comments on commit fd683f5

Please sign in to comment.