temp-disposable-email 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -9
- package/README.md +8 -0
- package/package.json +4 -1
- package/playwright.config.ts +78 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# [1.10.0](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.9.0...v1.10.0) (2024-11-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add Playwright testing framework and configuration; update .gitignore and package files ([64911b1](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/64911b1a222c8000a3b94268c29e4ca9b495658b))
|
|
7
|
+
* update README with ES Modules and CommonJS usage examples; bump version to 1.8.0 and add Cypress test script ([e795bd3](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/e795bd3f9f736a4c237d00037c2528348eb01e05))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
1
11
|
# [1.9.0](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.8.0...v1.9.0) (2024-11-28)
|
|
2
12
|
|
|
3
13
|
|
|
@@ -39,12 +49,3 @@
|
|
|
39
49
|
|
|
40
50
|
|
|
41
51
|
|
|
42
|
-
## [1.6.2](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.6.1...v1.6.2) (2024-11-28)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
### Bug Fixes
|
|
46
|
-
|
|
47
|
-
* downgrade version to 1.6.0 in package-lock.json and update BASE_URL handling ([919c24e](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/919c24e563a7541f2a4163f79f49bd6e545f9dd6))
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
package/README.md
CHANGED
|
@@ -33,10 +33,18 @@ npm install temp-disposable-email
|
|
|
33
33
|
|
|
34
34
|
To use the package, import the functions in your TypeScript or JavaScript project:
|
|
35
35
|
|
|
36
|
+
#### Using ES Modules (Recommended)
|
|
37
|
+
|
|
36
38
|
```typescript
|
|
37
39
|
import { createInbox, getMessage, deleteAccount } from 'temp-disposable-email';
|
|
38
40
|
```
|
|
39
41
|
|
|
42
|
+
#### Using CommonJS
|
|
43
|
+
|
|
44
|
+
```javascript
|
|
45
|
+
import { createInbox, getMessage, deleteAccount } from 'temp-disposable-email';
|
|
46
|
+
```
|
|
47
|
+
|
|
40
48
|
### 2\. Create an Inbox
|
|
41
49
|
|
|
42
50
|
This function creates a new disposable email account using a random username or a specified one. It also authenticates and generates a token for accessing messages.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "temp-disposable-email",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json",
|
|
15
15
|
"test": "jest",
|
|
16
|
+
"test:cypress": "cypress run",
|
|
17
|
+
"test:playwright": "playwright test",
|
|
16
18
|
"lint": "eslint src --fix",
|
|
17
19
|
"prepare": "npm run build"
|
|
18
20
|
},
|
|
@@ -43,6 +45,7 @@
|
|
|
43
45
|
"tslib": "^2.8.1"
|
|
44
46
|
},
|
|
45
47
|
"devDependencies": {
|
|
48
|
+
"@playwright/test": "^1.49.0",
|
|
46
49
|
"@types/cypress": "^1.1.6",
|
|
47
50
|
"@types/jest": "^29.5.14",
|
|
48
51
|
"@types/node": "^22.10.0",
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Read environment variables from file.
|
|
5
|
+
* https://github.com/motdotla/dotenv
|
|
6
|
+
*/
|
|
7
|
+
// import dotenv from 'dotenv';
|
|
8
|
+
// import path from 'path';
|
|
9
|
+
// dotenv.config({ path: path.resolve(__dirname, '.env') });
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* See https://playwright.dev/docs/test-configuration.
|
|
13
|
+
*/
|
|
14
|
+
export default defineConfig({
|
|
15
|
+
testDir: './examples/playwright',
|
|
16
|
+
/* Run tests in files in parallel */
|
|
17
|
+
fullyParallel: true,
|
|
18
|
+
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
19
|
+
forbidOnly: !!process.env.CI,
|
|
20
|
+
/* Retry on CI only */
|
|
21
|
+
retries: process.env.CI ? 2 : 0,
|
|
22
|
+
/* Opt out of parallel tests on CI. */
|
|
23
|
+
workers: process.env.CI ? 1 : undefined,
|
|
24
|
+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
25
|
+
reporter: 'html',
|
|
26
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
27
|
+
use: {
|
|
28
|
+
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
29
|
+
// baseURL: 'http://127.0.0.1:3000',
|
|
30
|
+
|
|
31
|
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
32
|
+
trace: 'on-first-retry',
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
/* Configure projects for major browsers */
|
|
36
|
+
projects: [
|
|
37
|
+
{
|
|
38
|
+
name: 'chromium',
|
|
39
|
+
use: { ...devices['Desktop Chrome'] },
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
// {
|
|
43
|
+
// name: 'firefox',
|
|
44
|
+
// use: { ...devices['Desktop Firefox'] },
|
|
45
|
+
// },
|
|
46
|
+
|
|
47
|
+
// {
|
|
48
|
+
// name: 'webkit',
|
|
49
|
+
// use: { ...devices['Desktop Safari'] },
|
|
50
|
+
// },
|
|
51
|
+
/* Test against mobile viewports. */
|
|
52
|
+
// {
|
|
53
|
+
// name: 'Mobile Chrome',
|
|
54
|
+
// use: { ...devices['Pixel 5'] },
|
|
55
|
+
// },
|
|
56
|
+
// {
|
|
57
|
+
// name: 'Mobile Safari',
|
|
58
|
+
// use: { ...devices['iPhone 12'] },
|
|
59
|
+
// },
|
|
60
|
+
|
|
61
|
+
/* Test against branded browsers. */
|
|
62
|
+
// {
|
|
63
|
+
// name: 'Microsoft Edge',
|
|
64
|
+
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
65
|
+
// },
|
|
66
|
+
// {
|
|
67
|
+
// name: 'Google Chrome',
|
|
68
|
+
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
69
|
+
// },
|
|
70
|
+
],
|
|
71
|
+
|
|
72
|
+
/* Run your local dev server before starting the tests */
|
|
73
|
+
// webServer: {
|
|
74
|
+
// command: 'npm run start',
|
|
75
|
+
// url: 'http://127.0.0.1:3000',
|
|
76
|
+
// reuseExistingServer: !process.env.CI,
|
|
77
|
+
// },
|
|
78
|
+
});
|