Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix old integrity hashes being added to the entrypoints.json with --watch #609

Merged
merged 1 commit into from Aug 9, 2019

Conversation

Lyrkan
Copy link
Collaborator

@Lyrkan Lyrkan commented Jul 10, 2019

This PR fixes a really small issue that I noticed while working on #608.

When using --watch and enableIntegrityHashes() together it works fine for the first compilation, but on the next ones the old hashes also get added to the entrypoints.json file.

First compilation:

{
  "entrypoints": {
    "main": {
      "js": [
        "/build/main.js"
      ]
    }
  },
  "integrity": {
    "/build/main.js": "<OLDHASH>"
  }
}

Second compilation:

{
  "entrypoints": {
    "integrity": {
      "/build/main.js": ["<OLDHASH>"]
    },
    "main": {
      "js": [
        "/build/main.js"
      ]
    }
  },
  "integrity": {
    "/build/main.js": "<NEWHASH>"
  }
}

@Lyrkan Lyrkan force-pushed the integrity-hashes-watch-issue branch from 1986d97 to eecebb7 Compare July 10, 2019 20:49
@weaverryan
Copy link
Member

Thanks @Lyrkan!

@weaverryan weaverryan merged commit eecebb7 into symfony:master Aug 9, 2019
weaverryan added a commit that referenced this pull request Aug 9, 2019
… with --watch (Lyrkan)

This PR was merged into the master branch.

Discussion
----------

Fix old integrity hashes being added to the entrypoints.json with --watch

This PR fixes a really small issue that I noticed while working on #608.

When using `--watch` and `enableIntegrityHashes()` together it works fine for the first compilation, but on the next ones the old hashes also get added to the `entrypoints.json` file.

**First compilation:**

```json
{
  "entrypoints": {
    "main": {
      "js": [
        "/build/main.js"
      ]
    }
  },
  "integrity": {
    "/build/main.js": "<OLDHASH>"
  }
}
```

**Second compilation:**

```json
{
  "entrypoints": {
    "integrity": {
      "/build/main.js": ["<OLDHASH>"]
    },
    "main": {
      "js": [
        "/build/main.js"
      ]
    }
  },
  "integrity": {
    "/build/main.js": "<NEWHASH>"
  }
}
```

Commits
-------

eecebb7 Fix old integrity hashes being added to the entrypoints.json with --watch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants