Skip to content

Commit

Permalink
wip attempts to fix build with pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Sep 24, 2021
1 parent f379c3a commit 92e05a7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/server.js
Expand Up @@ -6,7 +6,7 @@ import yargs from "yargs";
import { hideBin } from "yargs/helpers";

import fixtureServereMiddleware from "../index.js";
import globTofixtures from "../lib/glob-to-fixtures.js ";
import globTofixtures from "../lib/glob-to-fixtures.js";

import DEFAULTS from "../lib/defaults.js";

Expand Down
10 changes: 5 additions & 5 deletions lib/defaults.js
@@ -1,10 +1,10 @@
import { dirname, resolve } from "path";
import { resolve } from "path";
import globTofixtures from "./glob-to-fixtures.js";

import { createRequire } from "module";
const require = createRequire(import.meta.url);

const octokitFixturesPath = dirname(require.resolve("@octokit/fixtures"));
const octokitFixturesPath = resolve(
process.cwd(),
"node_modules/@octokit/fixtures"
);
const DEFAULT_FIXTURES_GLOB = resolve(
octokitFixturesPath,
"scenarios/**/normalized-fixture.json"
Expand Down
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -68,7 +68,10 @@
]
},
"pkg": {
"scripts": "node_modules/@octokit/fixtures/scenarios/**/*.json"
"scripts": "node_modules/@octokit/fixtures/scenarios/**/*.json",
"options": [
"experimental-modules"
]
},
"now": {
"alias": "octokit-fixtures",
Expand Down

0 comments on commit 92e05a7

Please sign in to comment.