Skip to content

Commit 81ad8ec

Browse files
committed
bump: 2.2.0
fix: last bump
1 parent 783acbc commit 81ad8ec

10 files changed

+31
-33
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Describe the bug**

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
---
22
name: Custom issue template
33
about: Describe this issue template's purpose here.
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
9-
10-

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/workflows/typescript-pr-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
node-version: 20
2222
registry-url: https://registry.npmjs.org/
23-
cache: 'npm'
23+
cache: "npm"
2424

2525
- name: Install dependencies
2626
run: yarn install

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,24 @@ The multiform-validator is a powerful Multilanguage library for validating form
55
## How to Contribute
66

77
1. **Fork the Repository**
8+
89
- Fork the multiform-validator repository to your GitHub account.
910

1011
2. **Clone the Repository**
1112
- Clone the forked repository to your local environment:
1213
```
1314
git clone https://github.com/gabriel-logan/multiform-validator.git
1415
```
15-
16-
4. **Commit and Push**
16+
3. **Commit and Push**
17+
1718
- Commit your changes and push them to the forked repository:
1819
```
1920
git add .
2021
git commit -m "Concise description of the changes"
2122
git push origin my-feature
2223
```
2324
24-
5. **Open a Pull Request (PR)**
25+
4. **Open a Pull Request (PR)**
2526
- Go to the forked repository on GitHub and open a PR to the main branch of the project.
2627
2728
## Contribution Guidelines

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,27 @@ Feel free to find bugs and report them to me. Your feedback is highly appreciate
1818
jsDelivr:
1919

2020
```bash
21-
https://cdn.jsdelivr.net/npm/multiform-validator@2.1.9/dist/index.min.js
21+
https://cdn.jsdelivr.net/npm/multiform-validator@2.2.0/dist/cjs/index.min.js
2222
```
2323

2424
```html
25-
<script src="https://cdn.jsdelivr.net/npm/multiform-validator@2.1.9/dist/index.min.js"></script>
25+
<script src="https://cdn.jsdelivr.net/npm/multiform-validator@2.2.0/dist/cjs/index.min.js"></script>
2626
```
2727

2828
unpkg:
2929

3030
```bash
31-
https://unpkg.com/multiform-validator@2.1.9/dist/index.js
31+
https://unpkg.com/multiform-validator@2.2.0/dist/cjs/index.js
3232
```
3333

3434
```html
35-
<script src="https://unpkg.com/multiform-validator@2.1.9/dist/index.js"></script>
35+
<script src="https://unpkg.com/multiform-validator@2.2.0/dist/cjs/index.js"></script>
3636
```
3737

3838
### Example of use with CDN
3939

4040
```html
41-
<script src="https://cdn.jsdelivr.net/npm/multiform-validator@2.1.9/dist/index.min.js"></script>
41+
<script src="https://cdn.jsdelivr.net/npm/multiform-validator@2.2.0/dist/cjs/index.min.js"></script>
4242
<script>
4343
const emailResult = isEmail("123456");
4444
const cpfResult = cpfIsValid("123456");

index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
12
import cpfIsValid from "./src/cpfValidator";
23
import cnpjIsValid from "./src/cnpjValidator";
34
import getOnlyEmail from "./src/getOnlyEmail";

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "multiform-validator",
3-
"version": "2.1.9",
3+
"version": "2.2.0",
44
"description": "Javascript library made to validate, several form fields, such as: email, images, phone, password, cpf etc.",
5-
"main": "./dist/index.js",
5+
"main": "./dist/cjs/index.js",
66
"types": "./types/index.d.ts",
7-
"module": "./dist/index.mjs",
8-
"unpkg": "./dist/index.js",
7+
"module": "./dist/esm/index.js",
8+
"unpkg": "./dist/cjs/index.js",
99
"scripts": {
1010
"test": "jest --coverage",
1111
"test:file": "jest tests/src/isDecimal.test --watch",
1212
"test:watch": "jest --watch",
1313
"build:types": "tsc -p tsconfig.types.json",
14-
"build:src": "tsup index.ts --format esm",
14+
"build:src": "npx tsup index.ts --format esm --legacy-output",
1515
"build:browser": "webpack",
1616
"build": "yarn build:types && yarn build:src && yarn build:browser",
1717
"lint": "eslint . --ext .ts",

tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
2626

2727
/* Modules */
28-
"module": "commonjs" /* Specify what module code is generated. */,
28+
"module": "ES6" /* Specify what module code is generated. */,
2929
// "rootDir": "./src", /* Specify the root folder within your source files. */
3030
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
3131
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
@@ -55,7 +55,7 @@
5555
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
5656
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
5757
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
58-
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
58+
"outDir": "./dist/esm/" /* Specify an output folder for all emitted files. */,
5959
"removeComments": true /* Disable emitting comments. */,
6060
// "noEmit": true, /* Disable emitting files from a compilation. */
6161
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
@@ -104,7 +104,8 @@
104104

105105
/* Completeness */
106106
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
107-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
107+
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
108+
"moduleResolution": "node",
108109
},
109110
"include": ["src/**/*", "index.ts", ".eslintrc.js"]
110111
}

webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const commonjsWebpackConfig = {
44
mode: "production", // production mode
55
entry: "./index.ts", // entry point of your application
66
output: {
7-
filename: "index.js", // output file name
7+
filename: "cjs/index.js", // output file name
88
path: path.resolve(__dirname, "dist"), // output folder
99
libraryTarget: "umd", // this allows your module to be used via require() and as a global
1010
globalObject: "this", // this ensures that 'this' is 'window' in a browser environment
@@ -21,6 +21,6 @@ const commonjsWebpackConfig = {
2121
resolve: {
2222
extensions: [".ts"],
2323
},
24-
}
24+
};
2525

2626
module.exports = [commonjsWebpackConfig]; // export the webpack config

0 commit comments

Comments
 (0)