Skip to content

Commit

Permalink
Merge pull request atom#19274 from atom/prepare-for-electron-v3
Browse files Browse the repository at this point in the history
Prepare Atom for the electron v3 upgrade
  • Loading branch information
rafeca authored May 7, 2019
2 parents fa10086 + a7af6c7 commit 833cdd0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion spec/fixtures/babel/invalid.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'use 6to6';

module.exports = async function* hello() {}
export default 42;
9 changes: 0 additions & 9 deletions spec/style-manager-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ describe('StyleManager', () => {
atom-text-editor::shadow .class-1, atom-text-editor::shadow .class-2 { color: red }
atom-text-editor::shadow > .class-3 { color: yellow }
atom-text-editor .class-4 { color: blue }
another-element::shadow .class-5 { color: white }
atom-text-editor[data-grammar*=\"js\"]::shadow .class-6 { color: green; }
atom-text-editor[mini].is-focused::shadow .class-7 { color: green; }
`)
Expand All @@ -69,7 +68,6 @@ describe('StyleManager', () => {
'atom-text-editor.editor .class-1, atom-text-editor.editor .class-2',
'atom-text-editor.editor > .class-3',
'atom-text-editor .class-4',
'another-element::shadow .class-5',
'atom-text-editor[data-grammar*="js"].editor .class-6',
'atom-text-editor[mini].is-focused.editor .class-7'
])
Expand Down Expand Up @@ -136,13 +134,6 @@ describe('StyleManager', () => {
).toEqual(['atom-text-editor .class-1, atom-text-editor .class-2'])
})

it('does not transform CSS rules with invalid syntax', () => {
styleManager.addStyleSheet("atom-text-editor::shadow .class-1 { font-family: inval'id }")
expect(Array.from(styleManager.getStyleElements()[0].sheet.cssRules).map((r) => r.selectorText)).toEqual([
'atom-text-editor::shadow .class-1'
])
})

it('does not throw exceptions on rules with no selectors', () => {
styleManager.addStyleSheet('@media screen {font-size: 10px}', {
context: 'atom-text-editor'
Expand Down
2 changes: 1 addition & 1 deletion spec/workspace-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2511,7 +2511,7 @@ describe('Workspace', () => {
})

runs(() => {
fs.rename(
fs.renameSync(
path.join(projectPath, 'git.git'),
path.join(projectPath, '.git')
)
Expand Down
2 changes: 1 addition & 1 deletion src/compile-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ exports.install = function (resourcesPath, nodeRequire) {
var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1)

try {
var sourceMap = JSON.parse(new Buffer(rawData, 'base64'))
var sourceMap = JSON.parse(Buffer.from(rawData, 'base64'))
} catch (error) {
console.warn('Error parsing source map', error.stack)
return null
Expand Down
2 changes: 1 addition & 1 deletion src/file-system-blob-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class FileSystemBlobStore {

reset () {
this.inMemoryBlobs = new Map()
this.storedBlob = new Buffer(0)
this.storedBlob = Buffer.alloc(0)
this.storedBlobMap = {}
this.usedKeys = new Set()
}
Expand Down

0 comments on commit 833cdd0

Please sign in to comment.