Skip to content

Commit

Permalink
test(repo): add tests for new typings
Browse files Browse the repository at this point in the history
  • Loading branch information
Septh committed Oct 16, 2024
1 parent 38a2b3b commit d901d87
Show file tree
Hide file tree
Showing 402 changed files with 2,262 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ coverage.lcov
!packages/commonjs/test/**/node_modules
!packages/typescript/test/fixtures/**/node_modules
!packages/typescript/test/fixtures/**/dist

!packages/*/test-typings/node_modules
3 changes: 2 additions & 1 deletion packages/alias/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"prerelease": "pnpm build",
"pretest": "pnpm build",
"release": "pnpm --workspace-root package:release $(pwd)",
"test": "ava",
"test": "pnpm test:ts && pnpm test:dts && ava",
"test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean",
"test:ts": "tsc --noEmit"
},
"files": [
Expand Down
3 changes: 3 additions & 0 deletions packages/alias/test-typings/cjs-node16/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
3 changes: 3 additions & 0 deletions packages/alias/test-typings/cjs-node16/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "commonjs"
}
11 changes: 11 additions & 0 deletions packages/alias/test-typings/cjs-node16/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"moduleResolution": "Node16",
"module": "Node16",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
3 changes: 3 additions & 0 deletions packages/alias/test-typings/esm-node16/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
3 changes: 3 additions & 0 deletions packages/alias/test-typings/esm-node16/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
10 changes: 10 additions & 0 deletions packages/alias/test-typings/esm-node16/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"module": "Node16",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
3 changes: 3 additions & 0 deletions packages/alias/test-typings/node10-commonjs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
11 changes: 11 additions & 0 deletions packages/alias/test-typings/node10-commonjs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"moduleResolution": "Node",
"module": "CommonJS",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
3 changes: 3 additions & 0 deletions packages/alias/test-typings/node10-esnext/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
11 changes: 11 additions & 0 deletions packages/alias/test-typings/node10-esnext/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"moduleResolution": "Node",
"module": "ESNext",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
1 change: 1 addition & 0 deletions packages/alias/test-typings/node_modules/current-package

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

9 changes: 9 additions & 0 deletions packages/alias/test-typings/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"files": [],
"references": [
{ "path": "./esm-node16" },
{ "path": "./cjs-node16" },
{ "path": "./node10-esnext" },
{ "path": "./node10-commonjs" }
]
}
3 changes: 2 additions & 1 deletion packages/auto-install/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"prerelease": "pnpm build",
"pretest": "pnpm build",
"release": "pnpm --workspace-root package:release $(pwd)",
"test": "ava",
"test": "pnpm test:ts && pnpm test:dts && ava",
"test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean",
"test:ts": "tsc --noEmit"
},
"files": [
Expand Down
3 changes: 3 additions & 0 deletions packages/auto-install/test-typings/cjs-node16/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
3 changes: 3 additions & 0 deletions packages/auto-install/test-typings/cjs-node16/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "commonjs"
}
11 changes: 11 additions & 0 deletions packages/auto-install/test-typings/cjs-node16/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"moduleResolution": "Node16",
"module": "Node16",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
3 changes: 3 additions & 0 deletions packages/auto-install/test-typings/esm-node16/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
3 changes: 3 additions & 0 deletions packages/auto-install/test-typings/esm-node16/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
10 changes: 10 additions & 0 deletions packages/auto-install/test-typings/esm-node16/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"module": "Node16",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
3 changes: 3 additions & 0 deletions packages/auto-install/test-typings/node10-commonjs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
11 changes: 11 additions & 0 deletions packages/auto-install/test-typings/node10-commonjs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"moduleResolution": "Node",
"module": "CommonJS",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
3 changes: 3 additions & 0 deletions packages/auto-install/test-typings/node10-esnext/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
11 changes: 11 additions & 0 deletions packages/auto-install/test-typings/node10-esnext/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"moduleResolution": "Node",
"module": "ESNext",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}

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

9 changes: 9 additions & 0 deletions packages/auto-install/test-typings/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"files": [],
"references": [
{ "path": "./esm-node16" },
{ "path": "./cjs-node16" },
{ "path": "./node10-esnext" },
{ "path": "./node10-commonjs" }
]
}
3 changes: 2 additions & 1 deletion packages/babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"prerelease": "pnpm build",
"pretest": "pnpm build",
"release": "pnpm --workspace-root package:release $(pwd)",
"test": "ava",
"test": "pnpm test:ts && pnpm test:dts && ava",
"test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean",
"test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
},
"files": [
Expand Down
3 changes: 3 additions & 0 deletions packages/babel/test-typings/cjs-node16/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
3 changes: 3 additions & 0 deletions packages/babel/test-typings/cjs-node16/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "commonjs"
}
11 changes: 11 additions & 0 deletions packages/babel/test-typings/cjs-node16/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"moduleResolution": "Node16",
"module": "Node16",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
3 changes: 3 additions & 0 deletions packages/babel/test-typings/esm-node16/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
3 changes: 3 additions & 0 deletions packages/babel/test-typings/esm-node16/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
10 changes: 10 additions & 0 deletions packages/babel/test-typings/esm-node16/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"module": "Node16",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
3 changes: 3 additions & 0 deletions packages/babel/test-typings/node10-commonjs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
11 changes: 11 additions & 0 deletions packages/babel/test-typings/node10-commonjs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"moduleResolution": "Node",
"module": "CommonJS",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
3 changes: 3 additions & 0 deletions packages/babel/test-typings/node10-esnext/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
11 changes: 11 additions & 0 deletions packages/babel/test-typings/node10-esnext/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"moduleResolution": "Node",
"module": "ESNext",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
1 change: 1 addition & 0 deletions packages/babel/test-typings/node_modules/current-package

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

9 changes: 9 additions & 0 deletions packages/babel/test-typings/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"files": [],
"references": [
{ "path": "./esm-node16" },
{ "path": "./cjs-node16" },
{ "path": "./node10-esnext" },
{ "path": "./node10-commonjs" }
]
}
3 changes: 3 additions & 0 deletions packages/beep/test-typings/cjs-node16/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
3 changes: 3 additions & 0 deletions packages/beep/test-typings/cjs-node16/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "commonjs"
}
11 changes: 11 additions & 0 deletions packages/beep/test-typings/cjs-node16/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"moduleResolution": "Node16",
"module": "Node16",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
3 changes: 3 additions & 0 deletions packages/beep/test-typings/esm-node16/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
3 changes: 3 additions & 0 deletions packages/beep/test-typings/esm-node16/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
10 changes: 10 additions & 0 deletions packages/beep/test-typings/esm-node16/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"module": "Node16",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
3 changes: 3 additions & 0 deletions packages/beep/test-typings/node10-commonjs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
11 changes: 11 additions & 0 deletions packages/beep/test-typings/node10-commonjs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"moduleResolution": "Node",
"module": "CommonJS",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
3 changes: 3 additions & 0 deletions packages/beep/test-typings/node10-esnext/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
11 changes: 11 additions & 0 deletions packages/beep/test-typings/node10-esnext/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["./index.ts"],
"compilerOptions": {
"moduleResolution": "Node",
"module": "ESNext",
"composite": true,
"tsBuildInfoFile": "output/.tsbuildinfo",
"skipLibCheck": true,
"noEmit": true
}
}
1 change: 1 addition & 0 deletions packages/beep/test-typings/node_modules/current-package

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

9 changes: 9 additions & 0 deletions packages/beep/test-typings/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"files": [],
"references": [
{ "path": "./esm-node16" },
{ "path": "./cjs-node16" },
{ "path": "./node10-esnext" },
{ "path": "./node10-commonjs" }
]
}
5 changes: 3 additions & 2 deletions packages/buble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@
"prerelease": "pnpm build",
"pretest": "pnpm build",
"release": "pnpm --workspace-root package:release $(pwd)",
"test": "ava",
"test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
"test": "pnpm test:ts && pnpm test:dts && ava",
"test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean",
"test:ts": "tsc --noEmit"
},
"files": [
"dist",
Expand Down
3 changes: 3 additions & 0 deletions packages/buble/test-typings/cjs-node16/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import currentPackage from 'current-package';

currentPackage();
3 changes: 3 additions & 0 deletions packages/buble/test-typings/cjs-node16/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "commonjs"
}
Loading

0 comments on commit d901d87

Please sign in to comment.