Skip to content

Commit aef14f2

Browse files
committed
Update ani-cursor build
1 parent dbf5459 commit aef14f2

File tree

7 files changed

+32
-274
lines changed

7 files changed

+32
-274
lines changed

packages/ani-cursor/babel.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/ani-cursor/package.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,24 @@
22
"name": "ani-cursor",
33
"version": "0.0.5",
44
"description": "Render .ani cursors as CSS animations in the browser",
5+
"type": "module",
56
"main": "dist/index.js",
67
"types": "dist/index.d.ts",
8+
"exports": {
9+
".": {
10+
"import": "./dist/index.js",
11+
"types": "./dist/index.d.ts"
12+
}
13+
},
714
"files": [
815
"dist/",
916
"src/**/*.ts"
1017
],
1118
"author": "Jordan Eldredge <jordan@jordaneldredge.com>",
1219
"license": "MIT",
20+
"engines": {
21+
"node": ">=14.0.0"
22+
},
1323
"repository": {
1424
"type": "git",
1525
"url": "https://github.com/captbaritone/webamp.git",
@@ -29,6 +39,7 @@
2939
"@babel/core": "^7.20.0",
3040
"@babel/preset-env": "^7.20.2",
3141
"@babel/preset-typescript": "^7.20.0",
42+
"@swc/jest": "^0.2.24",
3243
"@types/jest": "^30.0.0",
3344
"@types/node": "^24.0.10",
3445
"typescript": "^5.3.3"
@@ -41,6 +52,13 @@
4152
"modulePathIgnorePatterns": [
4253
"dist"
4354
],
44-
"testEnvironment": "jsdom"
55+
"testEnvironment": "jsdom",
56+
"extensionsToTreatAsEsm": [".ts"],
57+
"moduleNameMapper": {
58+
"^(\\.{1,2}/.*)\\.js$": "$1"
59+
},
60+
"transform": {
61+
"^.+\\.(t|j)sx?$": ["@swc/jest"]
62+
}
4563
}
4664
}

packages/ani-cursor/src/__tests__/parser.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from "fs";
22
import path from "path";
3-
import { convertAniBinaryToCSS } from "../";
3+
import { convertAniBinaryToCSS } from "../index.js";
44

55
const LONG_BASE_64 = /([A-Za-z0-9+/=]{50})[A-Za-z0-9+/=]+/g;
66

packages/ani-cursor/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { parseAni } from "./parser";
1+
import { parseAni } from "./parser.js";
22

33
type AniCursorImage = {
44
frames: {

packages/ani-cursor/tsconfig.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"compilerOptions": {
33
/* Visit https://aka.ms/tsconfig.json to read more about this file */
4-
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
5-
"lib": ["es2015", "dom"] /* Specify library files to be included in the compilation. */,
4+
"target": "ES2018" /* Specify ECMAScript target version */,
5+
"lib": ["ES2018", "dom"] /* Specify library files to be included in the compilation. */,
66
"types": ["jest", "node"] /* Type declaration files to be included in compilation. */,
7-
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
7+
"module": "ES2020" /* Specify module code generation */,
88
"sourceMap": true /* Generates corresponding '.map' file. */,
99
"outDir": "./dist" /* Redirect output structure to the directory. */,
1010
"downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */,
@@ -26,7 +26,9 @@
2626
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
2727

2828
/* Module Resolution Options */
29+
"moduleResolution": "node" /* Use Node.js-style module resolution */,
2930
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
31+
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export */,
3032

3133
"declaration": true,
3234
"skipLibCheck": true /* Skip type checking of declaration files. */,

packages/webamp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
"dependencies": {
136136
"@redux-devtools/extension": "^3.3.0",
137137
"@sentry/browser": "5.9.1",
138-
"ani-cursor": "^0.0.4",
138+
"ani-cursor": "workspace:*",
139139
"butterchurn": "^3.0.0-beta.3",
140140
"butterchurn-presets": "3.0.0-beta.4",
141141
"classnames": "^2.2.5",

0 commit comments

Comments
 (0)