-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Add vite & build scripts * fix: Tests * fix: Build process * fix: Update config * fix: Load files asynchronously * fix: Load ECS files asynchronously * fix: Tests * fix: Audit * fix: Update deps * fix: Remove working directory * fix: Remove unused deps * fix: Add repository tag to package.json * fix: Add dotenv * fix: Missing test dep * fix: Missing decentraland-ecs dependency and regenerate package-lock * fix: package.json and package-lock.json * fix: Icon * fix: Remove react-app * fix: Remove console log * fix: Tests and types * fix: Restore configureAnalytics * fix: Prebuild script * fix: Remove Vercel NODE_OPTIONS --------- Co-authored-by: Gabriel Diaz <[email protected]>
- Loading branch information
1 parent
1a4ae01
commit c9b0c6a
Showing
205 changed files
with
21,518 additions
and
58,478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,14 @@ on: [push, pull_request] | |
jobs: | ||
audit: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Clean install dependencies | ||
run: npm ci | ||
|
||
- uses: actions/checkout@master | ||
- name: Use Node.js 18.x | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 18.x | ||
cache: 'npm' | ||
- name: Install | ||
run: npm i --legacy-peer-deps | ||
- name: Audit signatures | ||
run: npm audit signatures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
|
||
# production | ||
/build | ||
/dist | ||
|
||
# misc | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Export all old ECS math functions as mocks | ||
const Scalar = { | ||
toHex: i => { | ||
const str = i.toString(16) | ||
|
||
if (i <= 15) { | ||
return ('0' + str).toUpperCase() | ||
} | ||
|
||
return str.toUpperCase() | ||
} | ||
} | ||
|
||
const decentralandEcs = { | ||
core: { | ||
Color4: function (r, g, b, a) { | ||
return { | ||
r, | ||
g, | ||
b, | ||
a, | ||
toHexString: () => { | ||
const intR = (r * 255) | 0 | ||
const intG = (g * 255) | 0 | ||
const intB = (b * 255) | 0 | ||
const intA = (a * 255) | 0 | ||
return '#' + Scalar.toHex(intR) + Scalar.toHex(intG) + Scalar.toHex(intB) + Scalar.toHex(intA) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
module.exports = decentralandEcs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = () => undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* eslint-disable */ | ||
import type { Config } from 'jest' | ||
|
||
export default async (): Promise<Config> => { | ||
return { | ||
verbose: true, | ||
testEnvironment: 'jsdom', | ||
setupFiles: ['<rootDir>/src/tests/beforeSetupTests.ts'], | ||
setupFilesAfterEnv: ['<rootDir>/src/tests/afterSetupTest.ts'], | ||
transform: { | ||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': | ||
'<rootDir>/src/tests/config/fileTransformer.cjs', | ||
'^.+\\.(t|j)sx?$': [ | ||
'@swc/jest', | ||
{ | ||
jsc: { | ||
transform: { | ||
react: { | ||
runtime: 'automatic' | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
testRegex: '(/__tests__/.*|(\\.|/)(spec))\\.[jt]sx?$', | ||
moduleNameMapper: { | ||
'^three/.*$': 'identity-obj-proxy', | ||
'decentraland-ecs': 'identity-obj-proxy', | ||
'^.*/modules/curations/collectionCuration/toasts.*$': 'identity-obj-proxy', | ||
'@dcl/ecs': 'identity-obj-proxy', | ||
canvas: 'identity-obj-proxy', | ||
'^.+?raw': 'identity-obj-proxy', | ||
'@dcl/single-sign-on-client': 'identity-obj-proxy', | ||
'\\.(css|less)$': 'identity-obj-proxy', | ||
'^components/(.*)$': '<rootDir>/src/components/$1', | ||
'^config$': '<rootDir>/src/config', | ||
'^contracts(/.*)$': '<rootDir>/src/contracts/$1', | ||
'^contracts$': '<rootDir>/src/contracts', | ||
'^ecsScene/(.*)$': '<rootDir>/src/ecsScene/$1', | ||
'^experiments/(.*)$': '<rootDir>/src/experiments/$1', | ||
'^icons/(.*)$': '<rootDir>/src/icons/$1', | ||
'^images/(.*)$': '<rootDir>/src/images/$1', | ||
'^lib/(.*)$': '<rootDir>/src/lib/$1', | ||
'^modules/(.*)$': '<rootDir>/src/modules/$1', | ||
'^routing/(.*)$': '<rootDir>/src/routing/$1', | ||
'^specs/(.*)$': '<rootDir>/src/specs/$1' | ||
}, | ||
transformIgnorePatterns: ['node_modules/?!@0xsquid|eccrypto|libsodium-wrappers-sumo'] | ||
} | ||
} |
Oops, something went wrong.