Skip to content

Commit

Permalink
fix: Address numerous compilation errors after upgrades.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseppstein committed Mar 2, 2018
1 parent 0b1a35c commit 29f6658
Show file tree
Hide file tree
Showing 15 changed files with 298 additions and 230 deletions.
2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
registry "https://registry.npmjs.org/"
--install.check-files true --install.flat true
--install.check-files true
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@
"combined-stream": "1.0.6",
"delayed-stream": "1.0.0",
"estraverse": "4.2.0",
"@glimmer/resolution-map-builder": "0.5.1",
"@types/babel-types": "7.0.1",
"define-property": "2.0.2",
"extend-shallow": "3.0.2",
Expand Down
10 changes: 5 additions & 5 deletions packages/css-blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@css-blocks/code-style": "^0.17.0",
"@types/chai": "^3.5.2",
"@types/mocha": "^2.2.41",
"@types/node": "^7.0.39",
"@types/node": "^8.9.4",
"chai": "^3.5.0",
"grunt": "^1.0.1",
"grunt-release": "^0.14.0",
Expand All @@ -59,9 +59,9 @@
"typescript": "^2.7.1"
},
"dependencies": {
"@opticss/element-analysis": "^0.2.0",
"@opticss/template-api": "^0.2.0",
"@opticss/util": "^0.1.1",
"@opticss/element-analysis": "link:../../build/opticss/packages/element-analysis",
"@opticss/template-api": "link:../../build/opticss/packages/template-api",
"@opticss/util": "link:../../build/opticss/packages/util",
"@types/async": "^2.0.40",
"@types/debug": "0.0.29",
"@types/source-map": "^0.5.0",
Expand All @@ -70,7 +70,7 @@
"debug": "^2.6.8",
"inline-source-map-comment": "^1.0.5",
"object.values": "^1.0.4",
"opticss": "^0.2.0",
"opticss": "link:../../build/opticss/packages/opticss",
"postcss-selector-parser": "3.1.1",
"regexpu-core": "^4.0.11",
"source-map": "^0.5.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/css-blocks/src/BlockFactory/BlockFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export class BlockFactory implements IBlockFactory {
function sourceMapFromProcessedFile(result: ProcessedFile): RawSourceMap | string | undefined {
let sourceMap: RawSourceMap | string | undefined = result.sourceMap;
if (!sourceMap && (<postcss.Result>result.content).map) {
sourceMap = <RawSourceMap>(<postcss.Result>result.content).map.toJSON();
sourceMap = (<postcss.Result>result.content).map.toJSON();
}
return sourceMap;
}
2 changes: 1 addition & 1 deletion packages/css-blocks/src/util/PromiseQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let queueInstanceId = 1;
* needed.
*/
export class PromiseQueue<WorkItem, Result> {
private queue: AsyncQueue<PendingWork<WorkItem, Result>>;
private queue: async.AsyncQueue<PendingWork<WorkItem, Result>>;
private queueId: number;
private jobId: number;
private draining: Promise<void> | undefined;
Expand Down
16 changes: 10 additions & 6 deletions packages/css-blocks/test/opticss-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ import {
POSITION_UNKNOWN,
} from "@opticss/element-analysis";
import {
AndExpression,
BooleanExpression,
isAndExpression,
Template,
} from "@opticss/template-api";
import {
assert as typedAssert,
clean,
ObjectDictionary,
whatever,
Expand All @@ -18,7 +15,7 @@ import { suite, test } from "mocha-typescript";
import { Optimizer } from "opticss";
import * as postcss from "postcss";

import { Block, BlockClass, State, Style } from "../src/Block";
import { Block, BlockClass, State } from "../src/Block";
import { BlockCompiler } from "../src/BlockCompiler";
import { BlockFactory } from "../src/BlockFactory";
import { BlockParser } from "../src/BlockParser";
Expand Down Expand Up @@ -115,10 +112,17 @@ export class TemplateAnalysisTests {
assert.deepEqual([...rewrite2.staticClasses].sort(), ["c"]);
assert.deepEqual([...rewrite2.dynamicClasses].sort(), ["e", "f"]);
let expr = rewrite2.dynamicClass("e");
typedAssert.isType<BooleanExpression<Style>, AndExpression<Style>>(isAndExpression, expr).and(expr => {
if (isAndExpression(expr)) {
assert.deepEqual(expr.and.length, 1);
assert.deepEqual(expr.and[0], block.find(".asdf[state|larger]")!);
});
} else {
assert.isTrue(false, "Expected and expression");
}
// This isn't compiling right now :(
// typedAssert.isType<Partial<BooleanExpression<Style>>, BooleanExpression<Style>, AndExpression<Style>>(isAndExpression, expr).and(expr => {
// assert.deepEqual(expr.and.length, 1);
// assert.deepEqual(expr.and[0], block.find(".asdf[state|larger]")!);
// });
});
});
}
Expand Down
162 changes: 156 additions & 6 deletions packages/glimmer-templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@types/chai": "^3.5.2",
"@types/debug": "0.0.29",
"@types/mocha": "^2.2.41",
"@types/node": "^7.0.18",
"@types/node": "^8.9.4",
"chai": "^3.5.0",
"grunt": "^1.0.1",
"grunt-release": "^0.12.0",
Expand All @@ -69,17 +69,167 @@
"@glimmer/resolution-map-builder": "0.5.1",
"@glimmer/resolver": "^0.3.0",
"@glimmer/syntax": "^0.29.10",
"@opticss/element-analysis": "^0.2.0",
"@opticss/template-api": "^0.2.0",
"@opticss/util": "^0.1.1",
"@opticss/element-analysis": "link:../../build/opticss/packages/element-analysis",
"@opticss/template-api": "link:../../build/opticss/packages/template-api",
"@opticss/util": "link:../../build/opticss/packages/util",
"@types/glob": "^5.0.30",
"css-blocks": "^0.17.0",
"debug": "^2.6.8",
"glimmer-analyzer": "^0.2.0",
"glob": "^7.1.2",
"object.values": "^1.0.4",
"opticss": "^0.2.0",
"opticss": "link:../../build/opticss/packages/opticss",
"postcss": "^6.0.1",
"shelljs": "^0.7.8"
},
"resolutions": {
"@types/chai": "4.1.2",
"@types/minimatch": "3.0.3",
"@types/node": "8.9.4",
"abbrev": "1.1.1",
"acorn": "5.5.0",
"ajv": "5.5.2",
"ansi-regex": "3.0.0",
"ansi-styles": "3.2.0",
"assert-plus": "1.0.0",
"aws-sign2": "0.7.0",
"boom": "5.2.0",
"camelcase": "4.1.0",
"camelcase-keys": "4.2.0",
"chalk": "2.3.1",
"cliui": "3.2.0",
"colors": "1.1.2",
"combine-source-map": "0.8.0",
"commander": "2.14.1",
"concat-stream": "1.6.1",
"convert-source-map": "1.5.1",
"core-js": "2.5.3",
"cosmiconfig": "4.0.0",
"cryptiles": "3.1.2",
"dateformat": "3.0.3",
"debug": "2.6.9",
"depd": "1.1.1",
"detect-indent": "5.0.0",
"detect-libc": "1.0.3",
"diff": "3.4.0",
"domelementtype": "1.3.0",
"dot-prop": "4.2.0",
"duplexer2": "0.1.4",
"esprima": "4.0.0",
"execa": "0.8.0",
"extsprintf": "1.4.0",
"find-up": "2.1.0",
"form-data": "2.3.2",
"fs-extra": "4.0.3",
"get-stdin": "5.0.1",
"glob": "7.1.2",
"glob-parent": "3.1.0",
"har-schema": "2.0.0",
"har-validator": "5.0.3",
"has-flag": "3.0.0",
"hash-base": "3.0.4",
"hawk": "6.0.2",
"hoek": "2.16.3",
"http-signature": "1.2.0",
"indent-string": "3.2.0",
"inherits": "2.0.3",
"is-arrayish": "0.3.1",
"is-extglob": "2.1.1",
"is-fullwidth-code-point": "2.0.0",
"is-glob": "3.1.0",
"is-number": "2.1.0",
"isarray": "1.0.0",
"js-yaml": "3.10.0",
"jsesc": "1.3.0",
"json-stable-stringify": "1.0.1",
"jsonfile": "4.0.0",
"kind-of": "4.0.0",
"load-json-file": "4.0.0",
"lodash.memoize": "4.1.2",
"lodash.template": "4.4.0",
"lodash.templatesettings": "4.1.0",
"map-obj": "2.0.0",
"meow": "4.0.0",
"minimist": "1.2.0",
"nopt": "4.0.1",
"normalize-path": "2.1.1",
"object-assign": "4.1.1",
"os-locale": "2.1.0",
"parse-json": "4.0.0",
"path-exists": "3.0.0",
"path-type": "3.0.0",
"performance-now": "2.1.0",
"pify": "3.0.0",
"postcss-selector-parser": "3.1.1",
"process-nextick-args": "2.0.0",
"pump": "2.0.1",
"punycode": "1.4.1",
"qs": "6.5.1",
"read-pkg": "3.0.0",
"read-pkg-up": "3.0.0",
"readable-stream": "2.3.4",
"redent": "2.0.0",
"regenerator-runtime": "0.11.1",
"request": "2.83.0",
"require-from-string": "2.0.1",
"resolve": "1.5.0",
"resolve-from": "4.0.0",
"semver": "5.5.0",
"setprototypeof": "1.1.0",
"sntp": "2.1.0",
"sort-keys": "2.0.0",
"source-map": "0.6.1",
"statuses": "1.4.0",
"string-width": "2.1.1",
"string_decoder": "1.0.3",
"strip-ansi": "4.0.0",
"strip-bom": "3.0.0",
"strip-indent": "2.0.0",
"supports-color": "5.2.0",
"through2": "2.0.3",
"trim-newlines": "2.0.0",
"type-detect": "1.0.0",
"typescript": "2.7.2",
"uuid": "3.2.1",
"which-module": "2.0.0",
"wordwrap": "1.0.0",
"yargs": "8.0.2",
"yargs-parser": "7.0.0",
"lodash": "4.17.5",
"sprintf-js": "1.1.1",
"rimraf": "2.6.2",
"balanced-match": "1.0.0",
"async": "2.6.0",
"lazy-cache": "2.0.2",
"which": "1.3.0",
"regexpu-core": "4.1.3",
"grunt-release": "0.14.0",
"postcss": "6.0.19",
"regjsgen": "0.3.0",
"regjsparser": "0.2.1",
"underscore.string": "3.3.4",
"shelljs": "0.7.8",
"superagent": "1.8.5",
"formidable": "1.0.17",
"mime": "1.3.4",
"component-emitter": "1.2.1",
"methods": "1.1.2",
"cookiejar": "2.0.6",
"extend": "3.0.1",
"combined-stream": "1.0.6",
"delayed-stream": "1.0.0",
"estraverse": "4.2.0",
"@glimmer/resolution-map-builder": "0.5.1",
"@types/babel-types": "7.0.1",
"define-property": "2.0.2",
"extend-shallow": "3.0.2",
"is-descriptor": "1.0.2",
"isobject": "3.0.1",
"is-accessor-descriptor": "1.0.0",
"is-data-descriptor": "1.0.0",
"is-extendable": "1.0.1",
"has-value": "1.0.0",
"set-value": "2.0.0",
"has-values": "1.0.0"
}
}
}
5 changes: 3 additions & 2 deletions packages/glimmer-templates/src/GlimmerProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
TemplateInfo,
TemplateInfoFactory,
} from "@opticss/template-api";
import { whatever } from "@opticss/util";
import {
BlockFactory,
Importer,
Expand Down Expand Up @@ -47,8 +48,8 @@ export class ResolvedFile implements TemplateInfo<"GlimmerTemplates.ResolvedFile
],
};
}
static deserialize(identifier: string, str: string, fullPath: string): ResolvedFile {
return new ResolvedFile(str, identifier, fullPath);
static deserialize(identifier: string, str: whatever, fullPath: whatever): ResolvedFile {
return new ResolvedFile(<string>str, identifier, <string>fullPath);
}
}

Expand Down
8 changes: 4 additions & 4 deletions packages/jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@types/debug": "0.0.29",
"@types/minimatch": "^2.0.29",
"@types/mocha": "^2.2.41",
"@types/node": "^7.0.18",
"@types/node": "^8.9.4",
"@types/prettier": "^1.8.0",
"babel-core": "^6.25.0",
"chai": "^3.5.0",
Expand All @@ -75,15 +75,15 @@
"@css-blocks/runtime": "^0.17.0"
},
"dependencies": {
"@opticss/template-api": "^0.2.0",
"@opticss/util": "^0.1.1",
"@opticss/template-api": "link:../../build/opticss/packages/template-api",
"@opticss/util": "link:../../build/opticss/packages/util",
"babel-traverse": "^6.24.1",
"babel-types": "^6.24.1",
"babylon": "^6.17.4",
"css-blocks": "^0.17.0",
"debug": "^2.6.8",
"minimatch": "^3.0.4",
"object.values": "^1.0.4",
"opticss": "^0.2.0"
"opticss": "link:../../build/opticss/packages/opticss"
}
}
1 change: 1 addition & 0 deletions packages/jsx/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"baseUrl": "dist",
"typeRoots": [
"node_modules/@types",
"../../node_modules/@types",
"types-local"
]
},
Expand Down
8 changes: 4 additions & 4 deletions packages/webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@types/debug": "0.0.29",
"@types/extract-text-webpack-plugin": "^2.1.0",
"@types/glob": "^5.0.30",
"@types/node": "^7.0.13",
"@types/node": "^8.9.4",
"@types/webpack": "^3.0.14",
"@types/webpack-merge": "0.0.4",
"@types/webpack-sources": "^0.1.2",
Expand All @@ -70,15 +70,15 @@
"webpack-merge": "^4.1.0"
},
"dependencies": {
"@opticss/element-analysis": "^0.2.0",
"@opticss/template-api": "^0.2.0",
"@opticss/element-analysis": "link:../../build/opticss/packages/element-analysis",
"@opticss/template-api": "link:../../build/opticss/packages/template-api",
"async": "^2.4.1",
"convert-source-map": "^1.5.0",
"css-blocks": "^0.17.0",
"debug": "^2.6.8",
"install": "^0.10.1",
"loader-utils": "^1.0.1",
"opticss": "^0.2.0",
"opticss": "link:../../build/opticss/packages/opticss",
"postcss": "^6.0.14",
"source-map": "^0.5.6",
"tapable": "^0.2.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/webpack-plugin/src/CssAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ export class CssAssets {
}
};
if (Array.isArray(sourcePath)) {
const sourcePaths = sourcePath.map(sourcePath => path.resolve(compiler.options.context, sourcePath));
const sourcePaths = sourcePath.map(sourcePath => path.resolve(compiler.options.context!, sourcePath));
assetFilesAsSource(sourcePaths, handleSource);
} else {
assetFileAsSource(path.resolve(compiler.options.context, sourcePath), handleSource);
assetFileAsSource(path.resolve(compiler.options.context!, sourcePath), handleSource);
}
}, cb);
});
Expand Down
Loading

0 comments on commit 29f6658

Please sign in to comment.