Skip to content

Commit

Permalink
chore(release): v1.41.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ashgw committed Nov 30, 2024
1 parent c13326e commit 35daa34
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 28 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-roids",
"version": "1.41.1",
"version": "1.41.2",
"private": false,
"description": "Bullet-proof TS even more",
"type": "module",
Expand Down
41 changes: 14 additions & 27 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,35 @@ import rollupPluginTypescript from '@rollup/plugin-typescript';
import { type Plugin, type RollupOptions } from 'rollup';
import rollupPluginAutoExternal from 'rollup-plugin-auto-external';
import rollupPluginDts from 'rollup-plugin-dts';
import path from 'path';

import pkg from './package.json' assert { type: 'json' };

const common = {
const common: RollupOptions = {
input: 'src/index.ts',

output: {
sourcemap: false,
},

external: [],

treeshake: {
annotations: true,
moduleSideEffects: [],
moduleSideEffects: false,
propertyReadSideEffects: false,
unknownGlobalSideEffects: false,
},
} satisfies RollupOptions;
};

const runtimes = {
const runtimes: RollupOptions = {
...common,

output: [
{
...common.output,
file: pkg.exports.import,
format: 'esm',
sourcemap: false,
},
{
...common.output,
file: pkg.exports.require,
format: 'cjs',
sourcemap: false,
},
],

plugins: [
rollupPluginAutoExternal(),
rollupPluginTypescript({
Expand All @@ -48,31 +41,25 @@ const runtimes = {
values: {
'import.meta.vitest': 'undefined',
},
preventAssignment: true,
}),
],
} satisfies RollupOptions;

const types = {
...common,
};

const types: RollupOptions = {
input: 'src/index.ts',
output: [
{
...common.output,
file: pkg.exports.types.import,
file: path.resolve('dist', 'index.d.ts'),
format: 'esm',
},
{
...common.output,
file: pkg.exports.types.require,
format: 'cjs',
},
],

plugins: [
rollupPluginDts({
tsconfig: 'tsconfig.build.json',
respectExternal: true,
}),
] as Plugin[],
} satisfies RollupOptions;
};

export default [runtimes, types];

0 comments on commit 35daa34

Please sign in to comment.