temp-disposable-email 1.9.0 → 1.10.1

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 CHANGED
@@ -1,50 +1,51 @@
1
- # [1.9.0](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.8.0...v1.9.0) (2024-11-28)
1
+ ## [1.10.1](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.10.0...v1.10.1) (2024-11-29)
2
2
 
3
3
 
4
- ### Features
4
+ ### Bug Fixes
5
5
 
6
- * update README with detailed package features, installation, usage, and API documentation ([06772db](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/06772dbc82f6df4383d75e51078b8915f6f6c6df))
6
+ * update README with CommonJS import syntax for better clarity ([a6b2678](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/a6b26783b5485e2745820f8ecd621fdda0a69d54))
7
7
 
8
8
 
9
9
 
10
- # [1.8.0](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.6.4...v1.8.0) (2024-11-28)
10
+ # [1.10.0](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.9.0...v1.10.0) (2024-11-28)
11
11
 
12
12
 
13
- ### Bug Fixes
13
+ ### Features
14
14
 
15
- * add skipLibCheck and exclude examples from TypeScript configuration ([5c220fd](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/5c220fd8cc3a3abb8ff693c1410c29c29067f4ab))
15
+ * add Playwright testing framework and configuration; update .gitignore and package files ([64911b1](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/64911b1a222c8000a3b94268c29e4ca9b495658b))
16
+ * 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))
16
17
 
17
18
 
18
- ### Features
19
19
 
20
- * add Cypress configuration and support for temporary email testing ([77b26a6](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/77b26a680378d693e29dc8b5a984e686742f65e0))
20
+ # [1.9.0](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.8.0...v1.9.0) (2024-11-28)
21
21
 
22
22
 
23
+ ### Features
23
24
 
24
- ## [1.6.4](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.6.3...v1.6.4) (2024-11-28)
25
+ * update README with detailed package features, installation, usage, and API documentation ([06772db](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/06772dbc82f6df4383d75e51078b8915f6f6c6df))
25
26
 
26
27
 
27
- ### Bug Fixes
28
28
 
29
- * update BASE_URL in constant and simplify publish workflow ([35e4615](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/35e4615498dad384b75ac226d3bd7fa82bc64ba9))
29
+ # [1.8.0](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.6.4...v1.8.0) (2024-11-28)
30
30
 
31
31
 
32
+ ### Bug Fixes
32
33
 
33
- ## [1.6.3](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.6.2...v1.6.3) (2024-11-28)
34
+ * add skipLibCheck and exclude examples from TypeScript configuration ([5c220fd](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/5c220fd8cc3a3abb8ff693c1410c29c29067f4ab))
34
35
 
35
36
 
36
- ### Bug Fixes
37
+ ### Features
37
38
 
38
- * update publish workflow to set BASE_URL and build before publishing ([3f0e0dd](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/3f0e0dd22b43b36d3f7ffd2e4389da3f8f7ac3d4))
39
+ * add Cypress configuration and support for temporary email testing ([77b26a6](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/77b26a680378d693e29dc8b5a984e686742f65e0))
39
40
 
40
41
 
41
42
 
42
- ## [1.6.2](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.6.1...v1.6.2) (2024-11-28)
43
+ ## [1.6.4](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.6.3...v1.6.4) (2024-11-28)
43
44
 
44
45
 
45
46
  ### Bug Fixes
46
47
 
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
+ * update BASE_URL in constant and simplify publish workflow ([35e4615](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/35e4615498dad384b75ac226d3bd7fa82bc64ba9))
48
49
 
49
50
 
50
51
 
package/README.md CHANGED
@@ -33,10 +33,22 @@ 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
+ const {
46
+ createInbox,
47
+ getMessage,
48
+ deleteAccount,
49
+ } = require('temp-disposable-email');
50
+ ```
51
+
40
52
  ### 2\. Create an Inbox
41
53
 
42
54
  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.9.0",
3
+ "version": "1.10.1",
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
+ });