diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index bf3241a2d9..0000000000 --- a/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -# EditorConfig is awesome: http://EditorConfig.org - -root = true - -[*] -end_of_line = lf -insert_final_newline = true - -[*.{js,d.ts,json,html,md,sh}] -charset = utf-8 -indent_style = space -indent_size = 2 diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs deleted file mode 100644 index 17a489a8c3..0000000000 --- a/.git-blame-ignore-revs +++ /dev/null @@ -1,2 +0,0 @@ -# upgrade to prettier 3 -0355483c301dba5e215e2c3d113125a274444e38 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index 936cae52b0..0000000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,105 +0,0 @@ -# Have a question? - -Please ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/immutable.js) instead of opening a Github Issue. There are more people on Stack Overflow who -can answer questions, and good answers can be searchable and canonical. - -# Issues - -We use GitHub issues to track bugs. Please ensure your bug description is clear -and has sufficient instructions to be able to reproduce the issue. - -The absolute best way to report a bug is to submit a pull request including a -new failing test which describes the bug. When the bug is fixed, your pull -request can then be merged! - -The next best way to report a bug is to provide a reduced test case on jsFiddle -or jsBin or produce exact code inline in the issue which will reproduce the bug. - -# Code of Conduct - -Immutable.js is maintained within the [Contributor Covenant's Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/). - -# Pull Requests - -All active development of Immutable JS happens on GitHub. We actively welcome -your [pull requests](https://help.github.com/articles/creating-a-pull-request). - -1. Fork the repo and create your branch from `master`. -2. Install all dependencies. (`npm install`) -3. If you've added code, add tests. -4. If you've changed APIs, update the documentation. -5. Build generated JS, run tests and ensure your code passes lint. (`npm run test`) -6. If you haven't already, complete the Contributor License Agreement ("CLA"). - -## Documentation - -Documentation for Immutable.js (hosted at http://immutable-js.github.io/immutable-js) -is developed in `pages/`. Run `npm start` to get a local copy in your browser -while making edits. - -## Coding Style - -- 2 spaces for indentation (no tabs) -- 80 character line length strongly preferred. -- Prefer `'` over `"` -- ES6 Harmony when possible. -- Use semicolons; -- Trailing commas, -- Avd abbr wrds. - -# Functionality Testing - -Run the following command to build the library and test functionality: - -```bash -npm run test -``` - -## Performance Regression Testing - -Performance tests run against master and your feature branch. -Make sure to commit your changes in your local feature branch before proceeding. - -These commands assume you have a remote named `upstream` amd that you do not already have a local `master` branch: - -```bash -git fetch upstream -git checkout -b master upstream/master -``` - -These commands build `dist` and commit `dist/immutable.js` to `master` so that the regression tests can run. -```bash -npm run test -git add dist/immutable.js -f -git commit -m 'perf test prerequisite.' -``` - -Switch back to your feature branch, and run the following command to run regression tests: - -```bash -npm run test -npm run perf -``` - -Sample output: - -```bash -> immutable@4.0.0-rc.9 perf ~/github.com/immutable-js/immutable-js -> node ./resources/bench.js - -List > builds from array of 2 - Old: 678,974 683,071 687,218 ops/sec - New: 669,012 673,553 678,157 ops/sec - compare: 1 -1 - diff: -1.4% - rme: 0.64% -``` - -## TypeScript version support - -TypeScript version does support the same version as [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) versions. Immutable "may" work with older versions, but no support will be provided. - -## License - -By contributing to Immutable.js, you agree that your contributions will be -licensed under its MIT license. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 4cf7679033..0000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: [jdeniau, Methuselah96] diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 3387aa797e..0000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,42 +0,0 @@ - - -### What happened - - - -### How to reproduce - - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 29c1b4a5d3..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,139 +0,0 @@ -name: CI - -on: - push: - branches: - - main - - 5.x - - 6.x - pull_request: ~ - -jobs: - lint: - name: 'Lint' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '20' - - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: ${{ runner.OS }}-node- - - run: npm ci - - run: npm run lint - - run: npm run check-git-clean - - type-check: - name: 'Type Check' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '20' - - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: ${{ runner.OS }}-node- - - uses: actions/cache@v4 - with: - path: ~/.dts - key: ${{ runner.OS }}-dts-${{ hashFiles('**/package-lock.json') }} - restore-keys: ${{ runner.OS }}-dts- - - run: npm ci - - run: npm run type-check - - run: npm run check-git-clean - - test: - name: 'Build & Unit Test & Type Test' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '20' - - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: ${{ runner.OS }}-node- - - name: 'Install dependencies' - run: npm ci - - - name: 'Build JS files' - run: npm run build - - - name: 'Ensure all files are builded' - run: npm run check-build-output - - - name: 'Run unit tests' - run: npm run test:unit - - - name: 'Test types' - run: npm run test:types -- --target 4.5,5.0,current - - - run: npx size-limit - - run: npm run check-git-clean - - website: - name: 'Build Website' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version: '20' - - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: ${{ runner.OS }}-node- - - run: npm ci - - run: NODE_OPTIONS=--openssl-legacy-provider npm run website:build - - run: npm run check-git-clean - - publish: - name: 'Publish' - needs: [lint, type-check, test, website] - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version: '20' - - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: ${{ runner.OS }}-node- - - run: npm ci - - run: npm run build - - run: NODE_OPTIONS=--openssl-legacy-provider npm run website:build - - name: Push NPM Branch - if: github.ref == 'refs/heads/main' - uses: peaceiris/actions-gh-pages@v3 - with: - enable_jekyll: true - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./npm - publish_branch: npm - user_name: 'github-actions[bot]' - user_email: 'github-actions[bot]@users.noreply.github.com' - - name: Publish Docs - if: github.ref == 'refs/heads/main' - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./website/out - cname: immutable-js.com - user_name: 'github-actions[bot]' - user_email: 'github-actions[bot]@users.noreply.github.com' diff --git a/.github/workflows/output_diff.yml b/.github/workflows/output_diff.yml deleted file mode 100644 index 74690ee3cd..0000000000 --- a/.github/workflows/output_diff.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: CI - -on: - pull_request: - branches: - - main - - init-migrate-to-ts - # run only if there is ts files in the PR - paths: - - 'src/**/*.ts' - -jobs: - diff: - name: 'Output diff' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - path: 'pr' - - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.base.sha }} - path: 'main' - - - uses: actions/setup-node@v4 - with: - node-version: '20' - - - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: ${{ runner.OS }}-node- - - - name: 'Install PR branch dependencies' - run: npm ci - working-directory: pr - - - name: 'Install main branch dependencies' - run: npm ci - working-directory: main - - - name: 'Build PR branch' - run: npm run build - working-directory: pr - - - name: 'Build main branch' - run: npm run build - working-directory: main - - - name: 'Execute prettier and remove ts-expect-error on PR dist' - run: npx terser dist/immutable.es.js --comments false | npx prettier --parser=babel > dist/immutable.es.prettier.js - - working-directory: pr - - - name: 'Execute prettier main dist' - run: npx terser dist/immutable.es.js --comments false | npx prettier --parser=babel > dist/immutable.es.prettier.js - working-directory: main - - - name: 'Output diff' - run: diff --unified --ignore-blank-lines --ignore-all-space main/dist/immutable.es.prettier.js pr/dist/immutable.es.prettier.js diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index ad6d4d72ad..0000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Release - -on: - workflow_dispatch: ~ - release: - types: [published] - -jobs: - build: - name: 'Build & Publish to NPM' - permissions: - contents: read - id-token: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '20' - registry-url: 'https://registry.npmjs.org' - - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: ${{ runner.OS }}-node- - - run: npm ci - - run: npm run build - - name: 'Determine NPM tag: latest or next depending if we are on a prerelease or not (version with hyphen should be a prerelease)' - id: npm_tag - run: | - VERSION=$(node -p "require('./package.json').version") - if [[ $VERSION == *-* ]]; then - echo "TAG=next" >> "$GITHUB_OUTPUT" - else - echo "TAG=latest" >> "$GITHUB_OUTPUT" - fi - - run: cd npm && npm publish --provenance --tag ${{ steps.npm_tag.outputs.TAG }} - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 972b88d8e1..0000000000 --- a/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -.*.haste_cache.* -node_modules -npm-debug.log -yarn-error.log -.DS_Store -*~ -*.swp -.idea -*.iml -TODO -/website/.next -/website/out -/website/public/sitemap*.xml -/website/public/robots.txt -/gh-pages -/npm -/dist -/coverage \ No newline at end of file diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 3b56666703..0000000000 --- a/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -dist -type-definitions/flow-tests/ diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 544138be45..0000000000 --- a/.prettierrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "singleQuote": true -} diff --git a/404.html b/404.html new file mode 100644 index 0000000000..ee81305551 --- /dev/null +++ b/404.html @@ -0,0 +1 @@ +