Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ src/index.ts
src/errors/SquareError.ts
src/core/index.ts
src/core/crypto
src/core/json.ts
tests/unit/error.test.ts
tests/unit/fetcher/stream-wrappers/webpack.test.ts
tests/integration
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-node@v3

- name: Compile
run: yarn && yarn test
run: yarn && yarn test:unit

publish:
needs: [ compile ]
Expand Down
5 changes: 3 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ tests
.gitignore
.github
.fernignore
.prettierrc.yml
biome.json
tsconfig.json
yarn.lock
yarn.lock
pnpm-lock.yaml
2 changes: 0 additions & 2 deletions .prettierrc.yml

This file was deleted.

69 changes: 69 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
"root": true,
"vcs": {
"enabled": false
},
"files": {
"ignoreUnknown": true,
"includes": [
"./**",
"!dist",
"!lib",
"!*.tsbuildinfo",
"!_tmp_*",
"!*.tmp",
"!.tmp/",
"!*.log",
"!.DS_Store",
"!Thumbs.db"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 4,
"lineWidth": 120
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"linter": {
"rules": {
"style": {
"useNodejsImportProtocol": "off"
},
"suspicious": {
"noAssignInExpressions": "warn",
"noUselessEscapeInString": {
"level": "warn",
"fix": "none",
"options": {}
},
"noThenProperty": "warn",
"useIterableCallbackReturn": "warn",
"noShadowRestrictedNames": "warn",
"noTsIgnore": {
"level": "warn",
"fix": "none",
"options": {}
},
"noConfusingVoidType": {
"level": "warn",
"fix": "none",
"options": {}
}
}
}
}
}
32 changes: 4 additions & 28 deletions jest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,7 @@ export default {
roots: ["<rootDir>/tests"],
testPathIgnorePatterns: ["\.browser\.(spec|test)\.[jt]sx?$", "/tests/wire/", "/tests/integration/"],
setupFilesAfterEnv: [],
transformIgnorePatterns: [
"node_modules/(?!(msw|@mswjs|@bundled-es-modules|until-async)/)",
],
transform: {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.m?jsx?$": "ts-jest",
},
},
{
displayName: "browser",
preset: "ts-jest",
testEnvironment: "<rootDir>/tests/BrowserTestEnvironment.ts",
moduleNameMapper: {
"^(\.{1,2}/.*)\.js$": "$1",
},
roots: ["<rootDir>/tests"],
testMatch: ["<rootDir>/tests/unit/**/?(*.)+(browser).(spec|test).[jt]s?(x)"],
setupFilesAfterEnv: [],
transformIgnorePatterns: [
"node_modules/(?!(msw|@mswjs|@bundled-es-modules|until-async)/)",
],
transformIgnorePatterns: ["node_modules/(?!(msw|@mswjs|@bundled-es-modules|until-async)/)"],
transform: {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.m?jsx?$": "ts-jest",
Expand All @@ -48,9 +28,7 @@ export default {
},
roots: ["<rootDir>/tests/wire"],
setupFilesAfterEnv: ["<rootDir>/tests/mock-server/setup.ts"],
transformIgnorePatterns: [
"node_modules/(?!(msw|@mswjs|@bundled-es-modules|until-async)/)",
],
transformIgnorePatterns: ["node_modules/(?!(msw|@mswjs|@bundled-es-modules|until-async)/)"],
transform: {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.m?jsx?$": "ts-jest",
Expand All @@ -64,9 +42,7 @@ export default {
"^(\.{1,2}/.*)\.js$": "$1",
},
roots: ["<rootDir>/tests/integration"],
transformIgnorePatterns: [
"node_modules/(?!(msw|@mswjs|@bundled-es-modules|until-async)/)",
],
transformIgnorePatterns: ["node_modules/(?!(msw|@mswjs|@bundled-es-modules|until-async)/)"],
transform: {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.m?jsx?$": "ts-jest",
Expand All @@ -75,4 +51,4 @@ export default {
],
workerThreads: false,
passWithNoTests: true,
};
};
2 changes: 1 addition & 1 deletion legacy/exports/index.d.mts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "square-legacy";
export * from "square-legacy";
2 changes: 1 addition & 1 deletion legacy/exports/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "square-legacy";
export * from "square-legacy";
2 changes: 1 addition & 1 deletion legacy/exports/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("square-legacy");
module.exports = require("square-legacy");
2 changes: 1 addition & 1 deletion legacy/exports/index.mjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "square-legacy";
export * from "square-legacy";
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
{
"name": "square",
"version": "43.1.0",
"version": "43.1.2",
"private": false,
"repository": "github:square/square-nodejs-sdk",
"license": "MIT",
"main": "./index.js",
"types": "./index.d.ts",
"scripts": {
"format": "prettier . --write --ignore-unknown",
"format": "biome format --write --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
"check": "biome check --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
"check:fix": "biome check --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
"build": "tsc",
"prepack": "cp -rv dist/. .",
"test": "jest --selectProjects unit browser wire",
"test": "jest --selectProjects unit wire",
"test:unit": "jest --selectProjects unit",
"test:browser": "jest --selectProjects browser",
"test:wire": "jest --selectProjects wire",
"test:integration": "jest --selectProjects integration"
},
"dependencies": {
"form-data": "^4.0.0",
"form-data": "^4.0.4",
"formdata-node": "^6.0.3",
"node-fetch": "^2.7.0",
"readable-stream": "^4.5.2",
Expand All @@ -34,9 +35,9 @@
"@types/jest": "^29.5.14",
"ts-jest": "^29.3.4",
"jest-environment-jsdom": "^29.7.0",
"msw": "^2.8.4",
"msw": "2.11.2",
"@types/node": "^18.19.70",
"prettier": "^3.4.2",
"@biomejs/biome": "2.2.5",
"typescript": "~5.7.2"
},
"browser": {
Expand Down
Loading
Loading