Skip to content

Commit 419861b

Browse files
committed
move elliptic to a seperate package
1 parent f7c7b82 commit 419861b

File tree

18 files changed

+2506
-3946
lines changed

18 files changed

+2506
-3946
lines changed

.changeset/fast-pumpkins-visit.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@smithy/signature-v4a": patch
3+
"@smithy/elliptic": patch
4+
---
5+
6+
Move elliptic to separate @smithy/elliptic package

packages/elliptic/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/node_modules/
2+
/build/
3+
/coverage/
4+
/docs/
5+
*.tsbuildinfo
6+
*.tgz
7+
*.log
8+
package-lock.json

packages/elliptic/LICENSE

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../../api-extractor.packages.json",
3+
"mainEntryPointFilePath": "./dist-types/index.d.ts"
4+
}

packages/elliptic/package.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"name": "@smithy/elliptic",
3+
"version": "3.1.3",
4+
"description": "Elliptic cryptography wrapper for Smithy",
5+
"main": "./dist-cjs/index.js",
6+
"module": "./dist-es/index.js",
7+
"types": "./dist-types/index.d.ts",
8+
"scripts": {
9+
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
10+
"build:cjs": "node ../../scripts/inline elliptic",
11+
"build:es": "yarn g:tsc -p tsconfig.es.json",
12+
"build:types": "yarn g:tsc -p tsconfig.types.json",
13+
"build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
14+
"build:elliptic": "node ./scripts/esbuild.mjs",
15+
"stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
16+
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
17+
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
18+
"format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
19+
"extract:docs": "api-extractor run --local",
20+
"test": "yarn g:vitest run"
21+
},
22+
"author": {
23+
"name": "AWS SDK for JavaScript Team",
24+
"url": "https://aws.amazon.com/javascript/"
25+
},
26+
"license": "Apache-2.0",
27+
"sideEffects": false,
28+
"dependencies": {
29+
"tslib": "^2.6.2"
30+
},
31+
"devDependencies": {
32+
"concurrently": "7.0.0",
33+
"downlevel-dts": "0.10.1",
34+
"elliptic": "6.5.5",
35+
"esbuild": "^0.25.9",
36+
"rimraf": "3.0.2"
37+
},
38+
"engines": {
39+
"node": ">=18.0.0"
40+
},
41+
"typesVersions": {
42+
"<4.0": {
43+
"dist-types/*": [
44+
"dist-types/ts3.4/*"
45+
]
46+
}
47+
},
48+
"files": [
49+
"dist-*/**"
50+
],
51+
"homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/elliptic",
52+
"repository": {
53+
"type": "git",
54+
"url": "https://github.com/awslabs/smithy-typescript.git",
55+
"directory": "packages/elliptic"
56+
},
57+
"typedoc": {
58+
"entryPoint": "src/index.ts"
59+
},
60+
"publishConfig": {
61+
"directory": ".release/package"
62+
}
63+
}

packages/elliptic/scripts/Ec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { ec as Ec } from "elliptic";

packages/signature-v4a/scripts/esbuild.mjs renamed to packages/elliptic/scripts/esbuild.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import * as esbuild from "esbuild";
2-
import * as path from "path";
32
import * as fs from "fs";
3+
import * as path from "path";
44
import { fileURLToPath } from "url";
55

66
const __dirname = path.dirname(fileURLToPath(import.meta.url));
77

8-
const bundledSource = path.join(__dirname, "..", "src", "elliptic", "Ec.ts");
8+
const bundledSource = path.join(__dirname, "..", "src", "Ec.ts");
99

1010
const buildOptions = {
1111
platform: "browser",
@@ -31,4 +31,4 @@ fs.writeFileSync(
3131
/* eslint-disable */
3232
` + typescript,
3333
"utf-8"
34-
);
34+
);

0 commit comments

Comments
 (0)