Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rollup/plugins
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 87de3f50a553649806fc2a69343876ba34b499a2
Choose a base ref
...
head repository: rollup/plugins
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ba1c90019930e9a31f5c710bc72786772daf1373
Choose a head ref

Commits on Nov 27, 2022

  1. chore(release): json v5.0.2

    Release Workflow committed Nov 27, 2022
    Copy the full SHA
    b734673 View commit details
  2. fix(typescript)!: incorrect declarations directory

    BREAKING CHANGES: This fix changes the output directory for types with single-file builds
    georg94 authored Nov 27, 2022
    Copy the full SHA
    a5c90d1 View commit details
  3. chore(release): typescript v10.0.0

    Release Workflow committed Nov 27, 2022
    Copy the full SHA
    fd93b71 View commit details
  4. chore(repo): enable consistent-type-imports for typescript files (#…

    …1325)
    
    * refactor: distinguish between types of import
    
    * add consistent-type-import into the eslint config
    
    * fix: change the import method of non compliant rules
    jerry-lllman authored Nov 27, 2022
    Copy the full SHA
    a2e582a View commit details
  5. Copy the full SHA
    7871903 View commit details

Commits on Nov 28, 2022

  1. Copy the full SHA
    5c88274 View commit details
  2. chore(release): typescript v10.0.1

    Release Workflow committed Nov 28, 2022
    Copy the full SHA
    ca7a668 View commit details

Commits on Dec 5, 2022

  1. feat(terser): parallel execution (#1341)

    * feat(terser): parallel execution
    
    * fix(terser): exit process on promise rejection of worker
    
    * feat(terser): add woker-pool support
    
    * docs(terser): updated docs
    
    * fix(terser): worker count decrementation
    
    * style(terser): removed unnecessary Promise.resolve wrapping
    
    * docs(terser): enhanced options section
    
    * docs(terser): fix typo
    tada5hi authored Dec 5, 2022
    Copy the full SHA
    140e06b View commit details
  2. chore(release): terser v0.2.0

    Release Workflow committed Dec 5, 2022
    Copy the full SHA
    fb11bd3 View commit details

Commits on Dec 7, 2022

  1. Copy the full SHA
    a47c153 View commit details
  2. chore(release): commonjs v23.0.4

    Release Workflow committed Dec 7, 2022
    Copy the full SHA
    7b62557 View commit details

Commits on Dec 15, 2022

  1. Copy the full SHA
    39a39d7 View commit details
  2. chore(release): commonjs v23.0.5

    Release Workflow committed Dec 15, 2022
    Copy the full SHA
    75e9ff4 View commit details

Commits on Dec 17, 2022

  1. Copy the full SHA
    f5aa3c3 View commit details
  2. chore(release): commonjs v23.0.6

    Release Workflow committed Dec 17, 2022
    Copy the full SHA
    18e6c31 View commit details
  3. chore(release): dynamic-import-vars v2.0.2

    Release Workflow committed Dec 17, 2022
    Copy the full SHA
    672f650 View commit details
  4. chore(release): inject v5.0.3

    Release Workflow committed Dec 17, 2022
    Copy the full SHA
    468f5a0 View commit details
  5. chore(release): replace v5.0.2

    Release Workflow committed Dec 17, 2022
    Copy the full SHA
    ec974f2 View commit details
  6. chore(release): strip v3.0.2

    Release Workflow committed Dec 17, 2022
    Copy the full SHA
    b67c239 View commit details
  7. feat(wasm): add wasm fileName customization (#1372)

    The current implementation of the plugin always emits a wasm file with a
    filename containing the hash of the contents. This behavior is
    counter-productive to libraries that distribute Wasm; it would be better
    if the Wasm is in a predictable location.
    
    Thus this commit partially ports the `fileName` option of the url plugin
    to the wasm plugin, exposing the following substitutable variables:
    `[hash]`, `[name]`, and `[extname]` (which is may be argued as redundant
    as it should always be ".wasm").
    
    This commit is backwards compatible by keeping the default behavior of
    emitting `[hash][extname]`.
    nickbabcock authored Dec 17, 2022
    Copy the full SHA
    a581b39 View commit details
  8. chore(release): wasm v6.1.0

    Release Workflow committed Dec 17, 2022
    Copy the full SHA
    05c7438 View commit details
  9. fix(json)!: log more robustly when JSON parsing fails (#1361)

    * Log more robustly when JSON parsing fails
    
    * changed to error per pr feedback
    rotu authored Dec 17, 2022
    Copy the full SHA
    1be4b90 View commit details
  10. chore(release): json v6.0.0

    Release Workflow committed Dec 17, 2022
    Copy the full SHA
    ba1c900 View commit details
Showing with 3,111 additions and 469 deletions.
  1. +2 −1 .eslintrc.js
  2. +1 −3 package.json
  3. +1 −1 packages/alias/src/index.ts
  4. +1 −1 packages/alias/types/index.d.ts
  5. +1 −1 packages/auto-install/src/index.ts
  6. +1 −1 packages/auto-install/types/index.d.ts
  7. +2 −1 packages/babel/test/types.ts
  8. +3 −3 packages/babel/types/index.d.ts
  9. +1 −1 packages/beep/types/index.d.ts
  10. +1 −1 packages/buble/src/index.ts
  11. +1 −1 packages/buble/test/types.ts
  12. +3 −3 packages/buble/types/index.d.ts
  13. +24 −0 packages/commonjs/CHANGELOG.md
  14. +2 −2 packages/commonjs/package.json
  15. +8 −3 packages/commonjs/src/index.js
  16. +236 −92 packages/commonjs/test/snapshots/function.js.md
  17. BIN packages/commonjs/test/snapshots/function.js.snap
  18. +12 −4 packages/commonjs/test/snapshots/test.js.md
  19. BIN packages/commonjs/test/snapshots/test.js.snap
  20. +12 −12 packages/commonjs/types/index.d.ts
  21. +1 −1 packages/data-uri/src/index.ts
  22. +1 −1 packages/data-uri/types/index.d.ts
  23. +1 −1 packages/dsv/test/types.ts
  24. +3 −3 packages/dsv/types/index.d.ts
  25. +8 −0 packages/dynamic-import-vars/CHANGELOG.md
  26. +2 −2 packages/dynamic-import-vars/package.json
  27. +1 −1 packages/dynamic-import-vars/test/types.ts
  28. +4 −6 packages/dynamic-import-vars/types/index.d.ts
  29. +1 −1 packages/eslint/src/index.ts
  30. +3 −3 packages/eslint/types/index.d.ts
  31. +1 −1 packages/graphql/test/types.ts
  32. +2 −2 packages/graphql/types/index.d.ts
  33. +1 −1 packages/html/src/index.ts
  34. +1 −1 packages/html/types/index.d.ts
  35. +1 −1 packages/image/test/types.ts
  36. +2 −2 packages/image/types/index.d.ts
  37. +8 −0 packages/inject/CHANGELOG.md
  38. +2 −2 packages/inject/package.json
  39. +1 −1 packages/inject/test/types.ts
  40. +1 −1 packages/inject/types/index.d.ts
  41. +16 −0 packages/json/CHANGELOG.md
  42. +1 −1 packages/json/package.json
  43. +1 −2 packages/json/src/index.js
  44. +12 −15 packages/json/test/test.js
  45. +1 −1 packages/json/test/types.ts
  46. +2 −2 packages/json/types/index.d.ts
  47. +1 −1 packages/legacy/test/types.ts
  48. +1 −1 packages/legacy/types/index.d.ts
  49. +1 −1 packages/multi-entry/test/types.ts
  50. +2 −2 packages/multi-entry/types/index.d.ts
  51. +1 −1 packages/node-resolve/types/index.d.ts
  52. +1 −1 packages/pluginutils/src/attachScopes.ts
  53. +13 −5 packages/pluginutils/src/extractAssignedNames.ts
  54. +3 −2 packages/pluginutils/test/attachScopes.ts
  55. +1 −1 packages/pluginutils/types/index.d.ts
  56. +8 −0 packages/replace/CHANGELOG.md
  57. +2 −2 packages/replace/package.json
  58. +1 −1 packages/replace/test/types.ts
  59. +2 −2 packages/replace/types/index.d.ts
  60. +3 −2 packages/run/src/index.ts
  61. +2 −2 packages/run/types/index.d.ts
  62. +8 −0 packages/strip/CHANGELOG.md
  63. +2 −2 packages/strip/package.json
  64. +1 −1 packages/strip/test/types.ts
  65. +2 −2 packages/strip/types/index.d.ts
  66. +1 −1 packages/sucrase/test/types.ts
  67. +3 −3 packages/sucrase/types/index.d.ts
  68. +8 −0 packages/terser/CHANGELOG.md
  69. +29 −8 packages/terser/README.md
  70. +4 −1 packages/terser/package.json
  71. +5 −21 packages/terser/src/index.ts
  72. +72 −0 packages/terser/src/module.ts
  73. +33 −0 packages/terser/src/type.ts
  74. +117 −0 packages/terser/src/worker-pool.ts
  75. +47 −0 packages/terser/src/worker.ts
  76. +2 −2 packages/terser/test/test.js
  77. +1 −1 packages/terser/test/types.ts
  78. +2 −2 packages/terser/types/index.d.ts
  79. +16 −0 packages/typescript/CHANGELOG.md
  80. +1 −1 packages/typescript/package.json
  81. +6 −5 packages/typescript/src/diagnostics/emit.ts
  82. +2 −1 packages/typescript/src/diagnostics/host.ts
  83. +3 −2 packages/typescript/src/diagnostics/toWarning.ts
  84. +11 −1 packages/typescript/src/index.ts
  85. +3 −2 packages/typescript/src/moduleResolution.ts
  86. +4 −5 packages/typescript/src/options/normalize.ts
  87. +8 −10 packages/typescript/src/options/tsconfig.ts
  88. +2 −2 packages/typescript/src/options/validate.ts
  89. +5 −3 packages/typescript/src/outputFile.ts
  90. +2 −2 packages/typescript/src/preflight.ts
  91. +2 −1 packages/typescript/src/tslib.ts
  92. +5 −5 packages/typescript/src/watchProgram.ts
  93. +1,920 −0 packages/typescript/test/fixtures/incremental-watch-off/dist/.tsbuildinfo
  94. +6 −0 packages/typescript/test/fixtures/incremental-watch-off/main.ts
  95. +6 −0 packages/typescript/test/fixtures/incremental-watch-off/original.txt
  96. +8 −0 packages/typescript/test/fixtures/incremental-watch-off/tsconfig.json
  97. +1 −1 packages/typescript/test/fixtures/project-references/animals/dog.ts
  98. +2 −1 packages/typescript/test/fixtures/project-references/zoo/zoo.ts
  99. +39 −1 packages/typescript/test/test.js
  100. +2 −1 packages/typescript/test/tslib.ts
  101. +6 −4 packages/typescript/types/index.d.ts
  102. +1 −1 packages/url/test/types.ts
  103. +2 −2 packages/url/types/index.d.ts
  104. +2 −2 packages/virtual/src/index.ts
  105. +1 −1 packages/virtual/types/index.d.ts
  106. +8 −0 packages/wasm/CHANGELOG.md
  107. +11 −0 packages/wasm/README.md
  108. +1 −1 packages/wasm/package.json
  109. +17 −5 packages/wasm/src/index.ts
  110. +8 −0 packages/wasm/test/snapshots/test.mjs.md
  111. BIN packages/wasm/test/snapshots/test.mjs.snap
  112. +17 −0 packages/wasm/test/test.mjs
  113. +5 −1 packages/wasm/types/index.d.ts
  114. +1 −1 packages/yaml/test/types.ts
  115. +2 −2 packages/yaml/types/index.d.ts
  116. +204 −152 pnpm-lock.yaml
  117. +2 −2 util/test.d.ts
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -9,7 +9,8 @@ module.exports = {
'sort-keys': 'off',
'typescript-sort-keys/interface': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off'
'import/no-unresolved': 'off',
'@typescript-eslint/consistent-type-imports': 'error'
},
overrides: [
{
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -31,16 +31,14 @@
"codecov-lite": "2.0.0",
"conventional-commits-parser": "^3.2.1",
"del-cli": "^5.0.0",
"eslint": "^8.24.0",
"eslint-config-rollup": "^3.0.0",
"eslint-config-rollup": "^3.0.1",
"esm": "^3.2.25",
"execa": "^5.1.1",
"globby": "^11.0.1",
"husky": "8.0.1",
"lint-staged": "11.0.1",
"nyc": "^15.1.0",
"pnpm": "^7.12.2",
"prettier": "^2.7.1",
"prettier-plugin-package": "^1.3.0",
"semver": "^7.3.2",
"source-map-support": "^0.5.21",
2 changes: 1 addition & 1 deletion packages/alias/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Plugin } from 'rollup';
import type { Plugin } from 'rollup';

import type { ResolvedAlias, ResolverFunction, ResolverObject, RollupAliasOptions } from '../types';

2 changes: 1 addition & 1 deletion packages/alias/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Plugin, PluginHooks } from 'rollup';
import type { Plugin, PluginHooks } from 'rollup';

type MapToFunction<T> = T extends Function ? T : never;

2 changes: 1 addition & 1 deletion packages/auto-install/src/index.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import mod from 'module';
import { exec } from 'child_process';
import { promisify } from 'util';

import { Plugin } from 'rollup';
import type { Plugin } from 'rollup';

import type { RollupAutoInstallOptions } from '../types';

2 changes: 1 addition & 1 deletion packages/auto-install/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Plugin } from 'rollup';
import type { Plugin } from 'rollup';

export interface RollupAutoInstallOptions {
/**
3 changes: 2 additions & 1 deletion packages/babel/test/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** eslint-disable @typescript-eslint/no-unused-vars */
import type { RollupOptions } from 'rollup';

import babelPlugin, {
babel,
@@ -8,7 +9,7 @@ import babelPlugin, {
createBabelOutputPluginFactory
} from '../types';

const rollupConfig: import('rollup').RollupOptions = {
const rollupConfig: RollupOptions = {
input: 'main.js',
output: {
file: 'bundle.js',
6 changes: 3 additions & 3 deletions packages/babel/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Plugin, PluginContext, TransformPluginContext } from 'rollup';
import { FilterPattern, CreateFilter } from '@rollup/pluginutils';
import * as babelCore from '@babel/core';
import type { Plugin, PluginContext, TransformPluginContext } from 'rollup';
import type { FilterPattern, CreateFilter } from '@rollup/pluginutils';
import type * as babelCore from '@babel/core';

export interface RollupBabelInputPluginOptions
extends Omit<babelCore.TransformOptions, 'include' | 'exclude'> {
2 changes: 1 addition & 1 deletion packages/beep/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Plugin } from 'rollup';
import type { Plugin } from 'rollup';

/**
* 🍣 A Rollup plugin that beeps when a build ends with errors.
2 changes: 1 addition & 1 deletion packages/buble/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { transform } from 'buble';
import { Plugin } from 'rollup';
import type { Plugin } from 'rollup';
import { createFilter } from '@rollup/pluginutils';

import type { RollupBubleOptions } from '../types';
2 changes: 1 addition & 1 deletion packages/buble/test/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RollupOptions } from 'rollup';
import type { RollupOptions } from 'rollup';

import buble from '..';

6 changes: 3 additions & 3 deletions packages/buble/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FilterPattern } from '@rollup/pluginutils';
import { TransformOptions } from 'buble';
import { Plugin } from 'rollup';
import type { FilterPattern } from '@rollup/pluginutils';
import type { TransformOptions } from 'buble';
import type { Plugin } from 'rollup';

export interface RollupBubleOptions extends TransformOptions {
/**
24 changes: 24 additions & 0 deletions packages/commonjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @rollup/plugin-commonjs ChangeLog

## v23.0.6

_2022-12-17_

### Bugfixes

- fix: update magic-string [#1373](https://github.com/rollup/plugins/pull/1373)

## v23.0.5

_2022-12-15_

### Bugfixes

- fix: resolve export exports not found [#1363](https://github.com/rollup/plugins/pull/1363)

## v23.0.4

_2022-12-07_

### Bugfixes

- fix: declaration tag @default for ignoreTryCatch + fix some typos [#1370](https://github.com/rollup/plugins/pull/1370)

## v23.0.3

_2022-11-27_
4 changes: 2 additions & 2 deletions packages/commonjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rollup/plugin-commonjs",
"version": "23.0.3",
"version": "23.0.6",
"publishConfig": {
"access": "public"
},
@@ -67,7 +67,7 @@
"estree-walker": "^2.0.2",
"glob": "^8.0.3",
"is-reference": "1.2.1",
"magic-string": "^0.26.4"
"magic-string": "^0.27.0"
},
"devDependencies": {
"@rollup/plugin-json": "^5.0.0",
11 changes: 8 additions & 3 deletions packages/commonjs/src/index.js
Original file line number Diff line number Diff line change
@@ -243,10 +243,15 @@ export default function commonjs(options = {}) {
}

if (isWrappedId(id, MODULE_SUFFIX)) {
const name = getName(unwrapId(id, MODULE_SUFFIX));
const module = getName(unwrapId(id, MODULE_SUFFIX));
const moduleExports = `${module}Exports`;
return {
code: `var ${name} = {exports: {}}; export {${name} as __module}`,
syntheticNamedExports: '__module',
code: `var ${moduleExports} = {};
var ${module} = {
get exports(){ return ${moduleExports}; },
set exports(v){ ${moduleExports} = v; },
};
export {${module} as __module, ${moduleExports} as exports}`,
meta: { commonjs: { isCommonJS: false } }
};
}
Loading