Skip to content

Commit

Permalink
Fix wasm publish (#3003)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-apollo committed May 13, 2024
1 parent 3914ec2 commit 35e6065
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
5 changes: 2 additions & 3 deletions internals-js/src/wasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ import {aggregateError} from "./error";
import {ErrorLocation, SourceDirective} from "../wasm/node";
import {ASTNode, ConstValueNode, SchemaExtensionNode, StringValueNode} from "graphql";

const {validate_connect_directives} =
require('../wasm/node') as typeof import('../wasm/node');

/**
* @throws AggregateGraphQLError
*/
Expand Down Expand Up @@ -49,6 +46,8 @@ function hasConnectDirectives(schema: Schema): boolean {
function validateConnectDirectives(ast: DocumentNode): GraphQLError[] {
// TODO: pass the _original_ source, not the one with added federation stuff (otherwise positions will be wrong)
// TODO: unless, of course, there's already infrastructure up above which does translation somehow
const {validate_connect_directives} =
require('../wasm/node') as typeof import('../wasm/node');
const source = print(ast)
return validate_connect_directives(source).map(
raw => new GraphQLError(raw.message, {
Expand Down
9 changes: 0 additions & 9 deletions internals-js/wasm/build.sh

This file was deleted.

2 changes: 2 additions & 0 deletions internals-js/wasm/node/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# We don't want to check in build artifacts (thus the .gitignore), but we _do_ need NPM to publish those files
# .npmignore overrides .gitignore

0 comments on commit 35e6065

Please sign in to comment.