Skip to content

Commit f74688c

Browse files
authored
drop support for typescript 4 (#253)
1 parent 8ea7723 commit f74688c

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
---
2-
"bob-the-bundler": patch
2+
'bob-the-bundler': patch
33
---
4+
45
dependencies updates:
5-
- Updated dependency [`typescript@^4.7.4 || ^5.0.0` ↗︎](https://www.npmjs.com/package/typescript/v/4.7.4) (from `^4.7.4`, in `peerDependencies`)
6+
7+
- Updated dependency
8+
[`typescript@^4.7.4 || ^5.0.0` ↗︎](https://www.npmjs.com/package/typescript/v/4.7.4) (from
9+
`^4.7.4`, in `peerDependencies`)

.changeset/ninety-plants-pump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'bob-the-bundler': major
3+
---
4+
5+
Drop support for typescript 4.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"test:ts": "node test/ts-tests/run-tests.mjs"
4646
},
4747
"peerDependencies": {
48-
"typescript": "^4.7.4 || ^5.0.0"
48+
"typescript": "^5.0.0"
4949
},
5050
"dependencies": {
5151
"consola": "^2.15.3",

test/integration.spec.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ it('can bundle a simple project', async () => {
2222

2323
expect(await fse.readFile(indexJsFilePath, 'utf8')).toMatchInlineSnapshot(`
2424
"use strict";
25-
exports.__esModule = true;
25+
Object.defineProperty(exports, "__esModule", { value: true });
2626
exports.someNumber = void 0;
2727
exports.someNumber = 1;
28-
exports["default"] = 'kek';
28+
exports.default = 'kek';
2929
`);
3030
expect(await fse.readFile(indexDtsFilePath, 'utf8')).toMatchInlineSnapshot(`
3131
export declare const someNumber = 1;
@@ -406,11 +406,9 @@ it('can build a types only project', async () => {
406406
}
407407
`);
408408

409-
await expect(fse.readFile(path.resolve(baseDistPath, 'cjs', 'index.js'), 'utf8')).resolves
410-
.toMatchInlineSnapshot(`
411-
"use strict";
412-
exports.__esModule = true;
413-
`);
409+
await expect(
410+
fse.readFile(path.resolve(baseDistPath, 'cjs', 'index.js'), 'utf8'),
411+
).resolves.toMatchInlineSnapshot('');
414412
await expect(
415413
fse.readFile(path.resolve(baseDistPath, 'esm', 'index.js'), 'utf8'),
416414
).resolves.toMatchInlineSnapshot('');
@@ -727,10 +725,10 @@ it('can bundle a tsconfig-build-json project', async () => {
727725
await expect(fse.readFile(path.resolve(baseDistPath, 'cjs', 'index.js'), 'utf8')).resolves
728726
.toMatchInlineSnapshot(`
729727
"use strict";
730-
exports.__esModule = true;
728+
Object.defineProperty(exports, "__esModule", { value: true });
731729
exports.hello = void 0;
732730
exports.hello = 1;
733-
exports["default"] = 'there';
731+
exports.default = 'there';
734732
`);
735733
await expect(fse.readFile(path.resolve(baseDistPath, 'esm', 'index.js'), 'utf8')).resolves
736734
.toMatchInlineSnapshot(`

0 commit comments

Comments
 (0)