@samual/rolldown-config 0.0.1-cb91c98 → 0.0.1-d3074ab

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.
Files changed (3) hide show
  1. package/default.d.ts +1 -1
  2. package/default.js +6 -4
  3. package/package.json +12 -11
package/default.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type RollupBabelInputPluginOptions } from "@rollup/plugin-babel";
2
2
  import { type Options as TerserOptions } from "@rollup/plugin-terser";
3
- import type { LaxPartial } from "@samual/lib";
3
+ import type { LaxPartial } from "@samual/types";
4
4
  import type { RolldownOptions } from "rolldown";
5
5
  import { type Options as PrettierOptions } from "rollup-plugin-prettier";
6
6
  type Options = LaxPartial<{
package/default.js CHANGED
@@ -4,11 +4,11 @@ import babelPresetEnv from "@babel/preset-env"
4
4
  import babelPresetTypescript from "@babel/preset-typescript"
5
5
  import { babel } from "@rollup/plugin-babel"
6
6
  import terser from "@rollup/plugin-terser"
7
- import { ensure } from "@samual/lib/assert"
8
- import { findFiles } from "@samual/lib/findFiles"
7
+ import { expect } from "@samual/assert"
9
8
  import { babelPluginHere } from "babel-plugin-here"
10
9
  import { babelPluginVitest } from "babel-plugin-vitest"
11
10
  import { defu } from "defu"
11
+ import { readdir } from "fs/promises"
12
12
  import { cpus } from "os"
13
13
  import * as Path from "path"
14
14
  import prettier from "rollup-plugin-prettier"
@@ -23,7 +23,9 @@ const rolldownConfig = async ({
23
23
  defu(rolldownOptions, {
24
24
  external: source => !(Path.isAbsolute(source) || source.startsWith(".")),
25
25
  input: Object.fromEntries(
26
- (await findFiles(sourcePath))
26
+ (await readdir(sourcePath, { withFileTypes: !0, recursive: !0 }))
27
+ .filter(dirent => dirent.isFile())
28
+ .map(dirent => Path.join((dirent => dirent.parentPath ?? dirent.path)(dirent), dirent.name))
27
29
  .filter(
28
30
  path =>
29
31
  (path.endsWith(".js") && !path.endsWith(".test.js")) ||
@@ -55,7 +57,7 @@ const rolldownConfig = async ({
55
57
  experimental?.noSideEffects && {
56
58
  name: "no-side-effects",
57
59
  async renderChunk(code) {
58
- const ast = ensure(await parseAsync(code, { plugins: [babelPluginSyntaxTypescript] })),
60
+ const ast = expect(await parseAsync(code, { plugins: [babelPluginSyntaxTypescript] })),
59
61
  indexes = []
60
62
  traverse(ast, {
61
63
  Function(path) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samual/rolldown-config",
3
- "version": "0.0.1-cb91c98",
3
+ "version": "0.0.1-d3074ab",
4
4
  "type": "module",
5
5
  "description": "My Rolldown config",
6
6
  "keywords": [
@@ -19,18 +19,19 @@
19
19
  },
20
20
  "repository": "github:samualtnorman/rolldown-config",
21
21
  "dependencies": {
22
- "@babel/core": "^7.20.0",
23
- "@babel/plugin-syntax-typescript": "^7.27.1",
24
- "@babel/preset-env": "^7.10.0",
25
- "@babel/preset-typescript": "^7.27.1",
26
- "@rollup/plugin-babel": "^6.1.0",
22
+ "@babel/core": "^7.19",
23
+ "@babel/plugin-syntax-typescript": "^7",
24
+ "@babel/preset-env": "^7",
25
+ "@babel/preset-typescript": "^7",
26
+ "@rollup/plugin-babel": "^6",
27
27
  "@rollup/plugin-terser": "^0.4.4",
28
- "@samual/lib": "0.13.1-5f3d742",
29
- "babel-plugin-here": "1.0.3-d254d5b",
28
+ "@samual/assert": "0.0.1-fc7f76d",
29
+ "@samual/types": "0.0.2-23ffc7f",
30
+ "babel-plugin-here": "1.0.3-0e10245",
30
31
  "babel-plugin-vitest": "0.0.1-7dc1dde",
31
- "defu": "^6.1.4",
32
- "rolldown": "1.0.0-beta.50",
33
- "rollup-plugin-prettier": "^4.1.2"
32
+ "defu": "^6",
33
+ "rolldown": "1.0.0-rc.3",
34
+ "rollup-plugin-prettier": "^4"
34
35
  },
35
36
  "pnpm": {
36
37
  "patchedDependencies": {