Skip to content

Commit

Permalink
chore(saslprep): skip codepoint generation in CI (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson authored Dec 27, 2023
1 parent f4bfc6f commit c29f69b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/saslprep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"types": "./dist/index.d.ts",
"scripts": {
"gen-code-points": "ts-node src/generate-code-points.ts > src/code-points-data.ts",
"gen-code-points": "ts-node src/generate-code-points.ts src/code-points-data.ts",
"bootstrap": "npm run compile",
"prepublishOnly": "npm run compile",
"compile": "npm run gen-code-points && tsc -p tsconfig.json && gen-esm-wrapper . ./dist/.esm-wrapper.mjs",
Expand Down
10 changes: 9 additions & 1 deletion packages/saslprep/src/generate-code-points.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { gzipSync } from 'zlib';
import bitfield from 'sparse-bitfield';
import * as codePoints from './code-points-src';
import { createWriteStream } from 'fs';

if (!process.env.GENERATE_CODE_POINTS) {
// TODO(COMPASS-7555): fix codepoint generation=
process.exitCode = 0;
process.exit();
}

const unassigned_code_points = bitfield();
const commonly_mapped_to_nothing = bitfield();
Expand Down Expand Up @@ -40,7 +47,8 @@ memory.push(
traverse(bidirectional_l, codePoints.bidirectional_l)
);

process.stdout.write(
const fsStream = createWriteStream(process.argv[2]);
fsStream.write(
`import { gunzipSync } from 'zlib';
export default gunzipSync(
Expand Down

0 comments on commit c29f69b

Please sign in to comment.