@layerzerolabs/tsup-config-next 3.0.15 → 3.0.16
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 +6 -0
- package/dist/index.cjs +44 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.mjs +34 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +10 -7
- package/{index.ts → src/index.ts} +2 -1
- package/tsconfig.json +1 -1
- package/tsup.config.ts +10 -0
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -29
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var commonjsPlugin = require('@chialab/esbuild-plugin-commonjs');
|
|
4
|
+
var esbuildNodeExternals = require('esbuild-node-externals');
|
|
5
|
+
var tsup = require('tsup');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var commonjsPlugin__default = /*#__PURE__*/_interopDefault(commonjsPlugin);
|
|
10
|
+
|
|
11
|
+
// src/index.ts
|
|
12
|
+
var getDefaultConfig = () => ({
|
|
13
|
+
esbuildPlugins: [
|
|
14
|
+
commonjsPlugin__default.default(),
|
|
15
|
+
esbuildNodeExternals.nodeExternalsPlugin({
|
|
16
|
+
dependencies: false,
|
|
17
|
+
devDependencies: false
|
|
18
|
+
})
|
|
19
|
+
],
|
|
20
|
+
// lets be explicit about module type
|
|
21
|
+
outExtension({ format }) {
|
|
22
|
+
if (format === "cjs") {
|
|
23
|
+
return { js: ".cjs" };
|
|
24
|
+
} else if (format === "esm") {
|
|
25
|
+
return { js: ".mjs" };
|
|
26
|
+
}
|
|
27
|
+
throw new Error(`Format ${format} is not supported`);
|
|
28
|
+
},
|
|
29
|
+
clean: false,
|
|
30
|
+
dts: true,
|
|
31
|
+
sourcemap: true,
|
|
32
|
+
splitting: false,
|
|
33
|
+
treeshake: true,
|
|
34
|
+
format: ["cjs", "esm"],
|
|
35
|
+
silent: true
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
Object.defineProperty(exports, "defineConfig", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () { return tsup.defineConfig; }
|
|
41
|
+
});
|
|
42
|
+
exports.getDefaultConfig = getDefaultConfig;
|
|
43
|
+
//# sourceMappingURL=out.js.map
|
|
44
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB;AAC3B,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAItB,IAAM,mBAAmB,OAAyB;AAAA,EACrD,gBAAgB;AAAA,IACZ,eAAe;AAAA,IACf,oBAAoB;AAAA,MAChB,cAAc;AAAA,MACd,iBAAiB;AAAA,IACrB,CAAC;AAAA,EACL;AAAA;AAAA,EAEA,aAAa,EAAE,OAAO,GAAmB;AACrC,QAAI,WAAW,OAAO;AAClB,aAAO,EAAE,IAAI,OAAO;AAAA,IACxB,WAAW,WAAW,OAAO;AACzB,aAAO,EAAE,IAAI,OAAO;AAAA,IACxB;AACA,UAAM,IAAI,MAAM,UAAU,MAAM,mBAAmB;AAAA,EACvD;AAAA,EACA,OAAO;AAAA,EACP,KAAK;AAAA,EACL,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,QAAQ,CAAC,OAAO,KAAK;AAAA,EACrB,QAAQ;AACZ","sourcesContent":["import commonjsPlugin from '@chialab/esbuild-plugin-commonjs'\nimport { nodeExternalsPlugin } from 'esbuild-node-externals'\nimport { defineConfig } from 'tsup'\n\nimport type { Options } from 'tsup'\n\nexport const getDefaultConfig = (): Partial<Options> => ({\n esbuildPlugins: [\n commonjsPlugin(),\n nodeExternalsPlugin({\n dependencies: false,\n devDependencies: false,\n }),\n ],\n // lets be explicit about module type\n outExtension({ format }): { js: string } {\n if (format === 'cjs') {\n return { js: '.cjs' }\n } else if (format === 'esm') {\n return { js: '.mjs' }\n }\n throw new Error(`Format ${format} is not supported`)\n },\n clean: false,\n dts: true,\n sourcemap: true,\n splitting: false,\n treeshake: true,\n format: ['cjs', 'esm'],\n silent: true,\n})\n\nexport { defineConfig, Options }\n"]}
|
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Options } from 'tsup';
|
|
2
|
+
export { Options, defineConfig } from 'tsup';
|
|
3
|
+
|
|
4
|
+
declare const getDefaultConfig: () => Partial<Options>;
|
|
5
|
+
|
|
6
|
+
export { getDefaultConfig };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import commonjsPlugin from '@chialab/esbuild-plugin-commonjs';
|
|
2
|
+
import { nodeExternalsPlugin } from 'esbuild-node-externals';
|
|
3
|
+
export { defineConfig } from 'tsup';
|
|
4
|
+
|
|
5
|
+
// src/index.ts
|
|
6
|
+
var getDefaultConfig = () => ({
|
|
7
|
+
esbuildPlugins: [
|
|
8
|
+
commonjsPlugin(),
|
|
9
|
+
nodeExternalsPlugin({
|
|
10
|
+
dependencies: false,
|
|
11
|
+
devDependencies: false
|
|
12
|
+
})
|
|
13
|
+
],
|
|
14
|
+
// lets be explicit about module type
|
|
15
|
+
outExtension({ format }) {
|
|
16
|
+
if (format === "cjs") {
|
|
17
|
+
return { js: ".cjs" };
|
|
18
|
+
} else if (format === "esm") {
|
|
19
|
+
return { js: ".mjs" };
|
|
20
|
+
}
|
|
21
|
+
throw new Error(`Format ${format} is not supported`);
|
|
22
|
+
},
|
|
23
|
+
clean: false,
|
|
24
|
+
dts: true,
|
|
25
|
+
sourcemap: true,
|
|
26
|
+
splitting: false,
|
|
27
|
+
treeshake: true,
|
|
28
|
+
format: ["cjs", "esm"],
|
|
29
|
+
silent: true
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export { getDefaultConfig };
|
|
33
|
+
//# sourceMappingURL=out.js.map
|
|
34
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB;AAC3B,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAItB,IAAM,mBAAmB,OAAyB;AAAA,EACrD,gBAAgB;AAAA,IACZ,eAAe;AAAA,IACf,oBAAoB;AAAA,MAChB,cAAc;AAAA,MACd,iBAAiB;AAAA,IACrB,CAAC;AAAA,EACL;AAAA;AAAA,EAEA,aAAa,EAAE,OAAO,GAAmB;AACrC,QAAI,WAAW,OAAO;AAClB,aAAO,EAAE,IAAI,OAAO;AAAA,IACxB,WAAW,WAAW,OAAO;AACzB,aAAO,EAAE,IAAI,OAAO;AAAA,IACxB;AACA,UAAM,IAAI,MAAM,UAAU,MAAM,mBAAmB;AAAA,EACvD;AAAA,EACA,OAAO;AAAA,EACP,KAAK;AAAA,EACL,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,QAAQ,CAAC,OAAO,KAAK;AAAA,EACrB,QAAQ;AACZ","sourcesContent":["import commonjsPlugin from '@chialab/esbuild-plugin-commonjs'\nimport { nodeExternalsPlugin } from 'esbuild-node-externals'\nimport { defineConfig } from 'tsup'\n\nimport type { Options } from 'tsup'\n\nexport const getDefaultConfig = (): Partial<Options> => ({\n esbuildPlugins: [\n commonjsPlugin(),\n nodeExternalsPlugin({\n dependencies: false,\n devDependencies: false,\n }),\n ],\n // lets be explicit about module type\n outExtension({ format }): { js: string } {\n if (format === 'cjs') {\n return { js: '.cjs' }\n } else if (format === 'esm') {\n return { js: '.mjs' }\n }\n throw new Error(`Format ${format} is not supported`)\n },\n clean: false,\n dts: true,\n sourcemap: true,\n splitting: false,\n treeshake: true,\n format: ['cjs', 'esm'],\n silent: true,\n})\n\nexport { defineConfig, Options }\n"]}
|
package/package.json
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/tsup-config-next",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"type": "
|
|
3
|
+
"version": "3.0.16",
|
|
4
|
+
"type": "commonjs",
|
|
5
5
|
"exports": {
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
|
-
"
|
|
7
|
+
"import": "./dist/index.mjs",
|
|
8
|
+
"require": "./dist/index.cjs",
|
|
9
|
+
"default": "./dist/index.mjs"
|
|
8
10
|
},
|
|
9
|
-
"main": "./dist/index.
|
|
11
|
+
"main": "./dist/index.cjs",
|
|
12
|
+
"module": "./dist/index.mjs",
|
|
10
13
|
"types": "./dist/index.d.ts",
|
|
11
14
|
"scripts": {
|
|
12
|
-
"build": "$npm_execpath clean-prebuild &&
|
|
13
|
-
"clean": "$npm_execpath clean-prebuild
|
|
15
|
+
"build": "$npm_execpath clean-prebuild && tsup",
|
|
16
|
+
"clean": "$npm_execpath clean-prebuild",
|
|
14
17
|
"clean-prebuild": "rimraf dist"
|
|
15
18
|
},
|
|
16
19
|
"dependencies": {
|
|
@@ -20,7 +23,7 @@
|
|
|
20
23
|
"tsup": "^8.0.1"
|
|
21
24
|
},
|
|
22
25
|
"devDependencies": {
|
|
23
|
-
"@layerzerolabs/typescript-config-next": "^3.0.
|
|
26
|
+
"@layerzerolabs/typescript-config-next": "^3.0.16",
|
|
24
27
|
"rimraf": "^5.0.5",
|
|
25
28
|
"typescript": "~5.2.2"
|
|
26
29
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import commonjsPlugin from '@chialab/esbuild-plugin-commonjs'
|
|
2
2
|
import { nodeExternalsPlugin } from 'esbuild-node-externals'
|
|
3
|
+
import { defineConfig } from 'tsup'
|
|
3
4
|
|
|
4
5
|
import type { Options } from 'tsup'
|
|
5
6
|
|
|
@@ -29,4 +30,4 @@ export const getDefaultConfig = (): Partial<Options> => ({
|
|
|
29
30
|
silent: true,
|
|
30
31
|
})
|
|
31
32
|
|
|
32
|
-
export { defineConfig, Options }
|
|
33
|
+
export { defineConfig, Options }
|
package/tsconfig.json
CHANGED
package/tsup.config.ts
ADDED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,eAAO,MAAM,gBAAgB,QAAO,QAAQ,OAAO,CAwBjD,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA"}
|
package/dist/index.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import commonjsPlugin from '@chialab/esbuild-plugin-commonjs';
|
|
2
|
-
import { nodeExternalsPlugin } from 'esbuild-node-externals';
|
|
3
|
-
export const getDefaultConfig = () => ({
|
|
4
|
-
esbuildPlugins: [
|
|
5
|
-
commonjsPlugin(),
|
|
6
|
-
nodeExternalsPlugin({
|
|
7
|
-
dependencies: false,
|
|
8
|
-
devDependencies: false,
|
|
9
|
-
}),
|
|
10
|
-
],
|
|
11
|
-
// lets be explicit about module type
|
|
12
|
-
outExtension({ format }) {
|
|
13
|
-
if (format === 'cjs') {
|
|
14
|
-
return { js: '.cjs' };
|
|
15
|
-
}
|
|
16
|
-
else if (format === 'esm') {
|
|
17
|
-
return { js: '.mjs' };
|
|
18
|
-
}
|
|
19
|
-
throw new Error(`Format ${format} is not supported`);
|
|
20
|
-
},
|
|
21
|
-
clean: false,
|
|
22
|
-
dts: true,
|
|
23
|
-
sourcemap: true,
|
|
24
|
-
splitting: false,
|
|
25
|
-
treeshake: true,
|
|
26
|
-
format: ['cjs', 'esm'],
|
|
27
|
-
silent: true,
|
|
28
|
-
});
|
|
29
|
-
export { defineConfig } from 'tsup';
|