Skip to content

Commit 867dff2

Browse files
committed
fix little breakages
1 parent b64e6b1 commit 867dff2

File tree

8 files changed

+8
-15
lines changed

8 files changed

+8
-15
lines changed

packages/astro/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* }} SetupHookParams
66
*/
77
import orga from '@orgajs/rollup'
8-
import parseMetadata from '@orgajs/metadata'
8+
import { parse as parseMetadata } from '@orgajs/metadata'
99

1010
/**
1111
* @returns {import('astro').AstroIntegration}

packages/astro/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
"exports": {
88
".": "./index.js"
99
},
10-
"scripts": {
11-
"test": "echo \"Error: no test specified\" && exit 1"
12-
},
10+
"scripts": {},
1311
"keywords": [
1412
"astro-integration"
1513
],

packages/metadata/src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, it } from 'node:test'
22
import * as assert from 'node:assert'
3-
import parse from '.'
3+
import { parse } from '.'
44

55
describe('metadata parser', () => {
66
it('works', () => {

packages/metadata/src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ const pushTo = (data: Metadata) => (_key: string, _value: string) => {
4949
return data
5050
}
5151

52-
const parse = (text: string) => {
52+
export const parse = (text: string) => {
5353
const matches = text.matchAll(/^\s*#\+(\S+):(.*)$/gm)
5454
return [...matches].reduce((data, [, key, value]) => {
5555
if (shouldDiscard(key)) return data
5656
return pushTo(data)(key, value)
5757
}, {} as Metadata)
5858
}
59-
60-
export default parse

packages/next/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ProcessorOptions as LoaderOptions } from '@orgajs/loader'
1+
import type { Options as LoaderOptions } from '@orgajs/loader'
22

33
export interface Options extends LoaderOptions {
44
extension: RegExp

packages/next/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"references": [
88
{ "path": "../rehype-estree" },
99
{ "path": "../reorg-rehype" },
10-
{ "path": "../estree-jsx" },
11-
{ "path": "../loader" }
10+
{ "path": "../estree-jsx" }
1211
],
1312
"include": ["./src"]
1413
}

packages/rollup/src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ export default function (
1919
): Plugin {
2020
const { include, exclude, ...rest } = options || {}
2121
const processor = createProcessor({
22-
// SourceMapGenerator,
23-
...rest,
2422
SourceMapGenerator,
23+
...rest,
2524
})
2625
const filter = createFilter(include, exclude)
2726

@@ -30,7 +29,7 @@ export default function (
3029
async transform(value, path) {
3130
const file = new VFile({ value, path })
3231

33-
if (file.extname && filter(file.path)) {
32+
if (file.extname === '.org' && filter(file.path)) {
3433
const compiled = await processor.process(file)
3534
const code = String(compiled.value)
3635
const result: SourceDescription = { code, map: compiled.map }

tsconfig.packages.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
{ "path": "packages/reorg-rehype" },
1010
{ "path": "packages/rehype-estree" },
1111
{ "path": "packages/estree-jsx" },
12-
{ "path": "packages/loader" },
1312
{ "path": "packages/next" },
1413
{ "path": "packages/react" },
1514
{ "path": "packages/gatsby-plugin-orga" },

0 commit comments

Comments
 (0)