@modern-js/node-bundle-require 1.3.1 → 1.3.4

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,5 +1,27 @@
1
1
  # @modern-js/node-bundle-require
2
2
 
3
+ ## 1.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - b8cfc42cd: feat: prebundle tsconfig-paths and nanoid
8
+ - Updated dependencies [b8cfc42cd]
9
+ - Updated dependencies [804a5bb8a]
10
+ - @modern-js/utils@1.7.4
11
+
12
+ ## 1.3.3
13
+
14
+ ### Patch Changes
15
+
16
+ - d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore
17
+
18
+ ## 1.3.2
19
+
20
+ ### Patch Changes
21
+
22
+ - 6c1438d2: fix: missing peer deps warnings
23
+ - 895fa0ff: chore: using "workspace:\*" in devDependencies
24
+
3
25
  ## 1.3.1
4
26
 
5
27
  ### Patch Changes
@@ -5,8 +5,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
 
7
7
  import path from 'path';
8
- import { fs, CONFIG_CACHE_DIR, createDebugger } from '@modern-js/utils';
9
- import { nanoid } from 'nanoid';
8
+ import { fs, nanoid, CONFIG_CACHE_DIR, createDebugger } from '@modern-js/utils';
10
9
  import { build } from 'esbuild';
11
10
  const debug = createDebugger('node-bundle');
12
11
  const JS_EXT_RE = /\.(mjs|cjs|ts|js|tsx|jsx)$/; // Must not start with "/" or "./" or "../"
@@ -10,8 +10,6 @@ var _path = _interopRequireDefault(require("path"));
10
10
 
11
11
  var _utils = require("@modern-js/utils");
12
12
 
13
- var _nanoid = require("nanoid");
14
-
15
13
  var _esbuild = require("esbuild");
16
14
 
17
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -38,7 +36,7 @@ function inferLoader(ext) {
38
36
  return ext.slice(1);
39
37
  }
40
38
 
41
- const defaultGetOutputFile = filepath => _path.default.resolve(_utils.CONFIG_CACHE_DIR, `${filepath}-${Date.now()}.${(0, _nanoid.nanoid)()}.bundled.cjs`);
39
+ const defaultGetOutputFile = filepath => _path.default.resolve(_utils.CONFIG_CACHE_DIR, `${filepath}-${Date.now()}.${(0, _utils.nanoid)()}.bundled.cjs`);
42
40
 
43
41
  async function bundle(filepath, options) {
44
42
  if (!JS_EXT_RE.test(filepath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/node-bundle-require",
3
- "version": "1.3.1",
3
+ "version": "1.3.4",
4
4
  "description": "The meta-framework suite designed from scratch for frontend-focused modern web development.",
5
5
  "homepage": "https://modernjs.dev",
6
6
  "bugs": "https://github.com/modern-js-dev/modern.js/issues",
@@ -40,14 +40,13 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@babel/runtime": "^7",
43
- "esbuild": "^0.13.15",
44
- "nanoid": "^3.3.2"
43
+ "@modern-js/utils": "^1.7.4",
44
+ "esbuild": "^0.14.38"
45
45
  },
46
46
  "devDependencies": {
47
- "@modern-js/utils": "^1.5.0",
48
47
  "@scripts/build": "0.0.0",
49
48
  "@scripts/jest-config": "0.0.0",
50
- "@types/jest": "^26.0.9",
49
+ "@types/jest": "^27",
51
50
  "@types/node": "^14",
52
51
  "jest": "^27",
53
52
  "typescript": "^4"
@@ -57,10 +56,33 @@
57
56
  "registry": "https://registry.npmjs.org/",
58
57
  "access": "public"
59
58
  },
59
+ "wireit": {
60
+ "build": {
61
+ "command": "modern build",
62
+ "files": [
63
+ "src/**/*",
64
+ "tsconfig.json",
65
+ "package.json"
66
+ ],
67
+ "output": [
68
+ "dist/**/*"
69
+ ]
70
+ },
71
+ "test": {
72
+ "command": "jest --passWithNoTests",
73
+ "files": [
74
+ "src/**/*",
75
+ "tsconfig.json",
76
+ "package.json",
77
+ "tests/**/*"
78
+ ],
79
+ "output": []
80
+ }
81
+ },
60
82
  "scripts": {
61
83
  "new": "modern new",
62
- "build": "modern build",
63
- "test": "jest --passWithNoTests"
84
+ "build": "wireit",
85
+ "test": "wireit"
64
86
  },
65
87
  "readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
66
88
  }
package/.eslintrc.js DELETED
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ['@modern-js'],
4
- parserOptions: {
5
- tsconfigRootDir: __dirname,
6
- project: ['./tsconfig.json'],
7
- },
8
- };
package/jest.config.js DELETED
@@ -1,7 +0,0 @@
1
- const sharedConfig = require('@scripts/jest-config');
2
-
3
- /** @type {import('@jest/types').Config.InitialOptions} */
4
- module.exports = {
5
- ...sharedConfig,
6
- rootDir: __dirname,
7
- };
package/modern.config.js DELETED
@@ -1,6 +0,0 @@
1
- /** @type {import('@modern-js/module-tools').UserConfig} */
2
- module.exports = {
3
- output: {
4
- packageMode: 'node-js',
5
- },
6
- };
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "@modern-js/tsconfig/base",
3
- "compilerOptions": {
4
- "declaration": false,
5
- "jsx": "preserve",
6
- "baseUrl": "./",
7
- "isolatedModules": true,
8
- "paths": {}
9
- },
10
- "include": ["src"]
11
- }