Skip to content

Commit 29f6658

Browse files
committed
fix: Address numerous compilation errors after upgrades.
1 parent 0b1a35c commit 29f6658

File tree

15 files changed

+298
-230
lines changed

15 files changed

+298
-230
lines changed

.yarnrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
registry "https://registry.npmjs.org/"
2-
--install.check-files true --install.flat true
2+
--install.check-files true

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@
149149
"combined-stream": "1.0.6",
150150
"delayed-stream": "1.0.0",
151151
"estraverse": "4.2.0",
152-
"@glimmer/resolution-map-builder": "0.5.1",
153152
"@types/babel-types": "7.0.1",
154153
"define-property": "2.0.2",
155154
"extend-shallow": "3.0.2",

packages/css-blocks/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@css-blocks/code-style": "^0.17.0",
4242
"@types/chai": "^3.5.2",
4343
"@types/mocha": "^2.2.41",
44-
"@types/node": "^7.0.39",
44+
"@types/node": "^8.9.4",
4545
"chai": "^3.5.0",
4646
"grunt": "^1.0.1",
4747
"grunt-release": "^0.14.0",
@@ -59,9 +59,9 @@
5959
"typescript": "^2.7.1"
6060
},
6161
"dependencies": {
62-
"@opticss/element-analysis": "^0.2.0",
63-
"@opticss/template-api": "^0.2.0",
64-
"@opticss/util": "^0.1.1",
62+
"@opticss/element-analysis": "link:../../build/opticss/packages/element-analysis",
63+
"@opticss/template-api": "link:../../build/opticss/packages/template-api",
64+
"@opticss/util": "link:../../build/opticss/packages/util",
6565
"@types/async": "^2.0.40",
6666
"@types/debug": "0.0.29",
6767
"@types/source-map": "^0.5.0",
@@ -70,7 +70,7 @@
7070
"debug": "^2.6.8",
7171
"inline-source-map-comment": "^1.0.5",
7272
"object.values": "^1.0.4",
73-
"opticss": "^0.2.0",
73+
"opticss": "link:../../build/opticss/packages/opticss",
7474
"postcss-selector-parser": "3.1.1",
7575
"regexpu-core": "^4.0.11",
7676
"source-map": "^0.5.7",

packages/css-blocks/src/BlockFactory/BlockFactory.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ export class BlockFactory implements IBlockFactory {
262262
function sourceMapFromProcessedFile(result: ProcessedFile): RawSourceMap | string | undefined {
263263
let sourceMap: RawSourceMap | string | undefined = result.sourceMap;
264264
if (!sourceMap && (<postcss.Result>result.content).map) {
265-
sourceMap = <RawSourceMap>(<postcss.Result>result.content).map.toJSON();
265+
sourceMap = (<postcss.Result>result.content).map.toJSON();
266266
}
267267
return sourceMap;
268268
}

packages/css-blocks/src/util/PromiseQueue.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let queueInstanceId = 1;
1717
* needed.
1818
*/
1919
export class PromiseQueue<WorkItem, Result> {
20-
private queue: AsyncQueue<PendingWork<WorkItem, Result>>;
20+
private queue: async.AsyncQueue<PendingWork<WorkItem, Result>>;
2121
private queueId: number;
2222
private jobId: number;
2323
private draining: Promise<void> | undefined;

packages/css-blocks/test/opticss-test.ts

+10-6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@ import {
22
POSITION_UNKNOWN,
33
} from "@opticss/element-analysis";
44
import {
5-
AndExpression,
6-
BooleanExpression,
75
isAndExpression,
86
Template,
97
} from "@opticss/template-api";
108
import {
11-
assert as typedAssert,
129
clean,
1310
ObjectDictionary,
1411
whatever,
@@ -18,7 +15,7 @@ import { suite, test } from "mocha-typescript";
1815
import { Optimizer } from "opticss";
1916
import * as postcss from "postcss";
2017

21-
import { Block, BlockClass, State, Style } from "../src/Block";
18+
import { Block, BlockClass, State } from "../src/Block";
2219
import { BlockCompiler } from "../src/BlockCompiler";
2320
import { BlockFactory } from "../src/BlockFactory";
2421
import { BlockParser } from "../src/BlockParser";
@@ -115,10 +112,17 @@ export class TemplateAnalysisTests {
115112
assert.deepEqual([...rewrite2.staticClasses].sort(), ["c"]);
116113
assert.deepEqual([...rewrite2.dynamicClasses].sort(), ["e", "f"]);
117114
let expr = rewrite2.dynamicClass("e");
118-
typedAssert.isType<BooleanExpression<Style>, AndExpression<Style>>(isAndExpression, expr).and(expr => {
115+
if (isAndExpression(expr)) {
119116
assert.deepEqual(expr.and.length, 1);
120117
assert.deepEqual(expr.and[0], block.find(".asdf[state|larger]")!);
121-
});
118+
} else {
119+
assert.isTrue(false, "Expected and expression");
120+
}
121+
// This isn't compiling right now :(
122+
// typedAssert.isType<Partial<BooleanExpression<Style>>, BooleanExpression<Style>, AndExpression<Style>>(isAndExpression, expr).and(expr => {
123+
// assert.deepEqual(expr.and.length, 1);
124+
// assert.deepEqual(expr.and[0], block.find(".asdf[state|larger]")!);
125+
// });
122126
});
123127
});
124128
}

packages/glimmer-templates/package.json

+156-6
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"@types/chai": "^3.5.2",
5151
"@types/debug": "0.0.29",
5252
"@types/mocha": "^2.2.41",
53-
"@types/node": "^7.0.18",
53+
"@types/node": "^8.9.4",
5454
"chai": "^3.5.0",
5555
"grunt": "^1.0.1",
5656
"grunt-release": "^0.12.0",
@@ -69,17 +69,167 @@
6969
"@glimmer/resolution-map-builder": "0.5.1",
7070
"@glimmer/resolver": "^0.3.0",
7171
"@glimmer/syntax": "^0.29.10",
72-
"@opticss/element-analysis": "^0.2.0",
73-
"@opticss/template-api": "^0.2.0",
74-
"@opticss/util": "^0.1.1",
72+
"@opticss/element-analysis": "link:../../build/opticss/packages/element-analysis",
73+
"@opticss/template-api": "link:../../build/opticss/packages/template-api",
74+
"@opticss/util": "link:../../build/opticss/packages/util",
7575
"@types/glob": "^5.0.30",
7676
"css-blocks": "^0.17.0",
7777
"debug": "^2.6.8",
7878
"glimmer-analyzer": "^0.2.0",
7979
"glob": "^7.1.2",
8080
"object.values": "^1.0.4",
81-
"opticss": "^0.2.0",
81+
"opticss": "link:../../build/opticss/packages/opticss",
8282
"postcss": "^6.0.1",
8383
"shelljs": "^0.7.8"
84+
},
85+
"resolutions": {
86+
"@types/chai": "4.1.2",
87+
"@types/minimatch": "3.0.3",
88+
"@types/node": "8.9.4",
89+
"abbrev": "1.1.1",
90+
"acorn": "5.5.0",
91+
"ajv": "5.5.2",
92+
"ansi-regex": "3.0.0",
93+
"ansi-styles": "3.2.0",
94+
"assert-plus": "1.0.0",
95+
"aws-sign2": "0.7.0",
96+
"boom": "5.2.0",
97+
"camelcase": "4.1.0",
98+
"camelcase-keys": "4.2.0",
99+
"chalk": "2.3.1",
100+
"cliui": "3.2.0",
101+
"colors": "1.1.2",
102+
"combine-source-map": "0.8.0",
103+
"commander": "2.14.1",
104+
"concat-stream": "1.6.1",
105+
"convert-source-map": "1.5.1",
106+
"core-js": "2.5.3",
107+
"cosmiconfig": "4.0.0",
108+
"cryptiles": "3.1.2",
109+
"dateformat": "3.0.3",
110+
"debug": "2.6.9",
111+
"depd": "1.1.1",
112+
"detect-indent": "5.0.0",
113+
"detect-libc": "1.0.3",
114+
"diff": "3.4.0",
115+
"domelementtype": "1.3.0",
116+
"dot-prop": "4.2.0",
117+
"duplexer2": "0.1.4",
118+
"esprima": "4.0.0",
119+
"execa": "0.8.0",
120+
"extsprintf": "1.4.0",
121+
"find-up": "2.1.0",
122+
"form-data": "2.3.2",
123+
"fs-extra": "4.0.3",
124+
"get-stdin": "5.0.1",
125+
"glob": "7.1.2",
126+
"glob-parent": "3.1.0",
127+
"har-schema": "2.0.0",
128+
"har-validator": "5.0.3",
129+
"has-flag": "3.0.0",
130+
"hash-base": "3.0.4",
131+
"hawk": "6.0.2",
132+
"hoek": "2.16.3",
133+
"http-signature": "1.2.0",
134+
"indent-string": "3.2.0",
135+
"inherits": "2.0.3",
136+
"is-arrayish": "0.3.1",
137+
"is-extglob": "2.1.1",
138+
"is-fullwidth-code-point": "2.0.0",
139+
"is-glob": "3.1.0",
140+
"is-number": "2.1.0",
141+
"isarray": "1.0.0",
142+
"js-yaml": "3.10.0",
143+
"jsesc": "1.3.0",
144+
"json-stable-stringify": "1.0.1",
145+
"jsonfile": "4.0.0",
146+
"kind-of": "4.0.0",
147+
"load-json-file": "4.0.0",
148+
"lodash.memoize": "4.1.2",
149+
"lodash.template": "4.4.0",
150+
"lodash.templatesettings": "4.1.0",
151+
"map-obj": "2.0.0",
152+
"meow": "4.0.0",
153+
"minimist": "1.2.0",
154+
"nopt": "4.0.1",
155+
"normalize-path": "2.1.1",
156+
"object-assign": "4.1.1",
157+
"os-locale": "2.1.0",
158+
"parse-json": "4.0.0",
159+
"path-exists": "3.0.0",
160+
"path-type": "3.0.0",
161+
"performance-now": "2.1.0",
162+
"pify": "3.0.0",
163+
"postcss-selector-parser": "3.1.1",
164+
"process-nextick-args": "2.0.0",
165+
"pump": "2.0.1",
166+
"punycode": "1.4.1",
167+
"qs": "6.5.1",
168+
"read-pkg": "3.0.0",
169+
"read-pkg-up": "3.0.0",
170+
"readable-stream": "2.3.4",
171+
"redent": "2.0.0",
172+
"regenerator-runtime": "0.11.1",
173+
"request": "2.83.0",
174+
"require-from-string": "2.0.1",
175+
"resolve": "1.5.0",
176+
"resolve-from": "4.0.0",
177+
"semver": "5.5.0",
178+
"setprototypeof": "1.1.0",
179+
"sntp": "2.1.0",
180+
"sort-keys": "2.0.0",
181+
"source-map": "0.6.1",
182+
"statuses": "1.4.0",
183+
"string-width": "2.1.1",
184+
"string_decoder": "1.0.3",
185+
"strip-ansi": "4.0.0",
186+
"strip-bom": "3.0.0",
187+
"strip-indent": "2.0.0",
188+
"supports-color": "5.2.0",
189+
"through2": "2.0.3",
190+
"trim-newlines": "2.0.0",
191+
"type-detect": "1.0.0",
192+
"typescript": "2.7.2",
193+
"uuid": "3.2.1",
194+
"which-module": "2.0.0",
195+
"wordwrap": "1.0.0",
196+
"yargs": "8.0.2",
197+
"yargs-parser": "7.0.0",
198+
"lodash": "4.17.5",
199+
"sprintf-js": "1.1.1",
200+
"rimraf": "2.6.2",
201+
"balanced-match": "1.0.0",
202+
"async": "2.6.0",
203+
"lazy-cache": "2.0.2",
204+
"which": "1.3.0",
205+
"regexpu-core": "4.1.3",
206+
"grunt-release": "0.14.0",
207+
"postcss": "6.0.19",
208+
"regjsgen": "0.3.0",
209+
"regjsparser": "0.2.1",
210+
"underscore.string": "3.3.4",
211+
"shelljs": "0.7.8",
212+
"superagent": "1.8.5",
213+
"formidable": "1.0.17",
214+
"mime": "1.3.4",
215+
"component-emitter": "1.2.1",
216+
"methods": "1.1.2",
217+
"cookiejar": "2.0.6",
218+
"extend": "3.0.1",
219+
"combined-stream": "1.0.6",
220+
"delayed-stream": "1.0.0",
221+
"estraverse": "4.2.0",
222+
"@glimmer/resolution-map-builder": "0.5.1",
223+
"@types/babel-types": "7.0.1",
224+
"define-property": "2.0.2",
225+
"extend-shallow": "3.0.2",
226+
"is-descriptor": "1.0.2",
227+
"isobject": "3.0.1",
228+
"is-accessor-descriptor": "1.0.0",
229+
"is-data-descriptor": "1.0.0",
230+
"is-extendable": "1.0.1",
231+
"has-value": "1.0.0",
232+
"set-value": "2.0.0",
233+
"has-values": "1.0.0"
84234
}
85-
}
235+
}

packages/glimmer-templates/src/GlimmerProject.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
TemplateInfo,
1010
TemplateInfoFactory,
1111
} from "@opticss/template-api";
12+
import { whatever } from "@opticss/util";
1213
import {
1314
BlockFactory,
1415
Importer,
@@ -47,8 +48,8 @@ export class ResolvedFile implements TemplateInfo<"GlimmerTemplates.ResolvedFile
4748
],
4849
};
4950
}
50-
static deserialize(identifier: string, str: string, fullPath: string): ResolvedFile {
51-
return new ResolvedFile(str, identifier, fullPath);
51+
static deserialize(identifier: string, str: whatever, fullPath: whatever): ResolvedFile {
52+
return new ResolvedFile(<string>str, identifier, <string>fullPath);
5253
}
5354
}
5455

packages/jsx/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@types/debug": "0.0.29",
5050
"@types/minimatch": "^2.0.29",
5151
"@types/mocha": "^2.2.41",
52-
"@types/node": "^7.0.18",
52+
"@types/node": "^8.9.4",
5353
"@types/prettier": "^1.8.0",
5454
"babel-core": "^6.25.0",
5555
"chai": "^3.5.0",
@@ -75,15 +75,15 @@
7575
"@css-blocks/runtime": "^0.17.0"
7676
},
7777
"dependencies": {
78-
"@opticss/template-api": "^0.2.0",
79-
"@opticss/util": "^0.1.1",
78+
"@opticss/template-api": "link:../../build/opticss/packages/template-api",
79+
"@opticss/util": "link:../../build/opticss/packages/util",
8080
"babel-traverse": "^6.24.1",
8181
"babel-types": "^6.24.1",
8282
"babylon": "^6.17.4",
8383
"css-blocks": "^0.17.0",
8484
"debug": "^2.6.8",
8585
"minimatch": "^3.0.4",
8686
"object.values": "^1.0.4",
87-
"opticss": "^0.2.0"
87+
"opticss": "link:../../build/opticss/packages/opticss"
8888
}
8989
}

packages/jsx/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"baseUrl": "dist",
1010
"typeRoots": [
1111
"node_modules/@types",
12+
"../../node_modules/@types",
1213
"types-local"
1314
]
1415
},

packages/webpack-plugin/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@types/debug": "0.0.29",
4545
"@types/extract-text-webpack-plugin": "^2.1.0",
4646
"@types/glob": "^5.0.30",
47-
"@types/node": "^7.0.13",
47+
"@types/node": "^8.9.4",
4848
"@types/webpack": "^3.0.14",
4949
"@types/webpack-merge": "0.0.4",
5050
"@types/webpack-sources": "^0.1.2",
@@ -70,15 +70,15 @@
7070
"webpack-merge": "^4.1.0"
7171
},
7272
"dependencies": {
73-
"@opticss/element-analysis": "^0.2.0",
74-
"@opticss/template-api": "^0.2.0",
73+
"@opticss/element-analysis": "link:../../build/opticss/packages/element-analysis",
74+
"@opticss/template-api": "link:../../build/opticss/packages/template-api",
7575
"async": "^2.4.1",
7676
"convert-source-map": "^1.5.0",
7777
"css-blocks": "^0.17.0",
7878
"debug": "^2.6.8",
7979
"install": "^0.10.1",
8080
"loader-utils": "^1.0.1",
81-
"opticss": "^0.2.0",
81+
"opticss": "link:../../build/opticss/packages/opticss",
8282
"postcss": "^6.0.14",
8383
"source-map": "^0.5.6",
8484
"tapable": "^0.2.5",

packages/webpack-plugin/src/CssAssets.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ export class CssAssets {
156156
}
157157
};
158158
if (Array.isArray(sourcePath)) {
159-
const sourcePaths = sourcePath.map(sourcePath => path.resolve(compiler.options.context, sourcePath));
159+
const sourcePaths = sourcePath.map(sourcePath => path.resolve(compiler.options.context!, sourcePath));
160160
assetFilesAsSource(sourcePaths, handleSource);
161161
} else {
162-
assetFileAsSource(path.resolve(compiler.options.context, sourcePath), handleSource);
162+
assetFileAsSource(path.resolve(compiler.options.context!, sourcePath), handleSource);
163163
}
164164
}, cb);
165165
});

0 commit comments

Comments
 (0)